diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-03-29 13:29:34 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-03-29 13:29:34 -0700 |
commit | 1841d6d4c349e1e1d64820a26aaab5df30750400 (patch) | |
tree | cfb4727f7845934dc42a65546ba3942dfbcdb385 /Eigen/src/Core/MathFunctions.h | |
parent | 7b7d2a9fa52fb4537849c69a0b193a9284b42bb1 (diff) |
Added missing cuda template specializations for numext::ceil
Diffstat (limited to 'Eigen/src/Core/MathFunctions.h')
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 6ffad6c29..000cafee7 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -962,6 +962,15 @@ T (ceil)(const T& x) return ceil(x); } +#ifdef __CUDACC__ +template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +float ceil(const float &x) { return ::ceilf(x); } + +template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +double ceil(const double &x) { return ::ceil(x); } +#endif + + /** Log base 2 for 32 bits positive integers. * Conveniently returns 0 for x==0. */ inline int log2(int x) |