<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 26, 2015 at 11:03 AM, Tom Stellard <span dir="ltr"><<a href="mailto:thomas.stellard@amd.com" target="_blank">thomas.stellard@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 02/25/2015 07:16 PM, Aaron Watry wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Tue, Feb 24, 2015 at 10:20 AM, Tom Stellard <<a href="mailto:thomas.stellard@amd.com" target="_blank">thomas.stellard@amd.com</a><br></span><span class="">
<mailto:<a href="mailto:thomas.stellard@amd.com" target="_blank">thomas.stellard@amd.<u></u>com</a>>> wrote:<br>
<br>
    This is how they are defined by the spec.<br>
<br>
<br>
The only wording that I see in the CL 1.1 and CL 1.2 specs is as such:<br>
"<br>
NOTE: The atomic built-in functions that use the atom_ prefix and are<br>
described by the<br>
following extensions<br>
cl_khr_global_int32_base_<u></u>atomics<br>
cl_khr_global_int32_extended_<u></u>atomics<br>
cl_khr_local_int32_base_<u></u>atomics<br>
cl_khr_local_int32_extended_<u></u>atomics<br>
in sections 9.5 and 9.6 of the OpenCL 1.0 specification are also supported.<br>
"<br>
<br>
But in looking at the CL1.0 spec, none of the atom_* functions declare<br>
their arguments as volatile pointers.<br>
<br>
I'm not necessarily against this change, I just wanted to point out the<br>
inconsistency in case it would cause us problems later.<br>
<br>
</span></blockquote>
<br>
Thanks for pointing this out.  I was looking at the 64-bit versions<br>
in the 1.1 spec that do have the volatile keyword.  I think this<br>
is probably an oversight in the spec, but you are right, I can't find<br>
anything that says the 32-bit atom_* functions have the volatile keyword.<br>
<br>
-Tom<br></blockquote><div><br></div><div>I agree that this is probably an oversight.  Is there anyone at Khronos we can ping for clarification?<br><br></div><div>Otherwise, we can defer to whatever other CL run-times (catalyst/nvidia) do in similar situations (if they agree on an implementation).<br></div><div><br></div><div>--Aaron<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Are we meant to assume that the atom_* functions are just aliased<br>
versions of the atomic_* functions, or should there be an actual<br>
difference between them?<br>
<br>
--Aaron<br>
<br>
    ---<br>
      generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_add.h<br>
      | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_cmpxchg.h | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_dec.h<br>
      | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_inc.h<br>
      | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_sub.h<br>
      | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_xchg.h<br>
       | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_and.h | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_max.h | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_min.h | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_or.h  | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_xor.h | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>add.h<br>
       | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>cmpxchg.h  | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>dec.h<br>
       | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>inc.h<br>
       | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>sub.h<br>
       | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>xchg.h<br>
      | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_and.h  | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_max.h  | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_min.h  | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_or.h<br>
      | 4 ++--<br>
      generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_xor.h  | 4 ++--<br>
      generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_add.cl" target="_blank">atom_add.cl</a><br></div></div>
    <<a href="http://atom_add.cl" target="_blank">http://atom_add.cl</a>>            | 2 +-<br>
      generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_cmpxchg.cl" target="_blank">atom_<u></u>cmpxchg.cl</a><br>
    <<a href="http://atom_cmpxchg.cl" target="_blank">http://atom_cmpxchg.cl</a>>        | 2 +-<br>
      generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_dec.cl" target="_blank">atom_dec.cl</a><br>
    <<a href="http://atom_dec.cl" target="_blank">http://atom_dec.cl</a>>            | 2 +-<br>
      generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_inc.cl" target="_blank">atom_inc.cl</a><br>
    <<a href="http://atom_inc.cl" target="_blank">http://atom_inc.cl</a>>            | 2 +-<br>
      generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_sub.cl" target="_blank">atom_sub.cl</a><br>
    <<a href="http://atom_sub.cl" target="_blank">http://atom_sub.cl</a>>            | 2 +-<br>
      generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_xchg.cl" target="_blank">atom_xchg.<u></u>cl</a><br>
    <<a href="http://atom_xchg.cl" target="_blank">http://atom_xchg.cl</a>>           | 2 +-<br>
      generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_and.cl" target="_blank">atom_<u></u>and.cl</a><br>
    <<a href="http://atom_and.cl" target="_blank">http://atom_and.cl</a>>        | 4 ++--<br>
      generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_max.cl" target="_blank">atom_<u></u>max.cl</a><br>
    <<a href="http://atom_max.cl" target="_blank">http://atom_max.cl</a>>        | 2 +-<br>
      generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_min.cl" target="_blank">atom_<u></u>min.cl</a><br>
    <<a href="http://atom_min.cl" target="_blank">http://atom_min.cl</a>>        | 2 +-<br>
      generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_or.cl" target="_blank">atom_<u></u>or.cl</a><br>
    <<a href="http://atom_or.cl" target="_blank">http://atom_or.cl</a>>         | 2 +-<br>
      generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_<u></u>xor.cl</a><br>
    <<a href="http://atom_xor.cl" target="_blank">http://atom_xor.cl</a>>        | 2 +-<br>
      generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_add.cl" target="_blank">atom_add.cl</a><br>
    <<a href="http://atom_add.cl" target="_blank">http://atom_add.cl</a>>             | 2 +-<br>
      generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_cmpxchg.cl" target="_blank">atom_<u></u>cmpxchg.cl</a><br>
    <<a href="http://atom_cmpxchg.cl" target="_blank">http://atom_cmpxchg.cl</a>>         | 2 +-<br>
      generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_dec.cl" target="_blank">atom_dec.cl</a><br>
    <<a href="http://atom_dec.cl" target="_blank">http://atom_dec.cl</a>>             | 2 +-<br>
      generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_inc.cl" target="_blank">atom_inc.cl</a><br>
    <<a href="http://atom_inc.cl" target="_blank">http://atom_inc.cl</a>>             | 2 +-<br>
      generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_sub.cl" target="_blank">atom_sub.cl</a><br>
    <<a href="http://atom_sub.cl" target="_blank">http://atom_sub.cl</a>>             | 2 +-<br>
      generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_xchg.cl" target="_blank">atom_xchg.<u></u>cl</a><br>
    <<a href="http://atom_xchg.cl" target="_blank">http://atom_xchg.cl</a>>            | 2 +-<br>
      generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_and.cl" target="_blank">atom_<u></u>and.cl</a><br>
    <<a href="http://atom_and.cl" target="_blank">http://atom_and.cl</a>>         | 4 ++--<br>
      generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_max.cl" target="_blank">atom_<u></u>max.cl</a><br>
    <<a href="http://atom_max.cl" target="_blank">http://atom_max.cl</a>>         | 2 +-<br>
      generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_min.cl" target="_blank">atom_<u></u>min.cl</a><br>
    <<a href="http://atom_min.cl" target="_blank">http://atom_min.cl</a>>         | 2 +-<br>
      generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_or.cl" target="_blank">atom_<u></u>or.cl</a><br>
    <<a href="http://atom_or.cl" target="_blank">http://atom_or.cl</a>>          | 2 +-<br>
      generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_<u></u>xor.cl</a><br>
    <<a href="http://atom_xor.cl" target="_blank">http://atom_xor.cl</a>>         | 2 +-<div><div class="h5"><br>
      44 files changed, 68 insertions(+), 68 deletions(-)<br>
<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_add.h<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_add.h<br>
    index 9740b3d..10602c7 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_add.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_add.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_add(global int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_add(global unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_add(volatile global int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_add(volatile global<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_cmpxchg.h b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_cmpxchg.h<br>
    index 168f423..d84a9eb 100644<br>
    ---<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_cmpxchg.h<br>
    +++<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_cmpxchg.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg(global int *p, int cmp,<br>
    int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_cmpxchg(global unsigned<br>
    int *p, unsigned int cmp, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg(volatile global int *p,<br>
    int cmp, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_cmpxchg(volatile global<br>
    unsigned int *p, unsigned int cmp, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_dec.h<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_dec.h<br>
    index bbc872c..d3c1c45 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_dec.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_dec.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_dec(global int *p);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_dec(global unsigned int *p);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_dec(volatile global int *p);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_dec(volatile global<br>
    unsigned int *p);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_inc.h<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_inc.h<br>
    index 050747c..712374d 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_inc.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_inc.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_inc(global int *p);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_inc(global unsigned int *p);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_inc(volatile global int *p);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_inc(volatile global<br>
    unsigned int *p);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_sub.h<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_sub.h<br>
    index c435c72..b065db9 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_sub.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_sub.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_sub(global int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_sub(global unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_sub(volatile global int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_sub(volatile global<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_xchg.h<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_xchg.h<br>
    index 6a18e9e..0493b85 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_xchg.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>global_int32_base_atomics/<u></u>atom_xchg.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_xchg(global int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_xchg(global unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_xchg(volatile global int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_xchg(volatile global<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_and.h b/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_and.h<br>
    index 19df7d6..2364fe9 100644<br>
    ---<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_and.h<br>
    +++<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_and.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_and(global int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_and(global unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_and(volatile global int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_and(volatile global<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_max.h b/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_max.h<br>
    index b46ce29..4e876da 100644<br>
    ---<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_max.h<br>
    +++<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_max.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_max(global int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_max(global unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_max(volatile global int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_max(volatile global<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_min.h b/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_min.h<br>
    index 0e458eb..46b8b83 100644<br>
    ---<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_min.h<br>
    +++<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_min.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_min(global int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_min(global unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_min(volatile global int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_min(volatile global<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_or.h<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_or.h<br>
    index 91cde56..d1e924d 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_or.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_or.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_or(global int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_or(global unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_or(volatile global int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_or(volatile global<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_xor.h b/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_xor.h<br>
    index f787849..9646c87 100644<br>
    ---<br>
    a/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_xor.h<br>
    +++<br>
    b/generic/include/clc/cl_khr_<u></u>global_int32_extended_atomics/<u></u>atom_xor.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_xor(global int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_xor(global unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_xor(volatile global int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_xor(volatile global<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>add.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>add.h<br>
    index 096d011..8999920 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>add.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>add.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_add(local int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_add(local unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_add(volatile local int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_add(volatile local<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>cmpxchg.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>cmpxchg.h<br>
    index e10a84f..c967d36 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>cmpxchg.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>cmpxchg.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg(local int *p, int cmp, int<br>
    val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_cmpxchg(local unsigned<br>
    int *p, unsigned int cmp, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg(volatile local int *p, int<br>
    cmp, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_cmpxchg(volatile local<br>
    unsigned int *p, unsigned int cmp, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>dec.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>dec.h<br>
    index e74d8fc..7bb33c9 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>dec.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>dec.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_dec(local int *p);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_dec(local unsigned int *p);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_dec(volatile local int *p);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_dec(volatile local<br>
    unsigned int *p);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>inc.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>inc.h<br>
    index 718f1f2..96e6f30 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>inc.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>inc.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_inc(local int *p);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_inc(local unsigned int *p);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_inc(volatile local int *p);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_inc(volatile local<br>
    unsigned int *p);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>sub.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>sub.h<br>
    index 6363780..0228fa4 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>sub.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>sub.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_sub(local int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_sub(local unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_sub(volatile local int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_sub(volatile local<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>xchg.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>xchg.h<br>
    index c5a1f09..e530158 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>xchg.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_base_atomics/atom_<u></u>xchg.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_xchg(local int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_xchg(local unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_xchg(volatile local int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_xchg(volatile local<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_and.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_and.h<br>
    index 96d7b1a..0af8194 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_and.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_and.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_and(local int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_and(local unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_and(volatile local int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_and(volatile local<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_max.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_max.h<br>
    index 7d6b17d..e3b23dd 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_max.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_max.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_max(local int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_max(local unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_max(volatile local int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_max(volatile local<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_min.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_min.h<br>
    index ddb6cf3..ec11c96 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_min.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_min.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_min(local int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_min(local unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_min(volatile local int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_min(volatile local<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_or.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_or.h<br>
    index 518c256..abd8ac4 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_or.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_or.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_or(local int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_or(local unsigned int *p,<br>
    unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_or(volatile local int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_or(volatile local<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_xor.h<br>
    b/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_xor.h<br>
    index e6c9f2f..fedf128 100644<br>
    --- a/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_xor.h<br>
    +++ b/generic/include/clc/cl_khr_<u></u>local_int32_extended_atomics/<u></u>atom_xor.h<br>
    @@ -1,2 +1,2 @@<br>
    -_CLC_OVERLOAD _CLC_DECL int atom_xor(local int *p, int val);<br>
    -_CLC_OVERLOAD _CLC_DECL unsigned int atom_xor(local unsigned int<br>
    *p, unsigned int val);<br>
    +_CLC_OVERLOAD _CLC_DECL int atom_xor(volatile local int *p, int val);<br>
    +_CLC_OVERLOAD _CLC_DECL unsigned int atom_xor(volatile local<br>
    unsigned int *p, unsigned int val);<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_add.cl" target="_blank">atom_add.cl</a><br></div></div>
    <<a href="http://atom_add.cl" target="_blank">http://atom_add.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_add.cl" target="_blank">atom_add.cl</a><br>
    <<a href="http://atom_add.cl" target="_blank">http://atom_add.cl</a>><span class=""><br>
    index 9151b0c..c0c14d3 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_add.cl" target="_blank">atom_add.cl</a><br></span>
    <<a href="http://atom_add.cl" target="_blank">http://atom_add.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_add.cl" target="_blank">atom_add.cl</a><br>
    <<a href="http://atom_add.cl" target="_blank">http://atom_add.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_add(global TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_add(volatile global TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_add(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_cmpxchg.cl" target="_blank">atom_<u></u>cmpxchg.cl</a><br></span>
    <<a href="http://atom_cmpxchg.cl" target="_blank">http://atom_cmpxchg.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_cmpxchg.cl" target="_blank">atom_<u></u>cmpxchg.cl</a><br>
    <<a href="http://atom_cmpxchg.cl" target="_blank">http://atom_cmpxchg.cl</a>><span class=""><br>
    index 7647740..becf767 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_cmpxchg.cl" target="_blank">atom_<u></u>cmpxchg.cl</a><br></span>
    <<a href="http://atom_cmpxchg.cl" target="_blank">http://atom_cmpxchg.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_cmpxchg.cl" target="_blank">atom_<u></u>cmpxchg.cl</a><br>
    <<a href="http://atom_cmpxchg.cl" target="_blank">http://atom_cmpxchg.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_cmpxchg(global TYPE *p, TYPE cmp,<br>
    TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_cmpxchg(volatile global TYPE *p,<br>
    TYPE cmp, TYPE val) { \<br>
        return atomic_cmpxchg(p, cmp, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_dec.cl" target="_blank">atom_dec.cl</a><br></span>
    <<a href="http://atom_dec.cl" target="_blank">http://atom_dec.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_dec.cl" target="_blank">atom_dec.cl</a><br>
    <<a href="http://atom_dec.cl" target="_blank">http://atom_dec.cl</a>><span class=""><br>
    index a74158d..6d274d6 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_dec.cl" target="_blank">atom_dec.cl</a><br></span>
    <<a href="http://atom_dec.cl" target="_blank">http://atom_dec.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_dec.cl" target="_blank">atom_dec.cl</a><br>
    <<a href="http://atom_dec.cl" target="_blank">http://atom_dec.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_dec(global TYPE *p) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_dec(volatile global TYPE *p) { \<br>
        return atom_sub(p, 1); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_inc.cl" target="_blank">atom_inc.cl</a><br></span>
    <<a href="http://atom_inc.cl" target="_blank">http://atom_inc.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_inc.cl" target="_blank">atom_inc.cl</a><br>
    <<a href="http://atom_inc.cl" target="_blank">http://atom_inc.cl</a>><span class=""><br>
    index 1404b5a..9772777 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_inc.cl" target="_blank">atom_inc.cl</a><br></span>
    <<a href="http://atom_inc.cl" target="_blank">http://atom_inc.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_inc.cl" target="_blank">atom_inc.cl</a><br>
    <<a href="http://atom_inc.cl" target="_blank">http://atom_inc.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_inc(global TYPE *p) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_inc(volatile global TYPE *p) { \<br>
        return atom_add(p, 1); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_sub.cl" target="_blank">atom_sub.cl</a><br></span>
    <<a href="http://atom_sub.cl" target="_blank">http://atom_sub.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_sub.cl" target="_blank">atom_sub.cl</a><br>
    <<a href="http://atom_sub.cl" target="_blank">http://atom_sub.cl</a>><span class=""><br>
    index 7faa3cc..772fca8 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_sub.cl" target="_blank">atom_sub.cl</a><br></span>
    <<a href="http://atom_sub.cl" target="_blank">http://atom_sub.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_sub.cl" target="_blank">atom_sub.cl</a><br>
    <<a href="http://atom_sub.cl" target="_blank">http://atom_sub.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_sub(global TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_sub(volatile global TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_sub(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_xchg.cl" target="_blank">atom_xchg.<u></u>cl</a><br></span>
    <<a href="http://atom_xchg.cl" target="_blank">http://atom_xchg.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_xchg.cl" target="_blank">atom_xchg.<u></u>cl</a><br>
    <<a href="http://atom_xchg.cl" target="_blank">http://atom_xchg.cl</a>><span class=""><br>
    index 9c77db1..eb1fdcc 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_xchg.cl" target="_blank">atom_xchg.<u></u>cl</a><br></span>
    <<a href="http://atom_xchg.cl" target="_blank">http://atom_xchg.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_base_atomics/<a href="http://atom_xchg.cl" target="_blank">atom_xchg.<u></u>cl</a><br>
    <<a href="http://atom_xchg.cl" target="_blank">http://atom_xchg.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_xchg(global TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_xchg(volatile global TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_xchg(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_and.cl" target="_blank">atom_<u></u>and.cl</a><br></span>
    <<a href="http://atom_and.cl" target="_blank">http://atom_and.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_and.cl" target="_blank">atom_<u></u>and.cl</a><br>
    <<a href="http://atom_and.cl" target="_blank">http://atom_and.cl</a>><span class=""><br>
    index e587969..e7d70ea 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_and.cl" target="_blank">atom_<u></u>and.cl</a><br></span>
    <<a href="http://atom_and.cl" target="_blank">http://atom_and.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_and.cl" target="_blank">atom_<u></u>and.cl</a><br>
    <<a href="http://atom_and.cl" target="_blank">http://atom_and.cl</a>><span class=""><br>
    @@ -1,9 +1,9 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_and(global TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_and(volatile global TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_and(p, val); \<br>
      }<br>
<br>
      IMPL(int)<br>
    -IMPL(unsigned int)<br>
    \ No newline at end of file<br>
    +IMPL(unsigned int)<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_max.cl" target="_blank">atom_<u></u>max.cl</a><br></span>
    <<a href="http://atom_max.cl" target="_blank">http://atom_max.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_max.cl" target="_blank">atom_<u></u>max.cl</a><br>
    <<a href="http://atom_max.cl" target="_blank">http://atom_max.cl</a>><span class=""><br>
    index 09177ed..a741b18 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_max.cl" target="_blank">atom_<u></u>max.cl</a><br></span>
    <<a href="http://atom_max.cl" target="_blank">http://atom_max.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_max.cl" target="_blank">atom_<u></u>max.cl</a><br>
    <<a href="http://atom_max.cl" target="_blank">http://atom_max.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_max(global TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_max(volatile global TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_max(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_min.cl" target="_blank">atom_<u></u>min.cl</a><br></span>
    <<a href="http://atom_min.cl" target="_blank">http://atom_min.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_min.cl" target="_blank">atom_<u></u>min.cl</a><br>
    <<a href="http://atom_min.cl" target="_blank">http://atom_min.cl</a>><span class=""><br>
    index 277c41b..f996526 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_min.cl" target="_blank">atom_<u></u>min.cl</a><br></span>
    <<a href="http://atom_min.cl" target="_blank">http://atom_min.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_min.cl" target="_blank">atom_<u></u>min.cl</a><br>
    <<a href="http://atom_min.cl" target="_blank">http://atom_min.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_min(global TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_min(volatile global TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_min(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_or.cl" target="_blank">atom_<u></u>or.cl</a><br></span>
    <<a href="http://atom_or.cl" target="_blank">http://atom_or.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_or.cl" target="_blank">atom_<u></u>or.cl</a><br>
    <<a href="http://atom_or.cl" target="_blank">http://atom_or.cl</a>><span class=""><br>
    index a936a8e..810d669 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_or.cl" target="_blank">atom_<u></u>or.cl</a><br></span>
    <<a href="http://atom_or.cl" target="_blank">http://atom_or.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_or.cl" target="_blank">atom_<u></u>or.cl</a><br>
    <<a href="http://atom_or.cl" target="_blank">http://atom_or.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_or(global TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_or(volatile global TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_or(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_<u></u>xor.cl</a><br></span>
    <<a href="http://atom_xor.cl" target="_blank">http://atom_xor.cl</a>><br>
    b/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_<u></u>xor.cl</a><br>
    <<a href="http://atom_xor.cl" target="_blank">http://atom_xor.cl</a>><span class=""><br>
    index 1a8e350..9dc5803 100644<br>
    --- a/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_<u></u>xor.cl</a><br></span>
    <<a href="http://atom_xor.cl" target="_blank">http://atom_xor.cl</a>><br>
    +++ b/generic/lib/cl_khr_global_<u></u>int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_<u></u>xor.cl</a><br>
    <<a href="http://atom_xor.cl" target="_blank">http://atom_xor.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_xor(global TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_xor(volatile global TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_xor(p, val); \<br>
      }<br>
<br>
    diff --git a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_add.cl" target="_blank">atom_add.cl</a><br></span>
    <<a href="http://atom_add.cl" target="_blank">http://atom_add.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_add.cl" target="_blank">atom_add.cl</a><br>
    <<a href="http://atom_add.cl" target="_blank">http://atom_add.cl</a>><span class=""><br>
    index a5dea18..3ad364d 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_add.cl" target="_blank">atom_add.cl</a><br></span>
    <<a href="http://atom_add.cl" target="_blank">http://atom_add.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_add.cl" target="_blank">atom_add.cl</a><br>
    <<a href="http://atom_add.cl" target="_blank">http://atom_add.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_add(local TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_add(volatile local TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_add(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_cmpxchg.cl" target="_blank">atom_<u></u>cmpxchg.cl</a><br></span>
    <<a href="http://atom_cmpxchg.cl" target="_blank">http://atom_cmpxchg.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_cmpxchg.cl" target="_blank">atom_<u></u>cmpxchg.cl</a><br>
    <<a href="http://atom_cmpxchg.cl" target="_blank">http://atom_cmpxchg.cl</a>><span class=""><br>
    index 16e9579..ea648f0 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_cmpxchg.cl" target="_blank">atom_<u></u>cmpxchg.cl</a><br></span>
    <<a href="http://atom_cmpxchg.cl" target="_blank">http://atom_cmpxchg.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_cmpxchg.cl" target="_blank">atom_<u></u>cmpxchg.cl</a><br>
    <<a href="http://atom_cmpxchg.cl" target="_blank">http://atom_cmpxchg.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_cmpxchg(local TYPE *p, TYPE cmp,<br>
    TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_cmpxchg(volatile local TYPE *p,<br>
    TYPE cmp, TYPE val) { \<br>
        return atomic_cmpxchg(p, cmp, val); \<br>
      }<br>
<br>
    diff --git a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_dec.cl" target="_blank">atom_dec.cl</a><br></span>
    <<a href="http://atom_dec.cl" target="_blank">http://atom_dec.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_dec.cl" target="_blank">atom_dec.cl</a><br>
    <<a href="http://atom_dec.cl" target="_blank">http://atom_dec.cl</a>><span class=""><br>
    index d22c333..fd5fac8 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_dec.cl" target="_blank">atom_dec.cl</a><br></span>
    <<a href="http://atom_dec.cl" target="_blank">http://atom_dec.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_dec.cl" target="_blank">atom_dec.cl</a><br>
    <<a href="http://atom_dec.cl" target="_blank">http://atom_dec.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_dec(local TYPE *p) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_dec(volatile local TYPE *p) { \<br>
        return atom_sub(p, 1); \<br>
      }<br>
<br>
    diff --git a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_inc.cl" target="_blank">atom_inc.cl</a><br></span>
    <<a href="http://atom_inc.cl" target="_blank">http://atom_inc.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_inc.cl" target="_blank">atom_inc.cl</a><br>
    <<a href="http://atom_inc.cl" target="_blank">http://atom_inc.cl</a>><span class=""><br>
    index 4ba0d06..7c57daa 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_inc.cl" target="_blank">atom_inc.cl</a><br></span>
    <<a href="http://atom_inc.cl" target="_blank">http://atom_inc.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_inc.cl" target="_blank">atom_inc.cl</a><br>
    <<a href="http://atom_inc.cl" target="_blank">http://atom_inc.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_inc(local TYPE *p) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_inc(volatile local TYPE *p) { \<br>
        return atom_add(p, 1); \<br>
      }<br>
<br>
    diff --git a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_sub.cl" target="_blank">atom_sub.cl</a><br></span>
    <<a href="http://atom_sub.cl" target="_blank">http://atom_sub.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_sub.cl" target="_blank">atom_sub.cl</a><br>
    <<a href="http://atom_sub.cl" target="_blank">http://atom_sub.cl</a>><span class=""><br>
    index c96696a..b5f64a1 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_sub.cl" target="_blank">atom_sub.cl</a><br></span>
    <<a href="http://atom_sub.cl" target="_blank">http://atom_sub.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_sub.cl" target="_blank">atom_sub.cl</a><br>
    <<a href="http://atom_sub.cl" target="_blank">http://atom_sub.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_sub(local TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_sub(volatile local TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_sub(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_xchg.cl" target="_blank">atom_xchg.<u></u>cl</a><br></span>
    <<a href="http://atom_xchg.cl" target="_blank">http://atom_xchg.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_xchg.cl" target="_blank">atom_xchg.<u></u>cl</a><br>
    <<a href="http://atom_xchg.cl" target="_blank">http://atom_xchg.cl</a>><span class=""><br>
    index 7d4bcca..f2007d8 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_xchg.cl" target="_blank">atom_xchg.<u></u>cl</a><br></span>
    <<a href="http://atom_xchg.cl" target="_blank">http://atom_xchg.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_base_atomics/<a href="http://atom_xchg.cl" target="_blank">atom_xchg.<u></u>cl</a><br>
    <<a href="http://atom_xchg.cl" target="_blank">http://atom_xchg.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_xchg(local TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_xchg(volatile local TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_xchg(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_and.cl" target="_blank">atom_<u></u>and.cl</a><br></span>
    <<a href="http://atom_and.cl" target="_blank">http://atom_and.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_and.cl" target="_blank">atom_<u></u>and.cl</a><br>
    <<a href="http://atom_and.cl" target="_blank">http://atom_and.cl</a>><span class=""><br>
    index 180103a..7e97ad1 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_and.cl" target="_blank">atom_<u></u>and.cl</a><br></span>
    <<a href="http://atom_and.cl" target="_blank">http://atom_and.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_and.cl" target="_blank">atom_<u></u>and.cl</a><br>
    <<a href="http://atom_and.cl" target="_blank">http://atom_and.cl</a>><span class=""><br>
    @@ -1,9 +1,9 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_and(local TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_and(volatile local TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_and(p, val); \<br>
      }<br>
<br>
      IMPL(int)<br>
    -IMPL(unsigned int)<br>
    \ No newline at end of file<br>
    +IMPL(unsigned int)<br>
    diff --git<br>
    a/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_max.cl" target="_blank">atom_<u></u>max.cl</a><br></span>
    <<a href="http://atom_max.cl" target="_blank">http://atom_max.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_max.cl" target="_blank">atom_<u></u>max.cl</a><br>
    <<a href="http://atom_max.cl" target="_blank">http://atom_max.cl</a>><span class=""><br>
    index b90301b..c019646 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_max.cl" target="_blank">atom_<u></u>max.cl</a><br></span>
    <<a href="http://atom_max.cl" target="_blank">http://atom_max.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_max.cl" target="_blank">atom_<u></u>max.cl</a><br>
    <<a href="http://atom_max.cl" target="_blank">http://atom_max.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_max(local TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_max(volatile local TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_max(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_min.cl" target="_blank">atom_<u></u>min.cl</a><br></span>
    <<a href="http://atom_min.cl" target="_blank">http://atom_min.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_min.cl" target="_blank">atom_<u></u>min.cl</a><br>
    <<a href="http://atom_min.cl" target="_blank">http://atom_min.cl</a>><span class=""><br>
    index 3acedd8..77482f7 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_min.cl" target="_blank">atom_<u></u>min.cl</a><br></span>
    <<a href="http://atom_min.cl" target="_blank">http://atom_min.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_min.cl" target="_blank">atom_<u></u>min.cl</a><br>
    <<a href="http://atom_min.cl" target="_blank">http://atom_min.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_min(local TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_min(volatile local TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_min(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_or.cl" target="_blank">atom_<u></u>or.cl</a><br></span>
    <<a href="http://atom_or.cl" target="_blank">http://atom_or.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_or.cl" target="_blank">atom_<u></u>or.cl</a><br>
    <<a href="http://atom_or.cl" target="_blank">http://atom_or.cl</a>><span class=""><br>
    index 338ff2c..d9a12c7 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_or.cl" target="_blank">atom_<u></u>or.cl</a><br></span>
    <<a href="http://atom_or.cl" target="_blank">http://atom_or.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_or.cl" target="_blank">atom_<u></u>or.cl</a><br>
    <<a href="http://atom_or.cl" target="_blank">http://atom_or.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_or(local TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_or(volatile local TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_or(p, val); \<br>
      }<br>
<br>
    diff --git<br>
    a/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_<u></u>xor.cl</a><br></span>
    <<a href="http://atom_xor.cl" target="_blank">http://atom_xor.cl</a>><br>
    b/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_<u></u>xor.cl</a><br>
    <<a href="http://atom_xor.cl" target="_blank">http://atom_xor.cl</a>><span class=""><br>
    index 51ae3c0..ee40bff 100644<br>
    --- a/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_<u></u>xor.cl</a><br></span>
    <<a href="http://atom_xor.cl" target="_blank">http://atom_xor.cl</a>><br>
    +++ b/generic/lib/cl_khr_local_<u></u>int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_<u></u>xor.cl</a><br>
    <<a href="http://atom_xor.cl" target="_blank">http://atom_xor.cl</a>><span class=""><br>
    @@ -1,7 +1,7 @@<br>
      #include <clc/clc.h><br>
<br>
      #define IMPL(TYPE) \<br>
    -_CLC_OVERLOAD _CLC_DEF TYPE atom_xor(local TYPE *p, TYPE val) { \<br>
    +_CLC_OVERLOAD _CLC_DEF TYPE atom_xor(volatile local TYPE *p, TYPE<br>
    val) { \<br>
        return atomic_xor(p, val); \<br>
      }<br>
<br>
    --<br>
    2.0.4<br>
<br>
<br>
    ______________________________<u></u>_________________<br>
    Libclc-dev mailing list<br></span>
    <a href="mailto:Libclc-dev@pcc.me.uk" target="_blank">Libclc-dev@pcc.me.uk</a> <mailto:<a href="mailto:Libclc-dev@pcc.me.uk" target="_blank">Libclc-dev@pcc.me.uk</a>><br>
    <a href="http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev" target="_blank">http://www.pcc.me.uk/cgi-bin/<u></u>mailman/listinfo/libclc-dev</a><br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br></div></div>