1 #ifndef BOTH_SMART_CBI_H_
2 #define BOTH_SMART_CBI_H_
5 /*----------------------------------------------------------------------*\
6 |* Pre-defined Compiler Macros *|
7 \*---------------------------------------------------------------------*/
9 // http://sourceforge.net/p/predef/wiki/Compilers/
11 // http://msdn.microsoft.com/en-us/library/b0084kay.aspx
12 // https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
13 // http://sourceforge.net/p/predef/wiki/Home/
16 // #if defined(_MSC_VER)
17 // #ifdef __CBI_CUDA__
19 /*----------------------------------------------------------------------*\
21 \*---------------------------------------------------------------------*/
23 /*--------------------------------------*\
25 \*-------------------------------------*/
34 // true for code in a .cu file, ie code compil with nvcc (host or device side)
35 // false for code in a .cpp file, meme si nvcc est le compilateur used
39 // Autoriser l'utilisation de code
40 // __device__ __host__
41 // sur le host, meme dans un fichier cpp
45 #define __BOTH__ __device__ __host__
46 #define __HOST__ __host__
54 //# warning __BOTH__ --> empty
55 //# warning __HOST__ --> empty
60 //#include "cuda_runtime.h"
61 //#include "code utilisant __host__.h"
65 /*----------------------------------------------------------------------*\
67 \*---------------------------------------------------------------------*/