vendredi 27 février 2015

How to use "loop" parallel processing by using GCD (grand central Dispatch )


I have programmed C++ under visual studio environment. there to do parallel processing i used openMP but OS X isn't supporting for openMP so i like to move GCD Apple . By using GCD how do i optimise the following loop ( here i want to do the thing what openMP does by using apple GCD) please help me to do that. thank you for any advance.



#pragma omp parallel for private(j)
for(i = 1; i <= I; i++){
for(j = 1; j <= J; j++){
if(max(1, m-Alpha+i0) <= i && i <= min(m+Alpha+i0, I) && max(1, n-Alpha+j0) <= j && j <= min(n+Alpha+j0, J)){
// cout << i << ", " << j << endl;
_AccmCalc(i, j, m, n);
}
}



Aucun commentaire:

Enregistrer un commentaire