Hi guys,

(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?

Thanks!