aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/Core
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-11-05 10:31:59 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-11-05 10:31:59 +0100
commit1bb1a57ef724cd0ce60920b5a672949960b94536 (patch)
tree70addc1d74f1d347792f12015fecba3300463841 /Eigen/Core
parent7c9cdd6030a95f0027d5723a758e2290d0b61deb (diff)
parentddf775363147fc7ee778b42c21b642f085193f55 (diff)
merge with default branch
Diffstat (limited to 'Eigen/Core')
-rw-r--r--Eigen/Core21
1 files changed, 21 insertions, 0 deletions
diff --git a/Eigen/Core b/Eigen/Core
index a508b97f6..d0f0adbe4 100644
--- a/Eigen/Core
+++ b/Eigen/Core
@@ -14,6 +14,27 @@
// first thing Eigen does: stop the compiler from committing suicide
#include "src/Core/util/DisableStupidWarnings.h"
+// Handle NVCC/CUDA
+#ifdef __CUDACC__
+ // Do not try asserts on CUDA!
+ #define EIGEN_NO_DEBUG
+ // Do not try to vectorize on CUDA!
+ #define EIGEN_DONT_VECTORIZE
+
+ // All functions callable from CUDA code must be qualified with __device__
+ #define EIGEN_DEVICE_FUNC __host__ __device__
+
+#else
+ #define EIGEN_DEVICE_FUNC
+
+#endif
+
+#if defined(__CUDA_ARCH__)
+ #define EIGEN_USING_STD_MATH(FUNC) using ::FUNC;
+#else
+ #define EIGEN_USING_STD_MATH(FUNC) using std::FUNC;
+#endif
+
// then include this file where all our macros are defined. It's really important to do it first because
// it's where we do all the alignment settings (platform detection and honoring the user's will if he
// defined e.g. EIGEN_DONT_ALIGN) so it needs to be done before we do anything with vectorization.