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

Filed bug report Bug 66153 on GCC-5.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66153
This commit is contained in:
Peter Boyle 2015-05-15 11:38:04 +01:00
parent 4cee0e8653
commit 873110d482

View File

@ -11,8 +11,7 @@ namespace Grid {
// Peek internal indices of a Lattice object // Peek internal indices of a Lattice object
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
template<int Index,class vobj> template<int Index,class vobj>
inline auto peekIndex(const Lattice<vobj> &lhs) auto peekIndex(const Lattice<vobj> &lhs) -> Lattice<decltype(peekIndex<Index>(lhs._odata[0]))>
-> Lattice<decltype(peekIndex<Index>(lhs._odata[0]))>
{ {
Lattice<decltype(peekIndex<Index>(lhs._odata[0]))> ret(lhs._grid); Lattice<decltype(peekIndex<Index>(lhs._odata[0]))> ret(lhs._grid);
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
@ -22,8 +21,7 @@ PARALLEL_FOR_LOOP
return ret; return ret;
}; };
template<int Index,class vobj> template<int Index,class vobj>
inline auto peekIndex(const Lattice<vobj> &lhs,int i) auto peekIndex(const Lattice<vobj> &lhs,int i) -> Lattice<decltype(peekIndex<Index>(lhs._odata[0],i))>
-> Lattice<decltype(peekIndex<Index>(lhs._odata[0],i))>
{ {
Lattice<decltype(peekIndex<Index>(lhs._odata[0],i))> ret(lhs._grid); Lattice<decltype(peekIndex<Index>(lhs._odata[0],i))> ret(lhs._grid);
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
@ -33,8 +31,7 @@ PARALLEL_FOR_LOOP
return ret; return ret;
}; };
template<int Index,class vobj> template<int Index,class vobj>
inline auto peekIndex(const Lattice<vobj> &lhs,int i,int j) auto peekIndex(const Lattice<vobj> &lhs,int i,int j) -> Lattice<decltype(peekIndex<Index>(lhs._odata[0],i,j))>
-> Lattice<decltype(peekIndex<Index>(lhs._odata[0],i,j))>
{ {
Lattice<decltype(peekIndex<Index>(lhs._odata[0],i,j))> ret(lhs._grid); Lattice<decltype(peekIndex<Index>(lhs._odata[0],i,j))> ret(lhs._grid);
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
@ -47,7 +44,7 @@ PARALLEL_FOR_LOOP
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Poke internal indices of a Lattice object // Poke internal indices of a Lattice object
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
template<int Index,class vobj> inline template<int Index,class vobj>
void pokeIndex(Lattice<vobj> &lhs,const Lattice<decltype(peekIndex<Index>(lhs._odata[0]))> & rhs) void pokeIndex(Lattice<vobj> &lhs,const Lattice<decltype(peekIndex<Index>(lhs._odata[0]))> & rhs)
{ {
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
@ -55,7 +52,7 @@ PARALLEL_FOR_LOOP
pokeIndex<Index>(lhs._odata[ss],rhs._odata[ss]); pokeIndex<Index>(lhs._odata[ss],rhs._odata[ss]);
} }
} }
template<int Index,class vobj> inline template<int Index,class vobj>
void pokeIndex(Lattice<vobj> &lhs,const Lattice<decltype(peekIndex<Index>(lhs._odata[0],0))> & rhs,int i) void pokeIndex(Lattice<vobj> &lhs,const Lattice<decltype(peekIndex<Index>(lhs._odata[0],0))> & rhs,int i)
{ {
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
@ -63,7 +60,7 @@ PARALLEL_FOR_LOOP
pokeIndex<Index>(lhs._odata[ss],rhs._odata[ss],i); pokeIndex<Index>(lhs._odata[ss],rhs._odata[ss],i);
} }
} }
template<int Index,class vobj> inline template<int Index,class vobj>
void pokeIndex(Lattice<vobj> &lhs,const Lattice<decltype(peekIndex<Index>(lhs._odata[0],0,0))> & rhs,int i,int j) void pokeIndex(Lattice<vobj> &lhs,const Lattice<decltype(peekIndex<Index>(lhs._odata[0],0,0))> & rhs,int i,int j)
{ {
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP