#ifndef GRID_LATTICE_UNARY_H #define GRID_LATTICE_UNARY_H namespace Grid { template Lattice pow(const Lattice &rhs,RealD y){ Lattice ret(rhs._grid); ret.checkerboard = rhs.checkerboard; conformable(ret,rhs); PARALLEL_FOR_LOOP for(int ss=0;ssoSites();ss++){ ret._odata[ss]=pow(rhs._odata[ss],y); } return ret; } template Lattice mod(const Lattice &rhs,Integer y){ Lattice ret(rhs._grid); ret.checkerboard = rhs.checkerboard; conformable(ret,rhs); PARALLEL_FOR_LOOP for(int ss=0;ssoSites();ss++){ ret._odata[ss]=mod(rhs._odata[ss],y); } return ret; } } #endif