diff --git a/Grid/lattice/Lattice_reduction.h b/Grid/lattice/Lattice_reduction.h index 7338fd41..0a5fbcb6 100644 --- a/Grid/lattice/Lattice_reduction.h +++ b/Grid/lattice/Lattice_reduction.h @@ -166,11 +166,12 @@ template inline RealD norm2(const Lattice &arg){ ComplexD nrm = innerProduct(arg,arg); return real(nrm); } + +//The global maximum of the site norm2 template inline RealD maxLocalNorm2(const Lattice &arg) { - typedef typename vobj::tensor_reduced vscalar; - typedef typename vobj::scalar_object scalar; - typedef typename getPrecision::real_scalar_type rscalar; + typedef typename vobj::tensor_reduced vscalar; //iScalar > > + typedef typename vscalar::scalar_object scalar; //iScalar > > Lattice inner = localNorm2(arg); diff --git a/tests/core/Test_main.cc b/tests/core/Test_main.cc index d3e6bfbd..6e316aa6 100644 --- a/tests/core/Test_main.cc +++ b/tests/core/Test_main.cc @@ -232,12 +232,13 @@ int main(int argc, char **argv) { scalar = localNorm2(cVec); std::cout << "Testing maxLocalNorm2" <