mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-18 14:34:17 +08:00
NVCC: EIGEN_NO_DEBUG must be defined before including Macro.h
This commit is contained in:
parent
968f7591f8
commit
d93c1c113b
24
Eigen/Core
24
Eigen/Core
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user