1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

fix previous commit

This commit is contained in:
Antonin Portelli 2018-08-14 14:07:54 +01:00
parent f4878d3a13
commit 6e5a2b7922
5 changed files with 10 additions and 9 deletions

View File

@ -297,7 +297,7 @@ void TA2AMesonField<FImpl>::execute(void)
startTimer("cache copy");
parallel_for_nest(5)(int iii=0;iii< N_iii;iii++)
parallel_for_nest5(int iii=0;iii< N_iii;iii++)
for(int jjj=0;jjj< N_jjj;jjj++)
for(int m =0;m< nmom;m++)
for(int g =0;g< ngamma;g++)

View File

@ -174,7 +174,7 @@ void makeMesonFieldBlock(MesonField &mat,
if (caller) caller->startTimer("contraction: spin trace");
int pd = grid->_processors[orthogdim];
int pc = grid->_processor_coor[orthogdim];
parallel_for_nest(2)(int lt=0;lt<ld;lt++)
parallel_for_nest2(int lt=0;lt<ld;lt++)
{
for(int pt=0;pt<pd;pt++)
{

View File

@ -94,7 +94,7 @@ Gather_plane_extract(const Lattice<vobj> &rhs,std::vector<typename vobj::scalar_
int n1=rhs._grid->_slice_stride[dimension];
if ( cbmask ==0x3){
parallel_for_nest(2)(int n=0;n<e1;n++){
parallel_for_nest2(int n=0;n<e1;n++){
for(int b=0;b<e2;b++){
int o = n*n1;
@ -110,7 +110,7 @@ Gather_plane_extract(const Lattice<vobj> &rhs,std::vector<typename vobj::scalar_
// Case of SIMD split AND checker dim cannot currently be hit, except in
// Test_cshift_red_black code.
std::cout << " Dense packed buffer WARNING " <<std::endl;
parallel_for_nest(2)(int n=0;n<e1;n++){
parallel_for_nest2(int n=0;n<e1;n++){
for(int b=0;b<e2;b++){
int o=n*n1;
@ -191,7 +191,7 @@ template<class vobj> void Scatter_plane_merge(Lattice<vobj> &rhs,std::vector<typ
int e2=rhs._grid->_slice_block[dimension];
if(cbmask ==0x3 ) {
parallel_for_nest(2)(int n=0;n<e1;n++){
parallel_for_nest2(int n=0;n<e1;n++){
for(int b=0;b<e2;b++){
int o = n*rhs._grid->_slice_stride[dimension];
int offset = b+n*rhs._grid->_slice_block[dimension];

View File

@ -522,7 +522,7 @@ static void sliceMaddVector(Lattice<vobj> &R,std::vector<RealD> &a,const Lattice
tensor_reduced at; at=av;
parallel_for_nest(2)(int n=0;n<e1;n++){
parallel_for_nest2(int n=0;n<e1;n++){
for(int b=0;b<e2;b++){
int ss= so+n*stride+b;
R._odata[ss] = at*X._odata[ss]+Y._odata[ss];

View File

@ -41,14 +41,14 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
#define PARALLEL_FOR_LOOP _Pragma("omp parallel for schedule(static)")
#define PARALLEL_FOR_LOOP_INTERN _Pragma("omp for schedule(static)")
#define PARALLEL_NESTED_LOOP2 _Pragma("omp parallel for collapse(2)")
#define PARALLEL_NESTED_LOOP(n) _Pragma("omp parallel for collapse(n)")
#define PARALLEL_NESTED_LOOP5 _Pragma("omp parallel for collapse(5)")
#define PARALLEL_REGION _Pragma("omp parallel")
#define PARALLEL_CRITICAL _Pragma("omp critical")
#else
#define PARALLEL_FOR_LOOP
#define PARALLEL_FOR_LOOP_INTERN
#define PARALLEL_NESTED_LOOP2
#define PARALLEL_NESTED_LOOP(n)
#define PARALLEL_NESTED_LOOP5
#define PARALLEL_REGION
#define PARALLEL_CRITICAL
#endif
@ -56,7 +56,8 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
#define parallel_region PARALLEL_REGION
#define parallel_for PARALLEL_FOR_LOOP for
#define parallel_for_internal PARALLEL_FOR_LOOP_INTERN for
#define parallel_for_nest(n) PARALLEL_NESTED_LOOP(n) for
#define parallel_for_nest2 PARALLEL_NESTED_LOOP2 for
#define parallel_for_nest5 PARALLEL_NESTED_LOOP5 for
namespace Grid {