Hi,

For example, given an integer array where every element is within [0..255], I want to get the number of repetitions of each value in [0..255].

__kernel void Histogram(__global int *arr, __global int *histo) {
int id = get_global_id(0);

histo[arr[id]]++;
}

Is it OK?

Thanks!