cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

akumar8
Journeyman III

atomic add 64-bit problem

Use of atomic_add for "int" work fine but, throws following error when used for "long int"

/tmp/OCLt2TJtm.cl(33): error: function "atom_add" declared implicitly

When any of the following line is include in the source code

#pragma OPENCL EXTENSION cl_khr_global_int64_base_atomics : enable
#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable

new error of the form shown below is thrown

/tmp/OCLt2TJtm.cl(9): error: can't enable all OpenCL extensions or
          unrecognized OpenCL extension
  #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable

I have installed APP-SDK-2.4 on 64-bit Ubuntu.

0 Likes
4 Replies

64bit atomics are not supported on the device you are attempting to compile for, so it is failing with an error.
0 Likes

Thank you.

That means it is not possible to perform 64 bit atomics on any of the ATI Radeon HD 5xxx or 6xxx series devices. Please correct me if wrong. I have no idea about the devices.

0 Likes

These devices do not support 64bit atomics. You can query what a device supports with the OpenCL api with the clGetDeviceInfo query. I believe we also state this information in the programming guide.
0 Likes

Thanks. Found it in the programming guide about 5xxx series.

0 Likes