[PATCH] Update atom_* function signatures to accept volatile pointers

This is how they are defined by the spec.

LGTM.

Jeroen

The only wording that I see in the CL 1.1 and CL 1.2 specs is as such:
"
NOTE: The atomic built-in functions that use the atom_ prefix and are
described by the
following extensions
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
in sections 9.5 and 9.6 of the OpenCL 1.0 specification are also supported.
"

But in looking at the CL1.0 spec, none of the atom_* functions declare
their arguments as volatile pointers.

I'm not necessarily against this change, I just wanted to point out the
inconsistency in case it would cause us problems later.

Are we meant to assume that the atom_* functions are just aliased versions
of the atomic_* functions, or should there be an actual difference between
them?

--Aaron

    This is how they are defined by the spec.

The only wording that I see in the CL 1.1 and CL 1.2 specs is as such:
"
NOTE: The atomic built-in functions that use the atom_ prefix and are
described by the
following extensions
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
in sections 9.5 and 9.6 of the OpenCL 1.0 specification are also supported.
"

But in looking at the CL1.0 spec, none of the atom_* functions declare
their arguments as volatile pointers.

I'm not necessarily against this change, I just wanted to point out the
inconsistency in case it would cause us problems later.

Thanks for pointing this out. I was looking at the 64-bit versions
in the 1.1 spec that do have the volatile keyword. I think this
is probably an oversight in the spec, but you are right, I can't find
anything that says the 32-bit atom_* functions have the volatile keyword.

-Tom

    This is how they are defined by the spec.

The only wording that I see in the CL 1.1 and CL 1.2 specs is as such:
"
NOTE: The atomic built-in functions that use the atom_ prefix and are
described by the
following extensions
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
in sections 9.5 and 9.6 of the OpenCL 1.0 specification are also
supported.
"

But in looking at the CL1.0 spec, none of the atom_* functions declare
their arguments as volatile pointers.

I'm not necessarily against this change, I just wanted to point out the
inconsistency in case it would cause us problems later.

Thanks for pointing this out. I was looking at the 64-bit versions
in the 1.1 spec that do have the volatile keyword. I think this
is probably an oversight in the spec, but you are right, I can't find
anything that says the 32-bit atom_* functions have the volatile keyword.

-Tom

I agree that this is probably an oversight. Is there anyone at Khronos we
can ping for clarification?

Otherwise, we can defer to whatever other CL run-times (catalyst/nvidia) do
in similar situations (if they agree on an implementation).

--Aaron