mercredi 27 septembre 2023

invalid controlling predicate (openMP)

i am currently using openMP to parallelize my program but i get stuck at this line :

#pragma omp parallel for schedule(dynamic)
for (long int i = 2; (i * i) <= high; i++) {
    if (ck[i] == true) {
        for (long int j = i * i; j <= sqrt(high); j = j + i) {
            ck[j] = false;
        }
    }
}

the compiler gives "invalid controlling predicate" error..do you know the workaround to make this work?

Aucun commentaire:

Enregistrer un commentaire