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

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 14:54:12 PDT 2016


yaxunl added a comment.

In http://reviews.llvm.org/D18369#385799, @Anastasia wrote:

> Regarding half types since there is inconsistency in both headers (commented in CL1.2), should we just enable the extension cl_khr_fp16 in the header and then have the overloads with half there with all the other types? They shouldn't be visible to custom code unless the same extension is enabled in the compiled cl file because half type itself won't be allowed without enabling it.


The 2.0 header uses #ifdef cl_khr_fp16 for half builtins, we could do the same for 1.2 headers.

> What about OpenCL 1.1 header? Ideally it would be nice to have them in too!


We can add it later after we done with 1.2 and 2.0 headers.

> Is there any chance we could factor out the common bits into separate files to avoid large code repetition? I would imagine it should be quite doable as libs of each standard contain incremental changes.


I saw some inconsistencies in the common part of the 1.2 and 2.0 headers. I will try to consolidate them first then try to split.

> Do you plan integrating it into the Clang driver too by automatic inclusion since it's not done with normal #include?


Yes.


http://reviews.llvm.org/D18369





More information about the cfe-commits mailing list