Commit 89f0443f authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Use thread-local versions of wk vector in j80 loop

parent 69e6b04b
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -381,12 +381,13 @@ void frfme(string data_file, string output_path) {
	  for (int j80 = jlmf; j80 <= jlml; j80++) {
	    dcomplex *vec_w = new dcomplex[nkv * nkv]();
	    dcomplex **w = new dcomplex*[nkv];
	    dcomplex *wk_local = new dcomplex[nlmmt]();
	    for (int wi = 0; wi < nkv; wi++) w[wi] = vec_w + wi * nkv;
	    int wk_index = 0;
	    for (int jy50 = 0; jy50 < nkv; jy50++) {
	      for (int jx50 = 0; jx50 < nkv; jx50++) {
		for (int wi = 0; wi < nlmmt; wi++) wk[wi] = tt1->wk[wk_index++];
		w[jx50][jy50] = wk[j80 - 1];
		for (int wi = 0; wi < nlmmt; wi++) wk_local[wi] = tt1->wk[wk_index++];
		w[jx50][jy50] = wk_local[j80 - 1];
	      } // jx50
	    } // jy50 loop
	    int ixyz = 0;
@@ -422,6 +423,7 @@ void frfme(string data_file, string output_path) {
	    } // iz75 loop
	    delete[] vec_w;
	    delete[] w;
	    delete[] wk_local;
	  } // j80 loop
#ifdef USE_NVTX
	  nvtxRangePop();