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

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 22 08:02:13 PDT 2016

yaxunl added a comment.

In http://reviews.llvm.org/D18369#408773, @bader wrote:

> BTW, there is a comment on GitHub that opencl.h might be a bad name for that header, since Khronos group provides the header with the same name, but it defines host API. So if some developer is using clang to compile OpenCL application it might accidentally include opencl.h provided with Clang instead of opencl.h with OpenCL host API.

Right. We'd better come up with another name. How about opencl-c.h?

Comment at: lib/Headers/opencl.h:4870
@@ +4869,3 @@
+#ifdef cl_khr_fp64
+char __const_func __attribute__((overloadable)) convert_char(double);
bader wrote:
> Sam, could you confirm that this macro id implicitly defined for OpenCL versions 1.2+?
AMDGPU target defines it. However, SPIR target does not. As discussed at cfe-dev, SPIR target should define all extensions/optional core features as supported. I will open a review for that.


More information about the cfe-commits mailing list