QDP++
qdp_sse_fused_spin_recon_evaluates_wrapper.h
Go to the documentation of this file.
1#ifndef QDP_SSE_FUSED_SPIN_RECON_EVALUATES_WRAPPER_H
2#define QDP_SSE_FUSED_SPIN_RECON_EVALUATES_WRAPPER_H
3
5// Threading evaluates wrappers
6//
7// by Xu Guo, EPCC, 21 Oct, 2008
9
10// user arg for evaluate having order
12 const OLattice< SU3Mat32 >& u;
13 const OLattice< HVec32 >& a;
14 OLattice< FVec32 >& 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< HVec32 >& a = arg->a ;
26 OLattice< FVec32 >& 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
35 HVec32 tmp ;
36
37 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
38 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
39 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
40
41 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
42
43
44 func( (REAL32 *)&(tmp.elem(0).elem(0).real()),
45 (REAL32 *)&(d.elem(site).elem(0).elem(0).real()),
46 1);
47
48 }
49
50}
51
52
53// user arg for evaluate NOT having order
55 const OLattice< SU3Mat32 >& u;
56 const OLattice< HVec32 >& a;
57 OLattice< FVec32 >& d;
58 const int *tab;
59 void (*func)(const REAL32*, REAL32*, unsigned int);
60};
61
62
63// user func for evaluate NOT having order
64inline
66
67 const OLattice< SU3Mat32 >& u = arg->u;
68 const OLattice< HVec32 >& a = arg->a ;
69 OLattice< FVec32 >& d = arg->d;
70 const int *tab = arg->tab;
71 void (*func)(const REAL32*, REAL32*, unsigned int) = arg->func;
72
73 for (int j = lo; j < hi; j++){
74
75 int site=tab[j];
76
77 HVec32 tmp ;
78
79 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
80 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
81 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
82
83 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
84
85
86 func( (REAL32 *)&(tmp.elem(0).elem(0).real()),
87 (REAL32 *)&(d.elem(site).elem(0).elem(0).real()),
88 1);
89 }
90
91}
92
93
94#endif
float REAL32
void ordered_sse_fused_spin_recon_evaluate_function(int lo, int hi, int myId, ordered_sse_fused_spin_recon_user_arg *arg)
void unordered_sse_fused_spin_recon_evaluate_function(int lo, int hi, int myId, unordered_sse_fused_spin_recon_user_arg *arg)
void(* func)(const REAL32 *, REAL32 *, unsigned int)
void(* func)(const REAL32 *, REAL32 *, unsigned int)