mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-04 14:04:32 +00:00 
			
		
		
		
	Accelerator loosp
This commit is contained in:
		@@ -42,9 +42,9 @@ inline auto trace(const Lattice<vobj> &lhs)
 | 
			
		||||
  -> Lattice<decltype(trace(lhs._odata[0]))>
 | 
			
		||||
{
 | 
			
		||||
  Lattice<decltype(trace(lhs._odata[0]))> ret(lhs._grid);
 | 
			
		||||
  parallel_for(int ss=0;ss<lhs._grid->oSites();ss++){
 | 
			
		||||
  accelerator_loop( ss, lhs, {
 | 
			
		||||
    ret._odata[ss] = trace(lhs._odata[ss]);
 | 
			
		||||
  }
 | 
			
		||||
  });
 | 
			
		||||
  return ret;
 | 
			
		||||
};
 | 
			
		||||
    
 | 
			
		||||
@@ -55,9 +55,9 @@ template<int Index,class vobj>
 | 
			
		||||
inline auto TraceIndex(const Lattice<vobj> &lhs) -> Lattice<decltype(traceIndex<Index>(lhs._odata[0]))>
 | 
			
		||||
{
 | 
			
		||||
  Lattice<decltype(traceIndex<Index>(lhs._odata[0]))> ret(lhs._grid);
 | 
			
		||||
  parallel_for(int ss=0;ss<lhs._grid->oSites();ss++){
 | 
			
		||||
  accelerator_loop( ss, lhs, {
 | 
			
		||||
    ret._odata[ss] = traceIndex<Index>(lhs._odata[ss]);
 | 
			
		||||
  }
 | 
			
		||||
  });
 | 
			
		||||
  return ret;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user