 |
Project
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
26 #define GPUPtr1(a, b) uint64_t b
28 #define GPUPtr2(a, b) ((__generic a) (a) b)
30 #define GPUPtr2(a, b) ((__global a) (a) b)
33 #define GPUPtr1(a, b) a b
34 #define GPUPtr2(a, b) b
37#define GPUCA_EVDUMP_FILE "event"
40 #define CA_MAKE_SHARED_REF(vartype, varname, varglobal, varshared) const GPUsharedref() vartype& __restrict__ varname = varshared;
41 #define CA_SHARED_STORAGE(storage) storage
42 #define CA_SHARED_CACHE(target, src, size) \
43 static_assert((size) % sizeof(int32_t) == 0, "Invalid shared cache size"); \
44 for (uint32_t i_shared_cache = get_local_id(0); i_shared_cache < (size) / sizeof(int32_t); i_shared_cache += get_local_size(0)) { \
45 reinterpret_cast<GPUsharedref() int32_t*>(target)[i_shared_cache] = reinterpret_cast<GPUglobalref() const int32_t*>(src)[i_shared_cache]; \
47 #define CA_SHARED_CACHE_REF(target, src, size, reftype, ref) \
48 CA_SHARED_CACHE(target, src, size) \
49 GPUsharedref() const reftype* __restrict__ ref = (target)
51 #define CA_MAKE_SHARED_REF(vartype, varname, varglobal, varshared) const GPUglobalref() vartype & __restrict__ varname = varglobal;
52 #define CA_SHARED_STORAGE(storage)
53 #define CA_SHARED_CACHE(target, src, size)
54 #define CA_SHARED_CACHE_REF(target, src, size, reftype, ref) GPUglobalref() const reftype* __restrict__ ref = src
63 #ifdef GPUCA_CADEBUG_ENABLED
64 #undef GPUCA_CADEBUG_ENABLED
66 #if GPUCA_CADEBUG == 1 && !defined(GPUCA_GPUCODE)
67 #define CADEBUG(...) __VA_ARGS__
68 #define CADEBUG2(cmd, ...) {__VA_ARGS__; cmd;}
69 #define GPUCA_CADEBUG_ENABLED
76 #define CADEBUG2(cmd, ...) {cmd;}