1#ifndef QDP_GENERIC_SPIN_PROJECT_EVALUTATES_H
2#define QDP_GENERIC_SPIN_PROJECT_EVALUTATES_H
28template<
class A,
class B>
46 int total_n_vec = s.
end() - s.
start() +1;
84template<
class A,
class B>
103 int total_n_vec = s.
end() - s.
start() +1;
140template<
class A,
class B>
157 int total_n_vec = s.
end() - s.
start() +1;
219 //unsigned int n_vec=s.end() - s.start()+1;
220 //inlineSpinProjDir3Plus(aptr, bptr, n_vec);
223 const int* tab = s.siteTable().slice();
225 int totalSize = s.numSiteTable();
227 unordered_spin_project_user_arg<A, B> arg = {a, b, tab, inlineSpinProjDir3Plus};
229 dispatch_to_threads(totalSize, arg, unordered_spin_project_evaluate_function);
235 for(int j=0; j < s.numSiteTable(); j++) {
238 REAL *aptr =(REAL *)&(a.elem(i).elem(0).elem(0).real());
239 REAL *bptr =(REAL *)&(b.elem(i).elem(0).elem(0).real());
240 inlineSpinProjDir3Plus(aptr, bptr, 1);
246// d = SpinProjectDir0Minus(Vec);
247template<class A, class B>
249void evaluate(OLattice< HVec >& b,
252 UnaryNode< FnSpinProjectDir0Minus,
253 Reference< QDPType<FVec,OLattice< FVec > > > >,
254 OLattice< HVec > > &rhs,
258 // Get at pointer for 4 vec
259 const OLattice< FVec >& a = static_cast<const OLattice< FVec > &>(rhs.expression().child());
261 if( s.hasOrderedRep() ) {
262 REAL *aptr =(REAL *)&(a.elem(s.start()).elem(0).elem(0).real());
263 REAL *bptr =(REAL *)&(b.elem(s.start()).elem(0).elem(0).real());
265 int total_n_vec = s.end() - s.start() +1;
267 ordered_spin_project_user_arg arg = {aptr, bptr, inlineSpinProjDir0Minus};
269 dispatch_to_threads(total_n_vec, arg, ordered_spin_project_evaluate_function);
274 //unsigned int n_vec=s.end() - s.start()+1;
275 //inlineSpinProjDir0Minus(aptr, bptr, n_vec);
278 const int* tab = s.siteTable().slice();
280 int totalSize = s.numSiteTable();
282 unordered_spin_project_user_arg<A, B> arg = {a, b, tab, inlineSpinProjDir0Minus};
284 dispatch_to_threads(totalSize, arg, unordered_spin_project_evaluate_function);
290 for(int j=0; j < s.numSiteTable(); j++) {
293 REAL *aptr =(REAL *)&(a.elem(i).elem(0).elem(0).real());
294 REAL *bptr =(REAL *)&(b.elem(i).elem(0).elem(0).real());
295 inlineSpinProjDir0Minus(aptr, bptr, 1);
302template<
class A,
class B>
319 int total_n_vec = s.
end() - s.
start() +1;
357template<
class A,
class B>
375 int total_n_vec = s.
end() - s.
start() +1;
413template<
class A,
class B>
430 int total_n_vec = s.
end() - s.
start() +1;
470template<
class A,
class B>
488 int total_n_vec = s.
end() - s.
start() +1;
527template<
class A,
class B>
544 int total_n_vec = s.
end() - s.
start() +1;
581template<
class A,
class B>
599 int total_n_vec = s.
end() - s.
start() +1;
636template<
class A,
class B>
653 int total_n_vec = s.
end() - s.
start() +1;
691template<
class A,
class B>
708 int total_n_vec = s.
end() - s.
start() +1;
746template<
class A,
class B>
764 int total_n_vec = s.
end() - s.
start() +1;
802template<
class A,
class B>
820 int total_n_vec = s.
end() - s.
start() +1;
858template<
class A,
class B>
875 int total_n_vec = s.
end() - s.
start() +1;
915template<
class A,
class B>
934 int total_n_vec = s.
end() - s.
start() +1;
972template<
class A,
class B>
989 int total_n_vec = s.
end() - s.
start() +1;
1027template<
class A,
class B>
1044 int total_n_vec = s.
end() - s.
start() +1;
1082template<
class A,
class B>
1099 int total_n_vec = s.
end() - s.
start() +1;
1137template<
class A,
class B>
1155 int total_n_vec = s.
end() - s.
start() +1;
1194template<
class A,
class B>
1211 int total_n_vec = s.
end() - s.
start() +1;
1249template<
class A,
class B>
1268 int total_n_vec = s.
end() - s.
start() +1;
1306template<
class A,
class B>
1324 int total_n_vec = s.
end() - s.
start() +1;
Primitive spin Vector class.
Expression class for QDP.
QDPType - major type class/container for all QDP objects.
Subsets - controls how lattices are looped.
const multi1d< int > & siteTable() const
bool hasOrderedRep() const
const T * slice() const
Return ref to a column slice.
void evaluate(OLattice< DCol > &d, const OpAssign &op, const QDPExpr< BinaryNode< OpMultiply, Reference< QDPType< DCol, OLattice< DCol > > >, Reference< QDPType< DCol, OLattice< DCol > > > >, OLattice< DCol > > &rhs, const Subset &s)
Yet another random number generator.
void dispatch_to_threads(int numSiteTable, Arg a, void(*func)(int, int, int, Arg *))
void inlineSpinReconDir0Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_0).
void inlineAddSpinReconDir1Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_1).
PSpinVector< PColorVector< RComplex< REAL >, 3 >, 2 > HVec
void inlineAddSpinReconDir2Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_2).
void inlineAddSpinReconDir1Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_1).
void inlineSpinReconDir2Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_2).
void inlineSpinReconDir1Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_1).
void ordered_spin_project_evaluate_function(int lo, int hi, int myId, ordered_spin_project_user_arg *arg)
void inlineSpinProjDir0Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin Project (1/2)(1+\gamma_0).
void unordered_spin_project_evaluate_function(int lo, int hi, int myId, unordered_spin_project_user_arg< A, B > *arg)
REAL SpinColFull[4][3][2]
void inlineAddSpinReconDir3Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma3).
void inlineSpinProjDir1Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin Project (1/2)(1-\gamma_1).
REAL SpinColHalf[2][3][2]
void inlineSpinReconDir2Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_2).
void inlineSpinProjDir1Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin Project (1/2)(1+\gamma_1).
void inlineAddSpinReconDir3Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma3).
void inlineSpinProjDir3Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin Project (1/2)(1-\gamma_3).
void inlineSpinProjDir2Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin Project (1/2)(1-\gamma_2).
void inlineSpinReconDir3Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma3).
void inlineAddSpinReconDir0Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_0).
void inlineAddSpinReconDir2Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_2).
void inlineSpinReconDir3Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma3).
void inlineSpinProjDir2Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin Project (1/2)(1+\gamma_2).
void inlineAddSpinReconDir0Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_0).
void inlineSpinReconDir1Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_1).
PSpinVector< PColorVector< RComplex< REAL >, 3 >, 4 > FVec
void inlineSpinReconDir0Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_0).