NVCC: EIGEN_NO_DEBUG must be defined before including Macro.h

This commit is contained in:
Gael Guennebaud 2013-02-21 19:05:23 +01:00
parent 968f7591f8
commit d93c1c113b

View File

@ -14,6 +14,18 @@
// first thing Eigen does: stop the compiler from committing suicide
#include "src/Core/util/DisableStupidWarnings.h"
// Handle NVCC/CUDA
#ifdef __CUDACC__
// Do not try to vectorize on CUDA!
#define EIGEN_DONT_VECTORIZE
// Do not try asserts on CUDA!
#define EIGEN_NO_DEBUG
// All functions callable from CUDA code must be qualified with __device__
#define EIGEN_DEVICE_FUNC __host__ __device__
#else
#define EIGEN_DEVICE_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.
@ -49,18 +61,6 @@
#endif
#endif
// Handle NVCC/CUDA
#ifdef __CUDACC__
// Do not try to vectorize on CUDA!
#define EIGEN_DONT_VECTORIZE
// Do not try asserts on CUDA!
#define EIGEN_NO_DEBUG
// All functions callable from CUDA code must be qualified with __device__
#define EIGEN_DEVICE_FUNC __host__ __device__
#else
#define EIGEN_DEVICE_FUNC
#endif
#ifndef EIGEN_DONT_VECTORIZE
#if defined (EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC) || defined(EIGEN_SSE2_ON_MSVC_2008_OR_LATER)