22 for(
int i=0; i <
Nd; ++i)
32 for(
int i=0; i <
Nd; ++i){
45 for(
int i=0; i <
Nd; i++) {
46 coord[i] = wrapped_coords[i];
52 for(
int i=0; i <
Nd; i++) {
53 wrapped_coords[i]=coord[i];
60 for(
int i=0; i <
Nd; i++) {
61 wrapped_coords[i]=coord[i];
69#if QDP_USE_CB3D_LAYOUT == 1
74 int Ndim=latt_size.size() - 1;
86 for(
int i = Ndim; i < Ndim+latt_size.size(); ++i)
88 int ix=i%latt_size.size();
90 coord[ix] = ipos % latt_size[ix];
91 ipos = ipos / latt_size[ix];
110 for(
int mmu=latt_size.size()-2; mmu >= 0; --mmu) {
111 int wrapmu = (mmu-1) % latt_size.size();
112 if ( wrapmu < 0 ) wrapmu += latt_size.size();
113 order = latt_size[wrapmu]*(coord[mmu] + order);
116 order += coord[ latt_size.size()-1 ];
139 for(
int i=0; i < latt_size.
size(); ++i)
141 coord[i] = ipos % latt_size[i];
142 ipos = ipos / latt_size[i];
157 for(
int mmu=latt_size.
size()-1; mmu >= 1; --mmu)
158 order = latt_size[mmu-1]*(coord[mmu] + order);
Container for a multi-dimensional 1D array.
int size() const
Size of array.
Layout namespace holding info on problem size and machine info.
int nodeNumber()
Returns the node number of this node.
int linearSiteIndex(int site)
The linearized site index for the corresponding lexicographic site.
multi1d< int > siteCoords(int node, int index) QDP_CONST
Reconstruct the lattice coordinate from the node and site number.
void QDPXX_getSiteCoords(int coord[], int node, int linear) QDP_CONST
int QDPXX_getLinearSiteIndex(const int coord[])
const multi1d< int > & subgridLattSize()
Subgrid (grid on each node) lattice size.
multi1d< int > localLexiCoordFromLinear(const int &linearr)
const multi1d< int > & nodeCoord()
Returns the logical node coordinates for this node.
int QDPXX_nodeNumber(const int coord[])
Yet another random number generator.
int local_site(const multi1d< int > &coord, const multi1d< int > &latt_size)
Calculates the lexicographic site index from the coordinate of a site.
multi1d< int > crtesn(int ipos, const multi1d< int > &latt_size)
Decompose a lexicographic site into coordinates.
Primary include file for QDP.