1#ifndef QDP_SCALARSITE_GENERIC_CBLAS_WRAPPER_H
2#define QDP_SCALARSITE_GENERIC_CBLAS_WRAPPER_H
33 vcscal(Out, scalep, In, n_3vec);
39 const OLattice< CTVec > &x_,
40 OLattice< CTVec >& d_,
42 const int* tab_) :
x(x_),
d(d_),
scalep(scalep_),
tab(tab_) {}
44 const OLattice< CTVec > &
x;
53 const OLattice< CTVec > &x = a->
x;
54 OLattice< CTVec >& d = a->
d;
56 const int* tab = a->
tab;
58 for(
int j=lo; j < hi; j++) {
60 REAL *d_start = &(d.elem(i).elem(0).elem(0).
real());
61 REAL *x_start = (
REAL *) &(x.elem(i).elem(0).elem(0).real());
62 vcscal(d_start, scalep, x_start, 1);
94 InScale = &InScale[index];
96 vcaxpy3(Out, scalep, InScale, Add, n_3vec);
102 const OLattice< CTVec > &x_,
103 OLattice< CTVec >& d_,
105 const int* tab_) :
x(x_),
d(d_),
scalep(scalep_),
tab(tab_) {}
107 const OLattice< CTVec > &
x;
108 OLattice< CTVec >&
d;
116 const OLattice< CTVec > &x = a->
x;
117 OLattice< CTVec >& d = a->
d;
119 const int* tab = a->
tab;
121 for(
int j=lo; j < hi; j++) {
124 REAL* xptr = (
REAL *)&(x.elem(i).elem(0).elem(0).real());
125 REAL* yptr = &(d.elem(i).elem(0).elem(0).
real());
127 vcaxpy3(yptr, scalep, xptr, yptr, 1);
136 const OLattice< CTVec > &x_,
137 const OLattice< CTVec >& y_,
138 OLattice< CTVec >& d_,
140 const int* tab_) :
x(x_),
y(y_),
d(d_),
scalep(scalep_),
tab(tab_) {}
142 const OLattice< CTVec > &
x;
143 const OLattice< CTVec >&
y;
144 OLattice< CTVec >&
d;
152 const OLattice< CTVec > &x = a->
x;
153 const OLattice< CTVec >& y = a->
y;
154 OLattice< CTVec >& d = a->
d;
156 const int* tab = a->
tab;
158 for(
int j=lo; j < hi; j++) {
161 REAL *xptr = (
REAL *) &(x.elem(i).elem(0).elem(0).real());
162 REAL *yptr = (
REAL *) &(y.elem(i).elem(0).elem(0).real());
163 REAL *zptr = &(d.elem(i).elem(0).elem(0).
real());
166 vcaxpy3(zptr, scalep, xptr, yptr, 1);
196 int n_3vec = hi - lo;
199 InScale = &InScale[index];
201 vcaxmy3(Out, scalep, InScale, Sub, n_3vec);
207 const OLattice< CTVec > &x_,
208 const OLattice< CTVec >& y_,
209 OLattice< CTVec >& d_,
211 const int* tab_) :
x(x_),
y(y_),
d(d_),
scalep(scalep_),
tab(tab_) {}
213 const OLattice< CTVec > &
x;
214 const OLattice< CTVec >&
y;
215 OLattice< CTVec >&
d;
223 const OLattice< CTVec > &x = a->
x;
224 const OLattice< CTVec >& y = a->
y;
225 OLattice< CTVec >& d = a->
d;
227 const int* tab = a->
tab;
229 for(
int j=lo; j < hi; j++) {
232 REAL *xptr = (
REAL *) &(x.elem(i).elem(0).elem(0).real());
233 REAL *yptr = (
REAL *) &(y.elem(i).elem(0).elem(0).real());
234 REAL *zptr = &(d.elem(i).elem(0).elem(0).
real());
237 vcaxmy3(zptr, scalep, xptr, yptr, 1);
267 int n_3vec = hi - lo;
272 vcaxpby3(Out, ap, xp, bp, yp, n_3vec);
278 const OLattice< CTVec > &x_,
279 const OLattice< CTVec >& y_,
280 OLattice< CTVec >& d_,
283 const int* tab_) :
x(x_),
y(y_),
d(d_),
aptr(aptr_),
bptr(bptr_),
tab(tab_) {}
285 const OLattice< CTVec > &
x;
286 const OLattice< CTVec >&
y;
287 OLattice< CTVec >&
d;
296 const OLattice< CTVec > &x = a->
x;
297 const OLattice< CTVec >& y = a->
y;
298 OLattice< CTVec >& d = a->
d;
301 const int* tab = a->
tab;
303 for(
int j=lo; j < hi; j++) {
306 REAL *xptr = (
REAL *) &(x.elem(i).elem(0).elem(0).real());
307 REAL *yptr = (
REAL *) &(y.elem(i).elem(0).elem(0).real());
308 REAL *zptr = &(d.elem(i).elem(0).elem(0).
real());
311 vcaxpby3(zptr, aptr, xptr, bptr, yptr, 1);
341 int n_3vec = hi - lo;
346 vcaxmby3(Out, ap, xp, bp, yp, n_3vec);
352 const OLattice< CTVec > &x_,
353 const OLattice< CTVec >& y_,
354 OLattice< CTVec >& d_,
357 const int* tab_):
x(x_),
y(y_),
d(d_),
aptr(aptr_),
bptr(bptr_),
tab(tab_) {}
359 const OLattice< CTVec > &
x;
360 const OLattice< CTVec >&
y;
361 OLattice< CTVec >&
d;
370 const OLattice< CTVec > &x = a->
x;
371 const OLattice< CTVec >& y = a->
y;
372 OLattice< CTVec >& d = a->
d;
375 const int* tab = a->
tab;
377 for(
int j=lo; j < hi; j++) {
380 REAL *xptr = (
REAL *) &(x.elem(i).elem(0).elem(0).real());
381 REAL *yptr = (
REAL *) &(y.elem(i).elem(0).elem(0).real());
382 REAL *zptr = &(d.elem(i).elem(0).elem(0).
real());
385 vcaxmby3(zptr, aptr, xptr, bptr, yptr, 1);
MakeReturn< UnaryNode< FnReal, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnReal >::Type_t >::Expression_t real(const QDPExpr< T1, C1 > &l)
void ordered_vcaxpby3_evaluate_function(int lo, int hi, int myId, ordered_vcaxpby3_user_arg *a)
void ordered_vcaxpy3_evaluate_function(int lo, int hi, int myId, ordered_vcaxpy3_user_arg *a)
void ordered_vcaxmy3_evaluate_function(int lo, int hi, int myId, ordered_vcaxmy3_user_arg *a)
void unordered_vcaxmby3_evaluate_function(int lo, int hi, int myId, unordered_vcaxmby3_user_arg *a)
void unordered_vcaxpy3_y_evaluate_function(int lo, int hi, int myId, unordered_vcaxpy3_y_user_arg *a)
void unordered_vcaxpy3_z_evaluate_function(int lo, int hi, int myId, unordered_vcaxpy3_z_user_arg *a)
void ordered_vcaxmby3_evaluate_function(int lo, int hi, int myId, ordered_vcaxmby3_user_arg *a)
void unordered_vcaxmy3_evaluate_function(int lo, int hi, int myId, unordered_vcaxmy3_user_arg *a)
void ordered_vcscal_evaluate_function(int lo, int hi, int myId, ordered_vcscal_user_arg *a)
void unordered_vcscal_evaluate_function(int lo, int hi, int myId, unordered_vcscal_user_arg *a)
void unordered_vcaxpby3_evaluate_function(int lo, int hi, int myId, unordered_vcaxpby3_user_arg *a)
const OLattice< CTVec > & x
unordered_vcaxmby3_user_arg(const OLattice< CTVec > &x_, const OLattice< CTVec > &y_, OLattice< CTVec > &d_, REAL *aptr_, REAL *bptr_, const int *tab_)
const OLattice< CTVec > & y
unordered_vcaxmy3_user_arg(const OLattice< CTVec > &x_, const OLattice< CTVec > &y_, OLattice< CTVec > &d_, REAL *scalep_, const int *tab_)
const OLattice< CTVec > & x
const OLattice< CTVec > & y
const OLattice< CTVec > & x
const OLattice< CTVec > & y
unordered_vcaxpby3_user_arg(const OLattice< CTVec > &x_, const OLattice< CTVec > &y_, OLattice< CTVec > &d_, REAL *aptr_, REAL *bptr_, const int *tab_)
const OLattice< CTVec > & x
unordered_vcaxpy3_y_user_arg(const OLattice< CTVec > &x_, OLattice< CTVec > &d_, REAL *scalep_, const int *tab_)
unordered_vcaxpy3_z_user_arg(const OLattice< CTVec > &x_, const OLattice< CTVec > &y_, OLattice< CTVec > &d_, REAL *scalep_, const int *tab_)
const OLattice< CTVec > & x
const OLattice< CTVec > & y
unordered_vcscal_user_arg(const OLattice< CTVec > &x_, OLattice< CTVec > &d_, REAL *scalep_, const int *tab_)
const OLattice< CTVec > & x