Use __CUDA__ macro with __NVCC__. (#3539)

* __CUDA__ is defined in clang. Making the change won't make clang
compile xgboost, but syntax checking from clang is at least partially
working.
This commit is contained in:
trivialfis 2018-08-02 18:04:23 +08:00 committed by Rory Mitchell
parent 70026655b0
commit 34dc9155ab

View File

@ -69,7 +69,7 @@
/*!
* \brief Tag function as usable by device
*/
#ifdef __NVCC__
#if defined (__CUDA__) || defined(__NVCC__)
#define XGBOOST_DEVICE __host__ __device__
#else
#define XGBOOST_DEVICE