#ifndef GRID_LATTICE_REALITY_H #define GRID_LATTICE_REALITY_H // FIXME .. this is the sector of the code // I am most worried about the directions // The choice of burying complex in the SIMD // is making the use of "real" and "imag" very cumbersome namespace Grid { template inline Lattice adj(const Lattice &lhs){ Lattice ret(lhs._grid); #pragma omp parallel for for(int ss=0;ssoSites();ss++){ ret._odata[ss] = adj(lhs._odata[ss]); } return ret; }; template inline Lattice conj(const Lattice &lhs){ Lattice ret(lhs._grid); #pragma omp parallel for for(int ss=0;ssoSites();ss++){ ret._odata[ss] = conj(lhs._odata[ss]); } return ret; }; template inline auto real(const Lattice &z) -> Lattice { Lattice ret(z._grid); #pragma omp parallel for for(int ss=0;ssoSites();ss++){ ret._odata[ss] = real(z._odata[ss]); } return ret; } template inline auto imag(const Lattice &z) -> Lattice { Lattice ret(z._grid); #pragma omp parallel for for(int ss=0;ssoSites();ss++){ ret._odata[ss] = imag(z._odata[ss]); } return ret; } } #endif