Skip to content

Commit ac9b57d

Browse files
committed
prefer 'nt2' namespace
1 parent 06a4848 commit ac9b57d

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

inst/examples/boost-simd/boost-simd-for-each.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ using namespace RcppNT2;
88
#include <Rcpp.h>
99
using namespace Rcpp;
1010

11-
// Product of squared deviations
1211
class Accumulator
1312
{
1413
public:
@@ -18,7 +17,7 @@ class Accumulator
1817
template <typename T>
1918
void operator()(const T& data)
2019
{
21-
result_ *= boost::simd::prod(data);
20+
result_ *= nt2::prod(data);
2221
}
2322

2423
operator double() const {

inst/examples/boost-simd/boost-simd-map-reduce.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ class SumOfSquaresReducer
1919
template <typename T>
2020
void map(const T& self, T* pBuffer)
2121
{
22-
*pBuffer += boost::simd::sqr(self - mean_);
22+
*pBuffer += nt2::sqr(self - mean_);
2323
}
2424

2525
template <typename T, typename U>
2626
void reduce(const T& data, U* pBuffer)
2727
{
28-
*pBuffer += boost::simd::sum(data);
28+
*pBuffer += nt2::sum(data);
2929
}
3030

3131
private:

inst/examples/boost-simd/boost-simd-variance.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ class SumOfSquaresReducer
2020
template <typename T>
2121
void map(const T& self, T* pBuffer)
2222
{
23-
*pBuffer += boost::simd::sqr(self - mean_);
23+
*pBuffer += nt2::sqr(self - mean_);
2424
}
2525

2626
template <typename T, typename U>
2727
void reduce(const T& data, U* pBuffer)
2828
{
29-
*pBuffer += boost::simd::sum(data);
29+
*pBuffer += nt2::sum(data);
3030
}
3131

3232
private:
@@ -69,8 +69,8 @@ class SumOfSquares
6969
}
7070

7171
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_);
7474
return lhs - (rhs * rhs) / n_;
7575
}
7676

0 commit comments

Comments
 (0)