Skip to content

Commit ff64cc8

Browse files
committed
build: finalize support for gcc 4.7, 4.8
this was the missing issue I also mentioned on ML, now I found a solution. Now gcc 4.6, 4.7 and 4.8 seem to be able to build the codebase. http://gcc.gnu.org/gcc-4.7/porting_to.html In instantiation of ‘int t(T) [with T = int]’ required from here error: ‘f’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] note: ‘int f(int)’ declared here, later in the translation unit To fix, make sure the function f in the code above is declared before first use in function t.
1 parent 7555394 commit ff64cc8

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ __Clients__ take input data and feed it through encoders, models, and metrics an
2121
Installation
2222
------------
2323

24-
NuPIC requires Python 2.6 (with development headers), GCC, and Make.
24+
NuPIC requires Python 2.6 (with development headers), GCC (4.6-4.8), and Make.
2525

2626
Add the following to your .bashrc file. Change the paths as needed.
2727

nta/math/array_algo.hpp

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3054,6 +3054,35 @@ namespace nta {
30543054
else
30553055
return lp_norm(p, begin, end, take_root);
30563056
}
3057+
3058+
//--------------------------------------------------------------------------------
3059+
/**
3060+
*/
3061+
template <typename It>
3062+
inline void
3063+
multiply_val(It begin, It end,
3064+
const typename std::iterator_traits<It>::value_type& val)
3065+
{
3066+
{
3067+
NTA_ASSERT(begin <= end)
3068+
<< "multiply_val: Invalid range";
3069+
}
3070+
3071+
if (val == 1.0f)
3072+
return;
3073+
3074+
for (; begin != end; ++begin)
3075+
*begin *= val;
3076+
}
3077+
3078+
//--------------------------------------------------------------------------------
3079+
/**
3080+
*/
3081+
template <typename T>
3082+
inline void multiply_val(T& x, const typename T::value_type& val)
3083+
{
3084+
multiply_val(x.begin(), x.end(), val);
3085+
}
30573086

30583087
//--------------------------------------------------------------------------------
30593088
/**
@@ -4025,35 +4054,6 @@ namespace nta {
40254054
negate(x.begin(), x.end());
40264055
}
40274056

4028-
//--------------------------------------------------------------------------------
4029-
/**
4030-
*/
4031-
template <typename It>
4032-
inline void
4033-
multiply_val(It begin, It end,
4034-
const typename std::iterator_traits<It>::value_type& val)
4035-
{
4036-
{
4037-
NTA_ASSERT(begin <= end)
4038-
<< "multiply_val: Invalid range";
4039-
}
4040-
4041-
if (val == 1.0f)
4042-
return;
4043-
4044-
for (; begin != end; ++begin)
4045-
*begin *= val;
4046-
}
4047-
4048-
//--------------------------------------------------------------------------------
4049-
/**
4050-
*/
4051-
template <typename T>
4052-
inline void multiply_val(T& x, const typename T::value_type& val)
4053-
{
4054-
multiply_val(x.begin(), x.end(), val);
4055-
}
4056-
40574057
//--------------------------------------------------------------------------------
40584058
/**
40594059
*/

0 commit comments

Comments
 (0)