OpenMP, array issue

  • Thread starter Thread starter いらきゅ
  • Start date Start date

いらきゅ

Guest
Hello,

I have parallelized the loop below with OpenMP:

int i = 0;

#pragma omp parallel for num_threads(16)
for (i = 0; i < size; i++)
{
int offset;
int value;

// lot of calculations //

array[offset] = value;
}

By compute each time this loop is done per second, it say 470, but if I remove this code:

array[offset] = value;



It say 844, how is possible, is OpenMP dislike array ?

Continue reading...
 
Back
Top