Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / BilatTools_Cuda / src / core / cudatools / header / both / both_define.h
1 #ifndef BOTH_SMART_CBI_H_
2 #define BOTH_SMART_CBI_H_
3
4
5 /*----------------------------------------------------------------------*\
6 |* Pre-defined Compiler Macros *|
7 \*---------------------------------------------------------------------*/
8
9 // http://sourceforge.net/p/predef/wiki/Compilers/
10
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/
14
15 // #ifdef __GNUC__
16 // #if defined(_MSC_VER)
17 // #ifdef __CBI_CUDA__
18
19 /*----------------------------------------------------------------------*\
20 |* Declaration *|
21 \*---------------------------------------------------------------------*/
22
23 /*--------------------------------------*\
24 |* Public *|
25 \*-------------------------------------*/
26
27 // Note
28 // Value of
29 //
30 // __CUDACC__
31 //
32 // is
33 //
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
36 //
37
38 // But:
39 // Autoriser l'utilisation de code
40 // __device__ __host__
41 // sur le host, meme dans un fichier cpp
42
43 #ifdef __CUDACC__
44
45 #define __BOTH__ __device__ __host__
46 #define __HOST__ __host__
47
48 #else
49
50 // vide
51 #define __BOTH__
52 #define __HOST__
53
54 //# warning __BOTH__ --> empty
55 //# warning __HOST__ --> empty
56
57 #endif
58
59 // A tester
60 //#include "cuda_runtime.h"
61 //#include "code utilisant __host__.h"
62
63 #endif
64
65 /*----------------------------------------------------------------------*\
66 |* End *|
67 \*---------------------------------------------------------------------*/