[PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL 1.2/2.0 header files.

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 31 10:26:35 PDT 2016


yaxunl added a comment.

> Rather than having a separate header for each version with another header for the common parts, couldn't we just have a single header that uses #if guards for the version specific functionality? e.g.

> 

>   size_t __attribute__((overloadable)) get_global_id(uint dim);

>   

>   #if __OPENCL_C_VERSION__ >= 200

>   size_t __attribute__((overloadable)) get_global_linear_id(void);

>   #endif

> 

> 

> This also allows an easy path for having OpenCL 1.1 and 1.0 support without having to add more copies of the header.


I think it is a good idea. It simplifies the file names and organization.


http://reviews.llvm.org/D18369





More information about the cfe-commits mailing list