#ifndef GRID_LATTICE_COORDINATE_H #define GRID_LATTICE_COORDINATE_H namespace Grid { template inline void LatticeCoordinate(Lattice &l,int mu) { typedef typename iobj::scalar_object scalar_object; typedef typename iobj::scalar_type scalar_type; typedef typename iobj::vector_type vector_type; GridBase *grid = l._grid; int Nsimd = grid->iSites(); std::vector gcoor; std::vector mergebuf(Nsimd); vector_type vI; for(int o=0;ooSites();o++){ for(int i=0;iiSites();i++){ grid->RankIndexToGlobalCoor(grid->ThisRank(),o,i,gcoor); mergebuf[i]=(Integer)gcoor[mu]; } AmergeA(vI,mergebuf); l._odata[o]=vI; } }; // LatticeCoordinate(); // FIXME for debug; deprecate this; made obscelete by template void lex_sites(Lattice &l){ Real *v_ptr = (Real *)&l._odata[0]; size_t o_len = l._grid->oSites(); size_t v_len = sizeof(vobj)/sizeof(vRealF); size_t vec_len = vRealF::Nsimd(); for(int i=0;i