(1) I should declare the array to be volatile, right?
(2) I should put #pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable in the top of the *.cl file, right?
What else should I do?
I use atomic_add(array + index, value), is it OK or should I use atomic_add(&array[index], value); instead?
I was confused because even if I use #pragma OPENCL EXTENSION cl_khr_int32_base_atomics : disable or #pragma OPENCL EXTENSION asdfsadfads : require it still compile… And I seem to receive some confusing result by atomic_add…