So I was watching this ANL Training video and they show how
void Histogram ( const float* age, int* const hist, const int n, const float group_width, const int m) {
const float oogw = 1.0f / group_width;
// Populating the histogram.
for( int i = 0; i < n; i++) {
// Calculating the index of the bin age[i] goes to.
const int j = (int) ( age[i] * oogwflh );
// Incrementing the appropriate bin in the histogram.
hist[j]++;
}
}
And loop gets verctorized. With this instruction.
How it is diferent from atomics and is it resonable to expect to expect conflict detection support from compilers on instruction level (for difrent enteties e.g. POD structs) in future?