aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/MathFunctions.h
diff options
context:
space:
mode:
authorGravatar Eugene Brevdo <ebrevdo@gmail.com>2016-03-16 12:44:35 -0700
committerGravatar Eugene Brevdo <ebrevdo@gmail.com>2016-03-16 12:44:35 -0700
commit1f69a1b65fd5cbf6610e7d6522d57b4cb9acd686 (patch)
tree91cc3d768addfe858f2cb088a5e10b1eca360ec4 /Eigen/src/Core/MathFunctions.h
parent836e92a051f9f56801c52d603402aaa5e74a7a6f (diff)
Change the header guard around certain numext functions to be CUDA specific.
Diffstat (limited to 'Eigen/src/Core/MathFunctions.h')
-rw-r--r--Eigen/src/Core/MathFunctions.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h
index 311808187..ec75175ca 100644
--- a/Eigen/src/Core/MathFunctions.h
+++ b/Eigen/src/Core/MathFunctions.h
@@ -946,7 +946,7 @@ T (floor)(const T& x)
return floor(x);
}
-#ifdef EIGEN_HAS_C99_MATH
+#ifdef __CUDACC__
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
float floor(const float &x) { return ::floorf(x); }
@@ -1000,7 +1000,7 @@ T log(const T &x) {
return log(x);
}
-#ifdef EIGEN_HAS_C99_MATH
+#ifdef __CUDACC__
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
float log(const float &x) { return ::logf(x); }
@@ -1015,7 +1015,7 @@ T tan(const T &x) {
return tan(x);
}
-#ifdef EIGEN_HAS_C99_MATH
+#ifdef __CUDACC__
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
float tan(const float &x) { return ::tanf(x); }
@@ -1030,7 +1030,7 @@ T abs(const T &x) {
return abs(x);
}
-#ifdef EIGEN_HAS_C99_MATH
+#ifdef __CUDACC__
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
float abs(const float &x) { return ::fabsf(x); }
@@ -1045,7 +1045,7 @@ T exp(const T &x) {
return exp(x);
}
-#ifdef EIGEN_HAS_C99_MATH
+#ifdef __CUDACC__
template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
float exp(const float &x) { return ::expf(x); }