Go to the documentation of this file.
10 #ifndef QXS_AINDEX_LEX_INCLUDED
11 #define QXS_AINDEX_LEX_INCLUDED
19 #include "lib_alt_QXS/inline/define_vlen.h"
20 #include "lib_alt_QXS/inline/define_params.h"
23 template<
typename REALTYPE>
24 inline int idx(
const int in,
const int Nin,
const int ist,
25 const int Nx,
const int Ny,
const int Nxv,
26 const int Nyv,
const int Nstv,
const int ex)
29 int iy = (ist / Nx) % Ny;
35 int izt = ist / (Nx * Ny);
36 int istv = ixv + Nxv * (iyv + Nyv * izt);
37 return k +
VLEND * (in + Nin * (istv + Nstv * ex));
42 inline int idx<float>(
const int in,
const int Nin,
const int ist,
43 const int Nx,
const int Ny,
const int Nxv,
44 const int Nyv,
const int Nstv,
const int ex)
47 int iy = (ist / Nx) % Ny;
53 int izt = ist / (Nx * Ny);
54 int istv = ixv + Nxv * (iyv + Nyv * izt);
55 return k +
VLENS * (in + Nin * (istv + Nstv * ex));
59 template<
typename REALTYPE>
65 template<
typename REALTYPE>
79 template<
typename REALTYPE>
84 int m_Nx, m_Ny,
m_Nz, m_Nt, m_Nst;
85 int m_Nxv, m_Nyv,
m_Nzt, m_Nstv;
111 m_Ndf = 2 * m_Nc * m_Nc;
112 m_Nvcd = 2 * m_Nc * m_Nd;
113 m_Nst = m_Nx * m_Ny * m_Nz * m_Nt;
114 m_Nxv = AIndex_lex_qxs::set_Nxv<REALTYPE>(m_Nx);
115 m_Nyv = AIndex_lex_qxs::set_Nyv<REALTYPE>(m_Ny);
117 m_Nstv = m_Nxv * m_Nyv * m_Nzt;
122 int site(
const int x,
const int y,
const int z,
const int t)
const
123 {
return x + m_Nx * (y + m_Ny * (z + m_Nz * t)); }
125 int idx(
const int in,
const int Nin,
const int ist,
const int ex)
const
127 return AIndex_lex_qxs::idx<REALTYPE>(in, Nin, ist, m_Nx, m_Ny,
128 m_Nxv, m_Nyv, m_Nstv, ex);
131 int idx_G(
const int idf,
const int ist,
const int ex)
const
132 {
return idx(idf, m_Ndf, ist, ex); }
134 int idx_Gr(
const int ic1,
const int ic2,
const int ist,
const int ex)
const
136 int idf = 2 * (ic2 + m_Nc * ic1);
137 return idx_G(idf, ist, ex);
140 int idx_Gi(
const int ic1,
const int ic2,
const int ist,
const int ex)
const
142 int idf = 1 + 2 * (ic2 + m_Nc * ic1);
143 return idx_G(idf, ist, ex);
146 int idx_SP(
const int in,
const int ist,
const int ex)
const
147 {
return idx(in, m_Nvcd, ist, ex); }
149 int idx_SPr(
const int ic,
const int id,
const int ist,
const int ex)
const
151 int in = 2 * (
id + m_Nd * ic);
152 return idx_SP(in, ist, ex);
155 int idx_SPi(
const int ic,
const int id,
const int ist,
const int ex)
const
157 int in = 1 + 2 * (
id + m_Nd * ic);
158 return idx_SP(in, ist, ex);
int set_Nyv(const int Ny)
int idx_SPr(const int ic, const int id, const int ist, const int ex) const
int set_Nyv< float >(const int Ny)
int idx_SPi(const int ic, const int id, const int ist, const int ex) const
int idx_SP(const int in, const int ist, const int ex) const
int site(const int x, 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 set_Nxv(const int Nx)
int idx< float >(const int in, const int Nin, const int ist, const int Nx, const int Ny, const int Nxv, const int Nyv, const int Nstv, const int ex)
int idx(const int in, const int Nin, const int ist, const int ex) const
int idx(const int in, const int Nin, const int ist, const int Nx, const int Ny, const int Nxv, const int Nyv, const int Nstv, const int ex)
int set_Nxv< float >(const int Nx)
int idx_G(const int idf, const int ist, const int ex) const
int idx_Gr(const int ic1, const int ic2, const int ist, const int ex) const
AIndex_lex(int Nx, int Ny, int Nz, int Nt)