Skip to content

Commit 0c1e14e

Browse files
committed
GPU: Fix some OpenCL 1.2 warnings
1 parent 99d4fee commit 0c1e14e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GPU/Common/GPUDef.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// Macros for masking ptrs in OpenCL kernel calls as unsigned long (The API only allows us to pass buffer objects)
2525
#ifdef __OPENCL__
2626
#define GPUPtr1(a, b) unsigned long b
27-
#define GPUPtr2(a, b) ((__global a) b)
27+
#define GPUPtr2(a, b) ((__global a) (a) b)
2828
#else
2929
#define GPUPtr1(a, b) a b
3030
#define GPUPtr2(a, b) b
@@ -38,7 +38,7 @@
3838

3939
#ifdef GPUCA_GPUCODE
4040
#define CA_MAKE_SHARED_REF(vartype, varname, varglobal, varshared) const GPUsharedref() MEM_LOCAL(vartype) &varname = varshared;
41-
#define CA_SHARED_STORAGE(storage) storage;
41+
#define CA_SHARED_STORAGE(storage) storage
4242
#define CA_SHARED_CACHE(target, src, size) \
4343
static_assert((size) % sizeof(int) == 0, "Invalid shared cache size"); \
4444
for (unsigned int i_shared_cache = get_local_id(0); i_shared_cache < (size) / sizeof(int); i_shared_cache += get_local_size(0)) { \

0 commit comments

Comments
 (0)