From 5609624b4441de96b5c6a2d21f6a1316fc508472 Mon Sep 17 00:00:00 2001 From: paboyle Date: Wed, 24 Jan 2018 13:32:24 +0000 Subject: [PATCH] Threading constructs replaced --- lib/cshift/Cshift_common.h | 47 ++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/lib/cshift/Cshift_common.h b/lib/cshift/Cshift_common.h index d9cc1eb5..995b04ac 100644 --- a/lib/cshift/Cshift_common.h +++ b/lib/cshift/Cshift_common.h @@ -48,13 +48,13 @@ Gather_plane_simple (const Lattice &rhs,commVector &buffer,int dimen int stride=rhs._grid->_slice_stride[dimension]; if ( cbmask == 0x3 ) { - parallel_for_nest2(int n=0;n > table; @@ -67,9 +67,9 @@ Gather_plane_simple (const Lattice &rhs,commVector &buffer,int dimen } } } - parallel_for(int i=0;i &rhs,std::vector_slice_stride[dimension]; if ( cbmask ==0x3){ - parallel_for_nest2(int n=0;n &rhs,std::vector(temp,pointers,offset); } - } + }); } else { // Case of SIMD split AND checker dim cannot currently be hit, except in // Test_cshift_red_black code. std::cout << " Dense packed buffer WARNING " < &rhs,std::vector(temp,pointers,offset); } } - } + }); } } @@ -142,13 +142,13 @@ template void Scatter_plane_simple (Lattice &rhs,commVector_slice_stride[dimension]; if ( cbmask ==0x3 ) { - parallel_for_nest2(int n=0;n_slice_stride[dimension]; int bo =n*rhs._grid->_slice_block[dimension]; rhs._odata[so+o+b]=buffer[bo+b]; } - } + }); } else { std::vector > table; int bo=0; @@ -161,10 +161,9 @@ template void Scatter_plane_simple (Lattice &rhs,commVector void Scatter_plane_merge(Lattice &rhs,std::vector_slice_block[dimension]; if(cbmask ==0x3 ) { - parallel_for_nest2(int n=0;n_slice_stride[dimension]; int offset = b+n*rhs._grid->_slice_block[dimension]; merge(rhs._odata[so+o+b],pointers,offset); } - } + }); } else { // Case of SIMD split AND checker dim cannot currently be hit, except in @@ -229,18 +228,16 @@ template void Copy_plane(Lattice& lhs,const Lattice &rhs int e2=rhs._grid->_slice_block[dimension]; int stride = rhs._grid->_slice_stride[dimension]; if(cbmask == 0x3 ){ - parallel_for_nest2(int n=0;nCheckerBoardFromOindex(o); if ( ocb&cbmask ) { @@ -248,7 +245,7 @@ template void Copy_plane(Lattice& lhs,const Lattice &rhs vstream(lhs._odata[lo+o],rhs._odata[ro+o]); } } - } + }); } } @@ -269,7 +266,7 @@ template void Copy_plane_permute(Lattice& lhs,const Lattice_slice_block [dimension]; int stride = rhs._grid->_slice_stride[dimension]; - parallel_for_nest2(int n=0;n void Copy_plane_permute(Lattice& lhs,const Lattice Lattice Cshift_local(Lattice &ret,const Lattice for(int x=0;x_ostride[dimension]; int cb= (cbmask==0x2)? Odd : Even;