Commit bfaf5e39 authored by Mulas, Giacomo's avatar Mulas, Giacomo
Browse files

clean up nested omp directives

parent 07a18994
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -402,11 +402,10 @@ void frfme(string data_file, string output_path) {
	  dcomplex *vec_wsum = tfrfme->wsum[0];
	  double *vec_vkzm = vkzm[0];
#ifdef USE_TARGET_OFFLOAD
#pragma omp target teams distribute parallel for simd
#pragma omp target teams distribute parallel for
#else
#pragma omp parallel for simd
#pragma omp parallel for
#endif
// #pragma omp parallel for
	  for (int j80 = jlmf-1; j80 < jlml; j80++) {
	    int nkvs = nkv * nkv;
	    dcomplex *vec_w = (dcomplex *) calloc(nkvs, sizeof(dcomplex));
@@ -422,6 +421,7 @@ void frfme(string data_file, string output_path) {
// #else
// #pragma omp parallel for simd
// #endif
#pragma omp parallel for simd
	    for (int jxy50 = 0; jxy50 < nkvs; jxy50++) {
		// for (int wi = 0; wi < nlmmt; wi++) wk_local[wi] = tt1->wk[wk_index++];
		// w[jx50][jy50] = wk_local[j80];
@@ -436,6 +436,7 @@ void frfme(string data_file, string output_path) {
	    //   } // jx50
	    // } // jy50 loop
	    int ixyz = 0;
#pragma omp parallel for simd
	    for (int wj = 0; wj < nrvc; wj++) vec_wsum[(j80*nrvc)+wj] = cc0;
	    int nvtot = nxv*nyv*nzv;
	    int nvxy = nxv *nyv;
@@ -444,6 +445,7 @@ void frfme(string data_file, string output_path) {
// #else
// #pragma omp parallel for
// #endif
#pragma omp parallel for
	    for (int ixyz = 0; ixyz < nvtot; ixyz++) {
	      int iz75 = ixyz / nvxy;
	      int iy70 = (ixyz % nvxy) / nxv;
@@ -461,6 +463,7 @@ void frfme(string data_file, string output_path) {
// #else
// #pragma omp parallel for simd reduction(+:sumy)
// #endif
#pragma omp parallel for simd reduction(+:sumy)
	      for (int jy60x55 = 0; jy60x55 < nkvs ; jy60x55++) {
		int jy60 = jy60x55 / nkv;
		int jx55 = jy60x55 % nkv;