[OpenCL] Guard atomic_double with cl_khr_int64_*
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Wed, 16 Feb 2022 10:07:35 +0000 (10:07 +0000)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Wed, 16 Feb 2022 10:07:35 +0000 (10:07 +0000)
commit477bc8e8b9311fdac4c360b1fe7d29d0d10aac6c
tree1dce76669ed9fac72e804a6ee81cf6c91a5e6c23
parent1ccfef14e57e3ccdf9bb796142225dad8ae08168
[OpenCL] Guard atomic_double with cl_khr_int64_*

It is necessary to guard atomic_double type according to
https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_C.html#_footnotedef_54.
Platform that disable cl_khr_int64_base_atomics and
cl_khr_int64_extended_atomics will have compiling errors even if
atomic_double is not used.

Patch by Haonan Yang.

Differential Revision: https://reviews.llvm.org/D119398
clang/lib/Headers/opencl-c.h