[Patch][OpenCL] CL2.0 atomic types

Anastasia Stulova anastasia.stulova at arm.com
Tue Jan 13 09:57:46 PST 2015


I just realized this was lost sometime during holidays. :)

@Pekka, I don't have a fix for the extensions for the moment. Would it still
be ok if I commit this and we look into other bits later?

-----Original Message-----
From: Pekka Jääskeläinen [mailto:pekka.jaaskelainen at tut.fi] 
Sent: 15 December 2014 16:42
To: Anastasia Stulova; cfe-commits at cs.uiuc.edu
Subject: Re: [Patch][OpenCL] CL2.0 atomic types

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