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

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 28 08:39:56 PDT 2021


Anastasia added inline comments.


================
Comment at: clang/lib/Headers/opencl-c.h:13678
+uintptr_t __ovld atomic_fetch_sub_explicit(volatile __local atomic_uintptr_t *object, ptrdiff_t operand, memory_order order, memory_scope scope);
+#endif
+#endif
----------------
airlied wrote:
> Anastasia wrote:
> > can we annotate `#endif` with a comment, please to improve readability? The same applies to other places.
> Isn't this the same problem we talked about before? how to annotate
> 
> #if defined(__opencl_c_generic_address_space)
> <decls>
> #else 
> <alt decls>
> #endif 
> 
> does it make sense to put //defined(__opencl_c_generic_address_space) on the endif?
Yes indeed!


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