Skip to content
Snippets Groups Projects
Commit b9f6783f authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Implement an embarrasingly OMP parallel strategy for j80 loop

parent 43c640b0
No related branches found
No related tags found
No related merge requests found
......@@ -374,14 +374,15 @@ void frfme(string data_file, string output_path) {
#ifdef USE_NVTX
nvtxRangePop();
#endif
dcomplex *vec_w = new dcomplex[nkv * nkv]();
dcomplex **w = new dcomplex*[nkv];
for (int wi = 0; wi < nkv; wi++) w[wi] = vec_w + wi * nkv;
#ifdef USE_NVTX
nvtxRangePush("j80 loop");
#endif
#pragma omp parallel for
for (int j80 = jlmf; j80 <= jlml; j80++) {
int wk_index = 0;
dcomplex *vec_w = new dcomplex[nkv * nkv]();
dcomplex **w = new dcomplex*[nkv];
for (int wi = 0; wi < nkv; wi++) w[wi] = vec_w + wi * nkv;
int wk_index = (j80 - jlmf) * nkv * nkv;
for (int jy50 = 0; jy50 < nkv; jy50++) {
for (int jx50 = 0; jx50 < nkv; jx50++) {
for (int wi = 0; wi < nlmmt; wi++) wk[wi] = tt1->vec_wk[wk_index++];
......@@ -419,9 +420,9 @@ void frfme(string data_file, string output_path) {
} // ix65 loop
} // iy70 loop
} // iz75 loop
} // j80 loop
delete[] vec_w;
delete[] w;
} // j80 loop
#ifdef USE_NVTX
nvtxRangePop();
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment