Go to the documentation of this file.
10 #ifndef QXS_AINDEX_EO_INCLUDED
11 #define QXS_AINDEX_EO_INCLUDED
21 #include "lib_alt_QXS/inline/define_vlen.h"
22 #include "lib_alt_QXS/inline/define_params.h"
26 template<
typename REALTYPE>
27 inline int idx(
const int in,
const int Nin,
const int ist,
28 const int Nx2,
const int Ny,
29 const int leo,
const int Nvol2,
const int ex)
32 int ieo = (ist + leo) % 2;
33 int offset = (ieo + 2 * ex) * Nin * Nvol2;
35 int iy = (ist2 / Nx2) % Ny;
41 int izt = ist2 / (Nx2 * Ny);
42 int ist2v = ix2v + (Nx2 /
VLENXD) * (iyv + (Ny /
VLENYD) * izt);
43 return k +
VLEND * (in + Nin * ist2v) + offset;
47 template<
typename REALTYPE>
48 inline int idxh(
const int in,
const int Nin,
const int ist2,
49 const int Nx2,
const int Ny,
50 const int Nvol2,
const int ex)
53 int iy = (ist2 / Nx2) % Ny;
59 int izt = ist2 / (Nx2 * Ny);
60 int ist2v = ix2v + (Nx2 /
VLENXD) * (iyv + (Ny /
VLENYD) * izt);
61 return k +
VLEND * (in + Nin * ist2v) + Nin * Nvol2 * ex;
66 inline int idx<float>(
const int in,
const int Nin,
const int ist,
67 const int Nx2,
const int Ny,
68 const int leo,
const int Nvol2,
const int ex)
71 int ieo = (ist + leo) % 2;
72 int offset = (ieo + 2 * ex) * Nin * Nvol2;
74 int iy = (ist2 / Nx2) % Ny;
80 int izt = ist2 / (Nx2 * Ny);
81 int ist2v = ix2v + (Nx2 /
VLENXS) * (iyv + (Ny /
VLENYS) * izt);
82 return k +
VLENS * (in + Nin * ist2v) + offset;
87 inline int idxh<float>(
const int in,
const int Nin,
const int ist2,
88 const int Nx2,
const int Ny,
89 const int Nvol2,
const int ex)
92 int iy = (ist2 / Nx2) % Ny;
98 int izt = ist2 / (Nx2 * Ny);
99 int ist2v = ix2v + (Nx2 /
VLENXS) * (iyv + (Ny /
VLENYS) * izt);
100 return k +
VLENS * (in + Nin * ist2v) + Nin * Nvol2 * ex;
112 template<
typename REALTYPE>
116 int Nx, Ny,
Nz, Nt, Nvol;
129 int site(
const int x,
const int y,
const int z,
const int t)
const
131 int ieo = (x + leo(y, z, t)) % 2;
132 return (x / 2) + Nx2 * (y + Ny * (z + Nz * t)) + ieo * Nvol2;
135 int idx(
const int in,
const int Nin,
const int ist,
const int ex)
const
138 int leot = Leo[ist2 / Nx2];
139 return AIndex_eo_qxs::idx<REALTYPE>(in, Nin, ist,
140 Nx2, Ny, leot, Nvol2, ex);
143 int idx_G(
const int idf,
const int ist,
const int ex)
const
144 {
return idx(idf, Ndf, ist, ex); }
146 int idx_Gr(
const int ic1,
const int ic2,
const int ist,
const int ex)
const
148 int idf = 2 * (ic2 + Nc * ic1);
149 return idx_G(idf, ist, ex);
152 int idx_Gi(
const int ic1,
const int ic2,
const int ist,
const int ex)
const
154 int idf = 1 + 2 * (ic2 + Nc * ic1);
155 return idx_G(idf, ist, ex);
158 int idx_SP(
const int in,
const int ist,
const int ex)
const
159 {
return idx(in, Nvcd, ist, ex); }
161 int idx_SPr(
const int ic,
const int id,
const int ist,
const int ex)
const
163 int in = 2 * (
id + Nd * ic);
164 return idx_SP(in, ist, ex);
167 int idx_SPi(
const int ic,
const int id,
const int ist,
const int ex)
const
169 int in = 1 + 2 * (
id + Nd * ic);
170 return idx_SP(in, ist, ex);
173 int idxh(
const int in,
const int Nin,
const int ist2,
const int ex)
const
175 return AIndex_eo_qxs::idxh<REALTYPE>(in, Nin, ist2,
179 int idxh_SP(
const int in,
const int ist2,
const int ex)
const
180 {
return idxh(in, Nvcd, ist2, ex); }
182 int idxh_SPr(
const int ic,
const int id,
const int ist,
const int ex)
const
184 int in = 2 * (
id + Nd * ic);
185 return idxh_SP(in, ist, ex);
188 int idxh_SPi(
const int ic,
const int id,
const int ist,
const int ex)
const
190 int in = 1 + 2 * (
id + Nd * ic);
191 return idxh_SP(in, ist, ex);
194 int site(
const int x2,
const int y,
const int z,
const int t,
196 {
return x2 + Nx2 * (y + Ny * (z + Nz * t)) + Nvol2 * ieo; }
198 int site(
const int is,
const int ieo)
const
199 {
return is + Nvol2 * ieo; }
201 int siteh(
const int x2,
const int y,
const int z,
const int t)
203 {
return x2 + Nx2 * (y + Ny * (z + Nz * t)); }
205 int leo(
const int y,
const int z,
const int t)
const
206 {
return Leo[y + Ny * (z + Nz * t)]; }
208 int leo(
const int iyzt)
const {
return Leo[iyzt]; }
210 template<
typename AFIELD>
213 template<
typename AFIELD>
int idx_Gr(const int ic1, const int ic2, const int ist, const int ex) const
int idxh(const int in, const int Nin, const int ist2, const int Nx2, const int Ny, const int Nvol2, const int ex)
int idxh_SP(const int in, const int ist2, const int ex) const
int leo(const int y, const int z, const int t) const
int idx_Gi(const int ic1, const int ic2, const int ist, const int ex) const
int siteh(const int x2, const int y, const int z, const int t) const
int site(const int is, const int ieo) const
Bridge::VerboseLevel m_vl
int idx< float >(const int in, const int Nin, const int ist, const int Nx2, const int Ny, const int leo, const int Nvol2, const int ex)
int idx_SPr(const int ic, const int id, const int ist, const int ex) const
int site(const int x2, const int y, const int z, const int t, const int ieo) const
int leo(const int iyzt) const
int idxh_SPr(const int ic, const int id, const int ist, const int ex) const
int idx(const int in, const int Nin, const int ist, const int Nx2, const int Ny, const int leo, const int Nvol2, const int ex)
int idx(const int in, const int Nin, const int ist, const int ex) const
int idxh(const int in, const int Nin, const int ist2, const int ex) const
int idx_SP(const int in, const int ist, const int ex) const
int idx_G(const int idf, const int ist, const int ex) const
int idx_SPi(const int ic, const int id, const int ist, const int ex) const
int site(const int x, const int y, const int z, const int t) const
Container of Field-type object.
int idxh< float >(const int in, const int Nin, const int ist2, const int Nx2, const int Ny, const int Nvol2, const int ex)
int idxh_SPi(const int ic, const int id, const int ist, const int ex) const