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

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Fri May 13 11:00:33 PDT 2016


Anastasia added inline comments.

================
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);
----------------
yaxunl wrote:
> 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.
> 
Not sure. I guess this way would work too.


http://reviews.llvm.org/D18369





More information about the cfe-commits mailing list