samedi 27 août 2016

how to parallelize this for-loop using reduction?

I am trying to make this for-loop parallelized by using Openmp, i recognized that there reduction in this loop so i added "#pragma omp parallel for reduction(+,ftab)",but it did not work and it gave me this error : error: user defined reduction not found for ‘ftab’.

   #pragma omp parallel for reduction(+:ftab)
    for (i = 1; i <= 65536; i++) ftab[i] += ftab[i-1];

Aucun commentaire:

Enregistrer un commentaire