File tree 3 files changed +7
-8
lines changed
3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ using namespace RcppNT2;
8
8
#include < Rcpp.h>
9
9
using namespace Rcpp ;
10
10
11
- // Product of squared deviations
12
11
class Accumulator
13
12
{
14
13
public:
@@ -18,7 +17,7 @@ class Accumulator
18
17
template <typename T>
19
18
void operator ()(const T& data)
20
19
{
21
- result_ *= boost::simd ::prod (data);
20
+ result_ *= nt2 ::prod (data);
22
21
}
23
22
24
23
operator double () const {
Original file line number Diff line number Diff line change @@ -19,13 +19,13 @@ class SumOfSquaresReducer
19
19
template <typename T>
20
20
void map (const T& self, T* pBuffer)
21
21
{
22
- *pBuffer += boost::simd ::sqr (self - mean_);
22
+ *pBuffer += nt2 ::sqr (self - mean_);
23
23
}
24
24
25
25
template <typename T, typename U>
26
26
void reduce (const T& data, U* pBuffer)
27
27
{
28
- *pBuffer += boost::simd ::sum (data);
28
+ *pBuffer += nt2 ::sum (data);
29
29
}
30
30
31
31
private:
Original file line number Diff line number Diff line change @@ -20,13 +20,13 @@ class SumOfSquaresReducer
20
20
template <typename T>
21
21
void map (const T& self, T* pBuffer)
22
22
{
23
- *pBuffer += boost::simd ::sqr (self - mean_);
23
+ *pBuffer += nt2 ::sqr (self - mean_);
24
24
}
25
25
26
26
template <typename T, typename U>
27
27
void reduce (const T& data, U* pBuffer)
28
28
{
29
- *pBuffer += boost::simd ::sum (data);
29
+ *pBuffer += nt2 ::sum (data);
30
30
}
31
31
32
32
private:
@@ -69,8 +69,8 @@ class SumOfSquares
69
69
}
70
70
71
71
operator double () const {
72
- double lhs = lhs_ + boost::simd ::sum (pLhs_);
73
- double rhs = rhs_ + boost::simd ::sum (pRhs_);
72
+ double lhs = lhs_ + nt2 ::sum (pLhs_);
73
+ double rhs = rhs_ + nt2 ::sum (pRhs_);
74
74
return lhs - (rhs * rhs) / n_;
75
75
}
76
76
You can’t perform that action at this time.
0 commit comments