QDP++
qdp_sse_fused_spin_proj_evaluates_wrapper.h
Go to the documentation of this file.
1#ifndef QDP_SSE_FUSED_SPIN_PROJ_EVALUATES_WRAPPER_H
2#define QDP_SSE_FUSED_SPIN_PROJ_EVALUATES_WRAPPER_H
3
5// Threading evaluates wrappers
6//
7// by Xu Guo, EPCC, 17 Oct, 2008
9
10// user arg for evaluate having order
12 const OLattice< SU3Mat32 >& u;
13 const OLattice< FVec32 >& a;
14 OLattice< HVec32 >& d;
15 int base;
16 void (*func)(const REAL32*, REAL32*, unsigned int);
17};
18
19
20// user func for evaluate having order
21inline
23
24 const OLattice< SU3Mat32 >& u = arg->u;
25 const OLattice< FVec32 >& a = arg->a ;
26 OLattice< HVec32 >& d = arg->d;
27 int base = arg->base;
28 void (*func)(const REAL32*, REAL32*,unsigned int) = arg->func;
29
30 int low = lo + base;
31 int high = hi + base;
32
33 for (int site = low; site < high; site++){
34 HVec32 tmp ;
35 func( (REAL32 *)&(a.elem(site).elem(0).elem(0).real()),
36 (REAL32 *)&(tmp.elem(0).elem(0).real()),
37 1);
38
39 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
40 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
41 half_wilson_vectorf *dh = (half_wilson_vectorf *)&( d.elem(site).elem(0).elem(0).real());
42
43 intrin_sse_mult_adj_su3_mat_hwvec(um, tmph, dh);
44 }
45
46}
47
48
49// user arg for evaluate NOT having order
51 const OLattice< SU3Mat32 >& u;
52 const OLattice< FVec32 >& a;
53 OLattice< HVec32 >& d;
54 const int *tab;
55 void (*func)(const REAL32*, REAL32*, unsigned int);
56};
57
58
59// user func for evaluate NOT having order
60inline
62
63 const OLattice< SU3Mat32 >& u = arg->u;
64 const OLattice< FVec32 >& a = arg->a ;
65 OLattice< HVec32 >& d = arg->d;
66 const int *tab = arg->tab;
67 void (*func)(const REAL32*, REAL32*, unsigned int) = arg->func;
68
69 for (int j = lo; j < hi; j++){
70 int site=tab[j];
71 HVec32 tmp ;
72 func( (REAL32 *)&(a.elem(site).elem(0).elem(0).real()),
73 (REAL32 *)&(tmp.elem(0).elem(0).real()),
74 1);
75
76 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
77 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
78 half_wilson_vectorf *dh = (half_wilson_vectorf *)&( d.elem(site).elem(0).elem(0).real());
79
80 intrin_sse_mult_adj_su3_mat_hwvec(um, tmph, dh);
81 }
82
83}
84
85
86
87#endif
float REAL32
void unordered_sse_fused_spin_proj_evaluate_function(int lo, int hi, int myId, unordered_sse_fused_spin_proj_user_arg *arg)
void ordered_sse_fused_spin_proj_evaluate_function(int lo, int hi, int myId, ordered_sse_fused_spin_proj_user_arg *arg)
void(* func)(const REAL32 *, REAL32 *, unsigned int)
void(* func)(const REAL32 *, REAL32 *, unsigned int)