[Patch][OpenCL] CL2.0 atomic types

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Mon Dec 15 08:41:39 PST 2014


Hi,

Looks good otherwise but (u)long and double atomics should
be enabled only if the cl_khr_int64_extended_atomics and
cl_khr_int64_base_atomics are enabled via #pragma,
if I read the specs correctly. The double atomics additionally
require that the target supports double.

Similar applies to the pointer (difference) types (for 64b
address space, they are supported only if the above extensions
are supported).

Related to this is the question whether we should ask from the
target if the optional extensions should be supported or not,
and not enable them unconditionally.

I suggest patching first for the non-extension types and
later add support for the #pragma (and hopefully a check
that allows customizing the support per target).

On 12/15/2014 05:21 PM, Anastasia Stulova wrote:
> Hello,
>
> This patch adds CL2.0 atomic types to Clang.
>
> Looking forward to your feedback,
>
> Anastasia

-- 
Pekka



More information about the cfe-commits mailing list