[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

Anton Zabaznov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 28 03:02:24 PDT 2021


azabaznov added inline comments.


================
Comment at: clang/lib/Headers/opencl-c.h:13304
+#else
+void __ovld atomic_init(volatile __global atomic_int *object, int value);
+void __ovld atomic_init(volatile __local atomic_int *object, int value);
----------------
These new atomics with global and local pointer as argument were introduced only in OpenCL C 3.0 and have never been exposed in earlier versions, so I think you should guard them with //#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0)//


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106778/new/

https://reviews.llvm.org/D106778



More information about the cfe-commits mailing list