Je regardais this ANL Training video et ils montrent commentComment AVX-512CD (détection de conflit) diffère-t-il de l'accès aux variables atomiques?
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]++;
}
}
Et la boucle verctorized obtient. Avec l'instruction this.
Comment il est diferent de Atomics et est-il rentable pour espérer compter sur le soutien de la détection des conflits de compilateurs sur le niveau d'instruction (pour difrent enteties par exemple POD struct) à l'avenir?