diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-02-19 21:22:51 -0800 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-02-19 21:22:51 -0800 |
commit | 7765039f1cc7b9c78b26b9d7c807df2eddcf829f (patch) | |
tree | 649c5de38a925b05bd3636da118490ca678d1680 /Eigen/src/Core/arch/CUDA/MathFunctions.h | |
parent | 92ceb02c6dd4b2fc375d6c355e0450d705390ca0 (diff) |
Marked the CUDA packet primitives as EIGEN_DEVICE_FUNC since they'll end up being executed on the GPU device.
Diffstat (limited to 'Eigen/src/Core/arch/CUDA/MathFunctions.h')
-rw-r--r-- | Eigen/src/Core/arch/CUDA/MathFunctions.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Eigen/src/Core/arch/CUDA/MathFunctions.h b/Eigen/src/Core/arch/CUDA/MathFunctions.h index e7305c01e..3bea88bea 100644 --- a/Eigen/src/Core/arch/CUDA/MathFunctions.h +++ b/Eigen/src/Core/arch/CUDA/MathFunctions.h @@ -18,49 +18,49 @@ namespace internal { // introduce conflicts between these packet_traits definitions and the ones // we'll use on the host side (SSE, AVX, ...) #if defined(__CUDACC__) && defined(EIGEN_USE_GPU) -template<> EIGEN_STRONG_INLINE +template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 plog<float4>(const float4& a) { return make_float4(logf(a.x), logf(a.y), logf(a.z), logf(a.w)); } -template<> EIGEN_STRONG_INLINE +template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 plog<double2>(const double2& a) { return make_double2(log(a.x), log(a.y)); } -template<> EIGEN_STRONG_INLINE +template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pexp<float4>(const float4& a) { return make_float4(expf(a.x), expf(a.y), expf(a.z), expf(a.w)); } -template<> EIGEN_STRONG_INLINE +template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pexp<double2>(const double2& a) { return make_double2(exp(a.x), exp(a.y)); } -template<> EIGEN_STRONG_INLINE +template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 psqrt<float4>(const float4& a) { return make_float4(sqrtf(a.x), sqrtf(a.y), sqrtf(a.z), sqrtf(a.w)); } -template<> EIGEN_STRONG_INLINE +template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 psqrt<double2>(const double2& a) { return make_double2(sqrt(a.x), sqrt(a.y)); } -template<> EIGEN_STRONG_INLINE +template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 prsqrt<float4>(const float4& a) { return make_float4(rsqrtf(a.x), rsqrtf(a.y), rsqrtf(a.z), rsqrtf(a.w)); } -template<> EIGEN_STRONG_INLINE +template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 prsqrt<double2>(const double2& a) { return make_double2(rsqrt(a.x), rsqrt(a.y)); |