mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	maxLocalNorm2()
This commit is contained in:
		@@ -231,6 +231,19 @@ int main(int argc, char **argv) {
 | 
			
		||||
      scalar = localInnerProduct(cVec, cVec);
 | 
			
		||||
      scalar = localNorm2(cVec);
 | 
			
		||||
 | 
			
		||||
      std::cout << "Testing maxLocalNorm2" <<std::endl;
 | 
			
		||||
      for(Integer gsite=0;gsite<Fine.gSites();gsite++){
 | 
			
		||||
 | 
			
		||||
	TComplex big(10.0);
 | 
			
		||||
	Coordinate coor;
 | 
			
		||||
 | 
			
		||||
	random(FineRNG, scalar);
 | 
			
		||||
	Fine.GlobalIndexToGlobalCoor(gsite,coor);
 | 
			
		||||
        pokeSite(big,scalar,coor);
 | 
			
		||||
	
 | 
			
		||||
	RealD Linfty = maxLocalNorm2(scalar);
 | 
			
		||||
	assert(Linfty == 100.0);
 | 
			
		||||
      }
 | 
			
		||||
      //     -=,+=,*=,()
 | 
			
		||||
      //     add,+,sub,-,mult,mac,*
 | 
			
		||||
      //     adj,conjugate
 | 
			
		||||
@@ -549,7 +562,8 @@ int main(int argc, char **argv) {
 | 
			
		||||
 | 
			
		||||
                  std::vector<int> shiftcoor = coor;
 | 
			
		||||
                  shiftcoor[dir] = (shiftcoor[dir] + shift + latt_size[dir]) %
 | 
			
		||||
                                   (latt_size[dir] / mpi_layout[dir]);
 | 
			
		||||
                                   (latt_size[dir]);
 | 
			
		||||
		  //                                   (latt_size[dir] / mpi_layout[dir]);
 | 
			
		||||
 | 
			
		||||
                  std::vector<int> rl(4);
 | 
			
		||||
                  for (int dd = 0; dd < 4; dd++) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user