|
23 | 23 | //All host-functions in GPU code are automatically inlined, to avoid duplicate symbols. |
24 | 24 | //For non-inline host only functions, use no keyword at all! |
25 | 25 | #if !defined(GPUCA_GPUCODE) || defined(__OPENCL_HOST__) // For host / ROOT dictionary |
26 | | - #define GPUd() |
27 | | - #define GPUdDefault() |
28 | | - #define GPUdi() inline |
29 | | - #define GPUdii() |
30 | | - #define GPUh() |
31 | | - #define GPUhi() inline |
32 | | - #define GPUhd() |
33 | | - #define GPUhdi() inline |
34 | | - #define GPUhdni() |
35 | | - #define GPUg() INVALID_TRIGGER_ERROR_NO_HOST_CODE |
36 | | - #define GPUshared() |
37 | | - #define GPUglobal() |
38 | | - #define GPUconstant() |
39 | | - #define GPUconstexpr() static constexpr |
40 | | - #define GPUprivate() |
41 | | - #define GPUgeneric() |
42 | | - #define GPUbarrier() |
43 | | - #define GPUAtomic(type) type |
| 26 | + #define GPUd() // device function |
| 27 | + #define GPUdDefault() // default (constructor / operator) device function |
| 28 | + #define GPUdi() inline // to-be-inlined device function |
| 29 | + #define GPUdii() // Only on GPU to-be-inlined device function |
| 30 | + #define GPUh() // Host-only function |
| 31 | + #define GPUhi() inline // to-be-inlined host-only function |
| 32 | + #define GPUhd() // Host and device function, inlined during GPU compilation to avoid symbol clashes in host code |
| 33 | + #define GPUhdi() inline // Host and device function, to-be-inlined on host and device |
| 34 | + #define GPUhdni() // Host and device function, not to-be-inlined automatically |
| 35 | + #define GPUg() INVALID_TRIGGER_ERROR_NO_HOST_CODE // GPU kernel |
| 36 | + #define GPUshared() // shared memory variable declaration |
| 37 | + #define GPUglobal() // global memory variable declaration (only used for kernel input pointers) |
| 38 | + #define GPUconstant() // constant memory variable declaraion |
| 39 | + #define GPUconstexpr() static constexpr // constexpr on GPU that needs to be instantiated for dynamic access (e.g. arrays), becomes __constant on GPU |
| 40 | + #define GPUprivate() // private memory variable declaration |
| 41 | + #define GPUgeneric() // reference / ptr to generic address space |
| 42 | + #define GPUbarrier() // synchronize all GPU threads in block |
| 43 | + #define GPUAtomic(type) type // atomic variable type |
| 44 | + #define GPUsharedref() // reference / ptr to shared memory |
| 45 | + #define GPUglobalref() // reference / ptr to global memory |
| 46 | + #define GPUconstantref() // reference / ptr to constant memory |
| 47 | + #define GPUconstexprref() // reference / ptr to variable declared as GPUconstexpr() |
44 | 48 |
|
45 | 49 | struct float4 { float x, y, z, w; }; |
46 | 50 | struct float3 { float x, y, z; }; |
|
0 commit comments