QDP++
qdp_generic_fused_spin_recon_evaluates_wrapper.h
Go to the documentation of this file.
1#ifndef QDP_GENERIC_FUSED_SPIN_RECON_EVALUATES_WRAPPER_H
2#define QDP_GENERIC_FUSED_SPIN_RECON_EVALUATES_WRAPPER_H
3
5// Threading evaluates wrappers
6//
7// by Xu Guo, EPCC, 28 August, 2008
9
10// user arg for evaluate having order
12 const OLattice< SU3Mat >& u;
13 const OLattice< HVec >& a;
14 OLattice< FVec >& d;
15 int base;
16 void (*func)(const REAL*, REAL*, unsigned int);
17};
18
19
20// user func for evaluate having order
21inline
23
24 const OLattice< SU3Mat >& u = arg->u;
25 const OLattice< HVec >& a = arg->a ;
26 OLattice< FVec >& d = arg->d;
27 int base = arg->base;
28 void (*func)(const REAL*, REAL*, 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 HVec tmp;
35 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
36 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
37
38
39 func( (REAL *)&(tmp.elem(0).elem(0).real()), (REAL *)&(d.elem(site).elem(0).elem(0).real()), 1);
40 }
41
42}
43
44
45// user arg for evaluate NOT having order
47 const OLattice< SU3Mat >& u;
48 const OLattice< HVec >& a;
49 OLattice< FVec >& d;
50 const int *tab;
51 void (*func)(const REAL*, REAL*, unsigned int);
52};
53
54
55// user func for evaluate NOT having order
56inline
58
59 const OLattice< SU3Mat >& u = arg->u;
60 const OLattice< HVec >& a = arg->a ;
61 OLattice< FVec >& d = arg->d;
62 const int *tab = arg->tab;
63 void (*func)(const REAL*, REAL*, unsigned int) = arg->func;
64
65 for (int j = lo; j < hi; j++){
66
67 int site = tab[j];
68
69 HVec tmp;
70 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
71 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
72
73
74 func( (REAL *)&(tmp.elem(0).elem(0).real()), (REAL *)&(d.elem(site).elem(0).elem(0).real()),1);
75 }
76
77}
78
79
80
81
82
83#endif
#define _inline_mult_su3_mat_vec(aa, bb, cc)
void unordered_fused_spin_recon_evaluate_function(int lo, int hi, int myId, unordered_fused_spin_recon_user_arg *arg)
void ordered_fused_spin_recon_evaluate_function(int lo, int hi, int myId, ordered_fused_spin_recon_user_arg *arg)
REAL32 REAL