Код: Выделить всё
for(int nu = 0; nu < 20; nu++) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { double matrixPtr = matrix[i][j].first; double matrixPtrSecond = matrix[i][j].second; double localReS1 = 0.0; double localImS1 = 0.0; for (double theta = 0; theta < 2*M_PI; theta += theta_plus) { for (double phi = 0; phi < M_PI; phi += theta_plus) { double angle = matrixPtr * cosPhi * sintheta + matrixPtrSecond * sinPhi * sintheta; localReS1 += cos(angle); localImS1 += sin(angle); } } #pragma omp critical { ReS += localReS1; ImS += localImS1; } } } } Источник: https://stackoverflow.com/questions/781 ... l-problems
Мобильная версия