logo

Crowdly

Browser

Add to Chrome

L'exécution du fragment de code suivant peut-elle produire des résultats incorre...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

L'exécution du fragment de code suivant peut-elle produire des résultats incorrects dans le tableau « resultat » ?

...

#pragma omp parallel

num_threads(4)

{

    #pragma

omp for nowait

    for

(int i = 0; i < 100; i++) {

     

  data[i] = effectuer_calcul(i);

    }

 

    #pragma

omp single nowait

    {

     

  int somme = 0;

     

  for (int i = 0; i < 100; i++) {

     

     

somme += data[i];

        }

       

moyenne_globale = somme / 100.0;

    }

 

    #pragma omp for nowait

    for

(int i = 0; i < 100; i++) {

     

 

resultat[i] = data[i] - moyenne_globale;

    }

}

...

100%
0%
0%
0%
More questions like this

Want instant access to all verified answers on esiclass.esi.dz?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome