 |
Project
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
30 #define GPUPtr1(idx, a, b) uint64_t b
31 #define GPUPtr2(a, b) ((__generic a) (a) b)
32 #define GPUArg1(idx, a, b) a b
33#elif defined(__METAL__)
36 #define GPUPtr1(idx, a, b) constant uint64_t& b [[buffer(idx)]]
39 #define GPUPtr2(a, b) ((a)((device a)(b)))
40 #define GPUArg1(idx, a, b) constant a& b [[buffer(idx)]]
42 #define GPUPtr1(idx, a, b) a b
43 #define GPUPtr2(a, b) b
44 #define GPUArg1(idx, a, b) a b
47#define GPUCA_EVDUMP_FILE "event"
50 #define GPUCA_MAKE_SHARED_REF(vartype, varname, varglobal, varshared) const GPUsharedref() vartype& __restrict__ varname = varshared;
51 #define GPUCA_SHARED_STORAGE(storage) storage
52 #define GPUCA_SHARED_CACHE(target, src, size) \
53 static_assert((size) % sizeof(int32_t) == 0, "Invalid shared cache size"); \
54 for (uint32_t i_shared_cache = get_local_id(0); i_shared_cache < (size) / sizeof(int32_t); i_shared_cache += get_local_size(0)) { \
55 reinterpret_cast<GPUsharedref() int32_t*>(target)[i_shared_cache] = reinterpret_cast<GPUglobalref() const int32_t*>(src)[i_shared_cache]; \
57 #define GPUCA_SHARED_CACHE_REF(target, src, size, reftype, ref) \
58 GPUCA_SHARED_CACHE(target, src, size) \
59 GPUsharedref() const reftype* __restrict__ ref = (target)
61 #define GPUCA_MAKE_SHARED_REF(vartype, varname, varglobal, varshared) const GPUglobalref() vartype & __restrict__ varname = varglobal;
62 #define GPUCA_SHARED_STORAGE(storage)
63 #define GPUCA_SHARED_CACHE(target, src, size)
64 #define GPUCA_SHARED_CACHE_REF(target, src, size, reftype, ref) GPUglobalref() const reftype* __restrict__ ref = src
73 #if GPUCA_CADEBUG == 1 && !defined(GPUCA_GPUCODE)
74 #define CADEBUG(...) __VA_ARGS__
75 #define CADEBUG2(cmd, ...) {__VA_ARGS__; cmd;}
76 #define GPUCA_CADEBUG_ENABLED
83 #define CADEBUG2(cmd, ...) {cmd;}