[PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL header file.

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri May 13 07:45:30 PDT 2016


yaxunl marked 3 inline comments as done.

================
Comment at: lib/Headers/opencl-c.h:14057
@@ +14056,3 @@
+event_t __attribute__((overloadable)) async_work_group_copy(__local float2 *dst, const __global float2 *src, size_t num_elements, event_t event);
+event_t __attribute__((overloadable)) async_work_group_copy(__local char3 *dst, const __global char3 *src, size_t num_elements, event_t event);
+event_t __attribute__((overloadable)) async_work_group_copy(__local uchar3 *dst, const __global uchar3 *src, size_t num_elements, event_t event);
----------------
Anastasia wrote:
> yaxunl wrote:
> > If this representation is not generic enough. Any suggestion for an alternative? Thanks.
> I don't think Spec imposes any specific implementation of this macro.
> 
> I am thinking we might better leave it out to allow adding in a way suitable for other implementations.
How about this?

  #ifndef ATOMIC_VAR_INIT
  #define ATOMIC_VAR_INIT(x) (x)
  #endif

This way we have a default declaration and also allows user to override it.

Another way is to remove it from header and define it in Clang on target by target basis.



http://reviews.llvm.org/D18369





More information about the cfe-commits mailing list