mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
gpermute
This commit is contained in:
parent
48ff655bad
commit
cae27678d8
@ -1130,6 +1130,14 @@ static_assert(sizeof(SIMD_Ftype) == sizeof(SIMD_Itype), "SIMD vector lengths inc
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Fixme need coalesced read gpermute
|
||||
template<class vobj> void gpermute(vobj & inout,int perm){
|
||||
vobj tmp=inout;
|
||||
if (perm & 0x1 ) { permute(inout,tmp,0); tmp=inout;}
|
||||
if (perm & 0x2 ) { permute(inout,tmp,1); tmp=inout;}
|
||||
if (perm & 0x4 ) { permute(inout,tmp,2); tmp=inout;}
|
||||
if (perm & 0x8 ) { permute(inout,tmp,3); tmp=inout;}
|
||||
}
|
||||
|
||||
NAMESPACE_END(Grid);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user