diff --git a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp index 45add87092de8fcc505624dad338e0328af90d05..f094691b71da6e7dc291bde662a88251f79e796a 100644 --- a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp @@ -45,12 +45,10 @@ void NPairHalfRespaBinNewtoffOmp::build(NeighList *list) NPAIR_OMP_INIT; - NeighList *listinner = list->listinner; - NeighList *listmiddle = list->listmiddle; const int respamiddle = list->respamiddle; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list,listinner,listmiddle) +#pragma omp parallel default(none) shared(list) #endif NPAIR_OMP_SETUP(nlocal); @@ -77,26 +75,26 @@ void NPairHalfRespaBinNewtoffOmp::build(NeighList *list) int *numneigh = list->numneigh; int **firstneigh = list->firstneigh; - int *ilist_inner = listinner->ilist; - int *numneigh_inner = listinner->numneigh; - int **firstneigh_inner = listinner->firstneigh; + int *ilist_inner = list->ilist_inner; + int *numneigh_inner = list->numneigh_inner; + int **firstneigh_inner = list->firstneigh_inner; int *ilist_middle,*numneigh_middle,**firstneigh_middle; if (respamiddle) { - ilist_middle = listmiddle->ilist; - numneigh_middle = listmiddle->numneigh; - firstneigh_middle = listmiddle->firstneigh; + ilist_middle = list->ilist_middle; + numneigh_middle = list->numneigh_middle; + firstneigh_middle = list->firstneigh_middle; } // each thread has its own page allocator MyPage<int> &ipage = list->ipage[tid]; - MyPage<int> &ipage_inner = listinner->ipage[tid]; + MyPage<int> &ipage_inner = list->ipage_inner[tid]; ipage.reset(); ipage_inner.reset(); MyPage<int> *ipage_middle; if (respamiddle) { - ipage_middle = listmiddle->ipage + tid; + ipage_middle = list->ipage_middle + tid; ipage_middle->reset(); } @@ -199,6 +197,6 @@ void NPairHalfRespaBinNewtoffOmp::build(NeighList *list) } NPAIR_OMP_CLOSE; list->inum = nlocal; - listinner->inum = nlocal; - if (respamiddle) listmiddle->inum = nlocal; + list->inum_inner = nlocal; + if (respamiddle) list->inum_middle = nlocal; } diff --git a/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp index ee6b9b7501235f8bdcd425b4eb9340be286980aa..de7ef5f7d52b4b04d11dde4a16212de34dee8941 100644 --- a/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp @@ -44,12 +44,10 @@ void NPairHalfRespaBinNewtonOmp::build(NeighList *list) NPAIR_OMP_INIT; - NeighList *listinner = list->listinner; - NeighList *listmiddle = list->listmiddle; const int respamiddle = list->respamiddle; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list,listinner,listmiddle) +#pragma omp parallel default(none) shared(list) #endif NPAIR_OMP_SETUP(nlocal); @@ -76,26 +74,26 @@ void NPairHalfRespaBinNewtonOmp::build(NeighList *list) int *numneigh = list->numneigh; int **firstneigh = list->firstneigh; - int *ilist_inner = listinner->ilist; - int *numneigh_inner = listinner->numneigh; - int **firstneigh_inner = listinner->firstneigh; + int *ilist_inner = list->ilist_inner; + int *numneigh_inner = list->numneigh_inner; + int **firstneigh_inner = list->firstneigh_inner; int *ilist_middle,*numneigh_middle,**firstneigh_middle; if (respamiddle) { - ilist_middle = listmiddle->ilist; - numneigh_middle = listmiddle->numneigh; - firstneigh_middle = listmiddle->firstneigh; + ilist_middle = list->ilist_middle; + numneigh_middle = list->numneigh_middle; + firstneigh_middle = list->firstneigh_middle; } // each thread has its own page allocator MyPage<int> &ipage = list->ipage[tid]; - MyPage<int> &ipage_inner = listinner->ipage[tid]; + MyPage<int> &ipage_inner = list->ipage_inner[tid]; ipage.reset(); ipage_inner.reset(); MyPage<int> *ipage_middle; if (respamiddle) { - ipage_middle = listmiddle->ipage + tid; + ipage_middle = list->ipage_middle + tid; ipage_middle->reset(); } @@ -245,6 +243,6 @@ void NPairHalfRespaBinNewtonOmp::build(NeighList *list) } NPAIR_OMP_CLOSE; list->inum = nlocal; - listinner->inum = nlocal; - if (respamiddle) listmiddle->inum = nlocal; + list->inum_inner = nlocal; + if (respamiddle) list->inum_middle = nlocal; } diff --git a/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp index fbb512ba646ff5a23201507867d6d84dc4e4ac90..f20d101bc9dbc1f131e5a7435751ed471626266a 100644 --- a/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp @@ -44,12 +44,10 @@ void NPairHalfRespaBinNewtonTriOmp::build(NeighList *list) NPAIR_OMP_INIT; - NeighList *listinner = list->listinner; - NeighList *listmiddle = list->listmiddle; const int respamiddle = list->respamiddle; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list,listinner,listmiddle) +#pragma omp parallel default(none) shared(list) #endif NPAIR_OMP_SETUP(nlocal); @@ -76,26 +74,26 @@ void NPairHalfRespaBinNewtonTriOmp::build(NeighList *list) int *numneigh = list->numneigh; int **firstneigh = list->firstneigh; - int *ilist_inner = listinner->ilist; - int *numneigh_inner = listinner->numneigh; - int **firstneigh_inner = listinner->firstneigh; + int *ilist_inner = list->ilist_inner; + int *numneigh_inner = list->numneigh_inner; + int **firstneigh_inner = list->firstneigh_inner; int *ilist_middle,*numneigh_middle,**firstneigh_middle; if (respamiddle) { - ilist_middle = listmiddle->ilist; - numneigh_middle = listmiddle->numneigh; - firstneigh_middle = listmiddle->firstneigh; + ilist_middle = list->ilist_middle; + numneigh_middle = list->numneigh_middle; + firstneigh_middle = list->firstneigh_middle; } // each thread has its own page allocator MyPage<int> &ipage = list->ipage[tid]; - MyPage<int> &ipage_inner = listinner->ipage[tid]; + MyPage<int> &ipage_inner = list->ipage_inner[tid]; ipage.reset(); ipage_inner.reset(); MyPage<int> *ipage_middle; if (respamiddle) { - ipage_middle = listmiddle->ipage + tid; + ipage_middle = list->ipage_middle + tid; ipage_middle->reset(); } @@ -206,6 +204,6 @@ void NPairHalfRespaBinNewtonTriOmp::build(NeighList *list) } NPAIR_OMP_CLOSE; list->inum = nlocal; - listinner->inum = nlocal; - if (respamiddle) listmiddle->inum = nlocal; + list->inum_inner = nlocal; + if (respamiddle) list->inum_middle = nlocal; } diff --git a/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp b/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp index 5ee71bebad9e5668461dcc2b9702eccad7df774f..0f726cdd7f322dafa176884f1510134a2ce5e6a3 100644 --- a/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp @@ -46,12 +46,10 @@ void NPairHalfRespaNsqNewtoffOmp::build(NeighList *list) NPAIR_OMP_INIT; - NeighList *listinner = list->listinner; - NeighList *listmiddle = list->listmiddle; const int respamiddle = list->respamiddle; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list,listinner,listmiddle) +#pragma omp parallel default(none) shared(list) #endif NPAIR_OMP_SETUP(nlocal); @@ -80,26 +78,26 @@ void NPairHalfRespaNsqNewtoffOmp::build(NeighList *list) int *numneigh = list->numneigh; int **firstneigh = list->firstneigh; - int *ilist_inner = listinner->ilist; - int *numneigh_inner = listinner->numneigh; - int **firstneigh_inner = listinner->firstneigh; + int *ilist_inner = list->ilist_inner; + int *numneigh_inner = list->numneigh_inner; + int **firstneigh_inner = list->firstneigh_inner; int *ilist_middle,*numneigh_middle,**firstneigh_middle; if (respamiddle) { - ilist_middle = listmiddle->ilist; - numneigh_middle = listmiddle->numneigh; - firstneigh_middle = listmiddle->firstneigh; + ilist_middle = list->ilist_middle; + numneigh_middle = list->numneigh_middle; + firstneigh_middle = list->firstneigh_middle; } // each thread has its own page allocator MyPage<int> &ipage = list->ipage[tid]; - MyPage<int> &ipage_inner = listinner->ipage[tid]; + MyPage<int> &ipage_inner = list->ipage_inner[tid]; ipage.reset(); ipage_inner.reset(); MyPage<int> *ipage_middle; if (respamiddle) { - ipage_middle = listmiddle->ipage + tid; + ipage_middle = list->ipage_middle + tid; ipage_middle->reset(); } @@ -193,6 +191,6 @@ void NPairHalfRespaNsqNewtoffOmp::build(NeighList *list) } NPAIR_OMP_CLOSE; list->inum = nlocal; - listinner->inum = nlocal; - if (respamiddle) listmiddle->inum = nlocal; + list->inum_inner = nlocal; + if (respamiddle) list->inum_middle = nlocal; } diff --git a/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp b/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp index 89cff732c950bffa515a7a691cd977dfdb26c378..2783e1255eb1147a15c5ebc04a41905c0a6ac27f 100644 --- a/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp +++ b/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp @@ -47,12 +47,10 @@ void NPairHalfRespaNsqNewtonOmp::build(NeighList *list) NPAIR_OMP_INIT; - NeighList *listinner = list->listinner; - NeighList *listmiddle = list->listmiddle; const int respamiddle = list->respamiddle; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list,listinner,listmiddle) +#pragma omp parallel default(none) shared(list) #endif NPAIR_OMP_SETUP(nlocal); @@ -81,26 +79,26 @@ void NPairHalfRespaNsqNewtonOmp::build(NeighList *list) int *numneigh = list->numneigh; int **firstneigh = list->firstneigh; - int *ilist_inner = listinner->ilist; - int *numneigh_inner = listinner->numneigh; - int **firstneigh_inner = listinner->firstneigh; + int *ilist_inner = list->ilist_inner; + int *numneigh_inner = list->numneigh_inner; + int **firstneigh_inner = list->firstneigh_inner; int *ilist_middle,*numneigh_middle,**firstneigh_middle; if (respamiddle) { - ilist_middle = listmiddle->ilist; - numneigh_middle = listmiddle->numneigh; - firstneigh_middle = listmiddle->firstneigh; + ilist_middle = list->ilist_middle; + numneigh_middle = list->numneigh_middle; + firstneigh_middle = list->firstneigh_middle; } // each thread has its own page allocator MyPage<int> &ipage = list->ipage[tid]; - MyPage<int> &ipage_inner = listinner->ipage[tid]; + MyPage<int> &ipage_inner = list->ipage_inner[tid]; ipage.reset(); ipage_inner.reset(); MyPage<int> *ipage_middle; if (respamiddle) { - ipage_middle = listmiddle->ipage + tid; + ipage_middle = list->ipage_middle + tid; ipage_middle->reset(); } @@ -212,6 +210,6 @@ void NPairHalfRespaNsqNewtonOmp::build(NeighList *list) } NPAIR_OMP_CLOSE; list->inum = nlocal; - listinner->inum = nlocal; - if (respamiddle) listmiddle->inum = nlocal; + list->inum_inner = nlocal; + if (respamiddle) list->inum_middle = nlocal; }