QDP++
qdp_scalarsite_sse_blas_g5.h
Go to the documentation of this file.
1// $Id: qdp_scalarsite_sse_blas_g5.h,v 1.8 2009-02-11 20:50:45 bjoo Exp $
2
8
9
10#ifndef QDP_SCALARSITE_SSE_BLAS_G5_H
11#define QDP_SCALARSITE_SSE_BLAS_G5_H
12
14
15using namespace QDP;
16
17namespace QDP {
18
19// Types needed for the expression templates.
20// TVec has outer Ns template so it ought to work for staggered as well
23
24// #define DEBUG_BLAS_G6
25// TVec is the LatticeFermion from qdp_dwdefs.h with the OLattice<> stripped
26// from around it
27
28// TScalar is the usual Real, with the OScalar<> stripped from it
29//
30// THis is simply to make the code more readable, and reduces < < s and > >s
31// in the template arguments
32
33// d += Scalar*ChiralProjPlus(Vec);
34template<>
35inline
37 const OpAddAssign& op,
39 Reference< QDPType< TScal, OScalar < TScal > > >,
41>,
42 OLattice< TVec > > &rhs,
43 const Subset& s)
44{
45
46#ifdef DEBUG_BLAS_G5
47 QDPIO::cout << "y += a*P{+}x" << endl;
48#endif
49
50 const OLattice< TVec >& x = static_cast<const OLattice< TVec > &>(rhs.expression().right().child());
51 const OScalar< TScal >& a = static_cast<const OScalar< TScal > &> (rhs.expression().left());
52
53 REAL ar = a.elem().elem().elem().elem();
54 REAL* aptr = &ar;
55
56 if( s.hasOrderedRep()) {
57 REAL* xptr = (REAL *)&(x.elem(s.start()).elem(0).elem(0).real());
58 REAL* yptr = (REAL *)&(d.elem(s.start()).elem(0).elem(0).real());
59
60 int n_4vec = (s.end()-s.start()+1);
61 xpayz_g5ProjPlus(yptr, aptr,yptr, xptr, n_4vec);
62 }
63 else {
64 const int* tab = s.siteTable().slice();
65 for(int j=0; j < s.numSiteTable(); j++) {
66 int i=tab[j];
67
68 REAL* xptr = (REAL *)&(x.elem(i).elem(0).elem(0).real());
69 REAL* yptr = (REAL *)&(d.elem(i).elem(0).elem(0).real());
70 xpayz_g5ProjPlus(yptr, aptr,yptr, xptr, 1);
71
72 }
73 }
74
75}
76
77// d += Scalar*ChiralProjMinus(Vec);
78template<>
79inline
81 const OpAddAssign& op,
83 Reference< QDPType< TScal, OScalar < TScal > > >,
85>,
86 OLattice< TVec > > &rhs,
87 const Subset& s)
88{
89
90#ifdef DEBUG_BLAS_G5
91 QDPIO::cout << "y += a*P{-}x" << endl;
92#endif
93
94 const OLattice< TVec >& x = static_cast<const OLattice< TVec > &>(rhs.expression().right().child());
95 const OScalar< TScal >& a = static_cast<const OScalar< TScal > &> (rhs.expression().left());
96
97
98 REAL ar = a.elem().elem().elem().elem();
99 REAL* aptr = &ar;
100
101 if( s.hasOrderedRep()) {
102 REAL* xptr = (REAL *)&(x.elem(s.start()).elem(0).elem(0).real());
103 REAL* yptr = (REAL *)&(d.elem(s.start()).elem(0).elem(0).real());
104
105
106 int n_4vec = (s.end()-s.start()+1);
107 xpayz_g5ProjMinus(yptr, aptr,yptr, xptr, n_4vec);
108 }
109 else {
110 const int* tab = s.siteTable().slice();
111 for(int j=0; j < s.numSiteTable(); j++) {
112 int i=tab[j];
113
114 REAL* xptr = (REAL *)&(x.elem(i).elem(0).elem(0).real());
115 REAL* yptr = (REAL *)&(d.elem(i).elem(0).elem(0).real());
116 xpayz_g5ProjMinus(yptr, aptr,yptr, xptr, 1);
117
118 }
119 }
120
121}
122
123
124// d -= Scalar*ChiralProjPlus(Vec);
125template<>
126inline
128 const OpSubtractAssign& op,
130 Reference< QDPType< TScal, OScalar < TScal > > >,
132>,
133 OLattice< TVec > > &rhs,
134 const Subset& s)
135{
136
137#ifdef DEBUG_BLAS_G5
138 QDPIO::cout << "y -= a*P{+}x" << endl;
139#endif
140
141 const OLattice< TVec >& x = static_cast<const OLattice< TVec > &>(rhs.expression().right().child());
142 const OScalar< TScal >& a = static_cast<const OScalar< TScal > &> (rhs.expression().left());
143
144
145 REAL ar = a.elem().elem().elem().elem();
146 REAL* aptr = &ar;
147
148 if( s.hasOrderedRep()) {
149 REAL* xptr = (REAL *)&(x.elem(s.start()).elem(0).elem(0).real());
150 REAL* yptr = (REAL *)&(d.elem(s.start()).elem(0).elem(0).real());
151
152
153 int n_4vec = (s.end()-s.start()+1);
154 xmayz_g5ProjPlus(yptr, aptr,yptr, xptr, n_4vec);
155 }
156 else {
157 const int* tab = s.siteTable().slice();
158 for(int j=0; j < s.numSiteTable(); j++) {
159 int i=tab[j];
160
161 REAL* xptr = (REAL *)&(x.elem(i).elem(0).elem(0).real());
162 REAL* yptr = (REAL *)&(d.elem(i).elem(0).elem(0).real());
163 xmayz_g5ProjPlus(yptr, aptr,yptr, xptr, 1);
164
165 }
166 }
167
168}
169
170// d -= Scalar*ChiralProjMinus(Vec);
171template<>
172inline
174 const OpSubtractAssign& op,
176 Reference< QDPType< TScal, OScalar < TScal > > >,
178>,
179 OLattice< TVec > > &rhs,
180 const Subset& s)
181{
182
183#ifdef DEBUG_BLAS_G5
184 QDPIO::cout << "y -= a*P{-}x" << endl;
185#endif
186
187 const OLattice< TVec >& x = static_cast<const OLattice< TVec > &>(rhs.expression().right().child());
188 const OScalar< TScal >& a = static_cast<const OScalar< TScal > &> (rhs.expression().left());
189
190
191 REAL ar = a.elem().elem().elem().elem();
192 REAL* aptr = &ar;
193
194 if( s.hasOrderedRep()) {
195
196 REAL* xptr = (REAL *)&(x.elem(s.start()).elem(0).elem(0).real());
197 REAL* yptr = (REAL *)&(d.elem(s.start()).elem(0).elem(0).real());
198
199
200 int n_4vec = (s.end()-s.start()+1);
201 xmayz_g5ProjMinus(yptr, aptr,yptr, xptr, n_4vec);
202 }
203 else {
204 const int* tab = s.siteTable().slice();
205 for(int j=0; j < s.numSiteTable(); j++) {
206 int i=tab[j];
207
208 REAL* xptr = (REAL *)&(x.elem(i).elem(0).elem(0).real());
209 REAL* yptr = (REAL *)&(d.elem(i).elem(0).elem(0).real());
210 xmayz_g5ProjMinus(yptr, aptr,yptr, xptr, 1);
211
212 }
213 }
214
215}
216
217
218// d += ChiralProjPlus(Vec);
219template<>
220inline
222 const OpAddAssign& op,
223 const QDPExpr<
225 OLattice< TVec > > &rhs,
226 const Subset& s)
227{
228
229#ifdef DEBUG_BLAS_G5
230 QDPIO::cout << "y += P{+}x" << endl;
231#endif
232
233 const OLattice< TVec >& x = static_cast<const OLattice< TVec > &>(rhs.expression().child());
234
235 if( s.hasOrderedRep()) {
236 REAL* xptr = (REAL *)&(x.elem(s.start()).elem(0).elem(0).real());
237 REAL* yptr = (REAL *)&(d.elem(s.start()).elem(0).elem(0).real());
238
239
240 int n_4vec = (s.end()-s.start()+1);
241 add_g5ProjPlus(yptr, yptr, xptr, n_4vec);
242 }
243 else {
244 const int* tab = s.siteTable().slice();
245 for(int j=0; j < s.numSiteTable(); j++) {
246 int i=tab[j];
247 REAL* xptr = (REAL *)&(x.elem(i).elem(0).elem(0).real());
248 REAL* yptr = (REAL *)&(d.elem(i).elem(0).elem(0).real());
249
250
251 add_g5ProjPlus(yptr, yptr, xptr, 1);
252 }
253 }
254
255
256
257}
258
259
260// d += ChiralProjMinus(Vec);
261template<>
262inline
264 const OpAddAssign& op,
265 const QDPExpr<
267 OLattice< TVec > > &rhs,
268 const Subset& s)
269{
270
271#ifdef DEBUG_BLAS_G5
272 QDPIO::cout << "y += P{-}x" << endl;
273#endif
274
275 const OLattice< TVec >& x = static_cast<const OLattice< TVec > &>(rhs.expression().child());
276
277 if( s.hasOrderedRep()) {
278 REAL* xptr = (REAL *)&(x.elem(s.start()).elem(0).elem(0).real());
279 REAL* yptr = (REAL *)&(d.elem(s.start()).elem(0).elem(0).real());
280
281
282 int n_4vec = (s.end()-s.start()+1);
283 add_g5ProjMinus(yptr, yptr, xptr, n_4vec);
284 }
285 else {
286 const int* tab = s.siteTable().slice();
287 for(int j=0; j < s.numSiteTable(); j++) {
288 int i=tab[j];
289 REAL* xptr = (REAL *)&(x.elem(i).elem(0).elem(0).real());
290 REAL* yptr = (REAL *)&(d.elem(i).elem(0).elem(0).real());
291
292
293 add_g5ProjMinus(yptr, yptr, xptr, 1);
294 }
295 }
296
297}
298
299
300// d -= ChiralProjPlus(Vec);
301template<>
302inline
304 const OpSubtractAssign& op,
305 const QDPExpr<
307 OLattice< TVec > > &rhs,
308 const Subset& s)
309{
310
311#ifdef DEBUG_BLAS_G5
312 QDPIO::cout << "y -= P{+}x" << endl;
313#endif
314
315 const OLattice< TVec >& x = static_cast<const OLattice< TVec > &>(rhs.expression().child());
316
317 if( s.hasOrderedRep()) {
318 REAL* xptr = (REAL *)&(x.elem(s.start()).elem(0).elem(0).real());
319 REAL* yptr = (REAL *)&(d.elem(s.start()).elem(0).elem(0).real());
320
321 int n_4vec = (s.end()-s.start()+1);
322 sub_g5ProjPlus(yptr, yptr, xptr, n_4vec);
323 }
324 else {
325 const int* tab = s.siteTable().slice();
326 for(int j=0; j < s.numSiteTable(); j++) {
327 int i=tab[j];
328 REAL* xptr = (REAL *)&(x.elem(i).elem(0).elem(0).real());
329 REAL* yptr = (REAL *)&(d.elem(i).elem(0).elem(0).real());
330
331 sub_g5ProjPlus(yptr, yptr, xptr, 1);
332 }
333 }
334}
335
336
337// d += ChiralProjMinus(Vec);
338template<>
339inline
341 const OpSubtractAssign& op,
342 const QDPExpr<
344 OLattice< TVec > > &rhs,
345 const Subset& s)
346{
347
348#ifdef DEBUG_BLAS_G5
349 QDPIO::cout << "y -= P{-}x" << endl;
350#endif
351
352 const OLattice< TVec >& x = static_cast<const OLattice< TVec > &>(rhs.expression().child());
353
354 if( s.hasOrderedRep() ) {
355
356 REAL* xptr = (REAL *)&(x.elem(s.start()).elem(0).elem(0).real());
357 REAL* yptr = (REAL *)&(d.elem(s.start()).elem(0).elem(0).real());
358
359
360 int n_4vec = (s.end()-s.start()+1);
361 sub_g5ProjMinus(yptr, yptr, xptr, n_4vec);
362 }
363 else {
364 const int* tab = s.siteTable().slice();
365 for(int j=0; j < s.numSiteTable(); j++) {
366 int i=tab[j];
367
368 REAL* xptr = (REAL *)&(x.elem(i).elem(0).elem(0).real());
369 REAL* yptr = (REAL *)&(d.elem(i).elem(0).elem(0).real());
370
371 sub_g5ProjMinus(yptr, yptr, xptr, 1);
372 }
373
374 }
375
376}
377
378// d = x + a P_{+} y
379template<>
380inline
382 const OpAssign &op,
383 const QDPExpr<
389 >
390 >,
392 > &rhs,
393 const Subset& s)
394{
395#ifdef DEBUG_BLAS_G5
396 QDPIO::cout << "z = x + a*P{+} y" << endl;
397#endif
398
399
400 // Peel the stuff out of the expression
401
402 // y is the left side of rhs
403 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&> (rhs.expression().left());
404
405 // ax is the right side of rhs and is in a binary node
406 typedef BinaryNode<OpMultiply,
409
410 // get the binary node
411 const BN &mulNode = static_cast<const BN&> (rhs.expression().right());
412
413 // get a and x out of the bynary node
414 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode.left());
415 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&>(mulNode.right().child());
416 // Set pointers
417 REAL ar = a.elem().elem().elem().elem();
418 REAL *aptr = (REAL *)&ar;
419
420
421 if ( s.hasOrderedRep() ) {
422 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
423 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
424 REAL *zptr = &(d.elem(s.start()).elem(0).elem(0).real());
425
426 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
427 int n_4vec = (s.end()-s.start()+1);
428 xpayz_g5ProjPlus(zptr, aptr, xptr, yptr, n_4vec);
429 }
430 else {
431 const int* tab = s.siteTable().slice();
432 for(int j=0; j < s.numSiteTable(); j++) {
433 int i=tab[j];
434 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
435 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
436 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
437
438 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
439 xpayz_g5ProjPlus(zptr, aptr, xptr, yptr, 1);
440
441 }
442 }
443
444}
445
446// d = x + a P_{-} y
447template<>
448inline
450 const OpAssign &op,
451 const QDPExpr<
457 >
458 >,
460 > &rhs,
461 const Subset& s)
462{
463#ifdef DEBUG_BLAS_G5
464 QDPIO::cout << "z = x + a*P{-} y" << endl;
465#endif
466
467
468 // Peel the stuff out of the expression
469
470 // y is the left side of rhs
471 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&> (rhs.expression().left());
472
473 // ax is the right side of rhs and is in a binary node
474 typedef BinaryNode<OpMultiply,
477
478 // get the binary node
479 const BN &mulNode = static_cast<const BN&> (rhs.expression().right());
480
481 // get a and x out of the bynary node
482 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode.left());
483 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&>(mulNode.right().child());
484 // Set pointers
485 REAL ar = a.elem().elem().elem().elem();
486 REAL *aptr = (REAL *)&ar;
487
488 if( s.hasOrderedRep() ) {
489 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
490 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
491 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
492
493 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
494 int n_4vec = (s.end()-s.start()+1);
495 xpayz_g5ProjMinus(zptr, aptr, xptr, yptr, n_4vec);
496 }
497 else {
498 const int* tab = s.siteTable().slice();
499 for(int j=0; j < s.numSiteTable(); j++) {
500 int i=tab[j];
501 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
502 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
503 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
504
505 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
506 xpayz_g5ProjMinus(zptr, aptr, xptr, yptr, 1);
507
508 }
509 }
510
511}
512
513// d = x - a P_{+} y
514template<>
515inline
517 const OpAssign &op,
518 const QDPExpr<
524 >
525 >,
527 > &rhs,
528 const Subset& s)
529{
530#ifdef DEBUG_BLAS_G5
531 QDPIO::cout << "z = x - a*P{+} y" << endl;
532#endif
533
534
535 // Peel the stuff out of the expression
536
537 // y is the left side of rhs
538 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&> (rhs.expression().left());
539
540 // ax is the right side of rhs and is in a binary node
541 typedef BinaryNode<OpMultiply,
544
545 // get the binary node
546 const BN &mulNode = static_cast<const BN&> (rhs.expression().right());
547
548 // get a and x out of the bynary node
549 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode.left());
550 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&>(mulNode.right().child());
551 // Set pointers
552 REAL ar = a.elem().elem().elem().elem();
553 REAL *aptr = (REAL *)&ar;
554
555 if( s.hasOrderedRep()) {
556 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
557 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
558 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
559
560 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
561 int n_4vec = (s.end()-s.start()+1);
562 xmayz_g5ProjPlus(zptr, aptr, xptr, yptr, n_4vec);
563 }
564 else {
565 const int* tab = s.siteTable().slice();
566 for(int j=0; j < s.numSiteTable(); j++) {
567 int i=tab[j];
568 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
569 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
570 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
571
572 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
573 xmayz_g5ProjPlus(zptr, aptr, xptr, yptr, 1);
574
575 }
576 }
577
578}
579
580// d = x - a P_{-} y
581template<>
582inline
584 const OpAssign &op,
585 const QDPExpr<
591 >
592 >,
594 > &rhs,
595 const Subset& s)
596{
597#ifdef DEBUG_BLAS_G5
598 QDPIO::cout << "z = x - a*P{-} y" << endl;
599#endif
600
601
602 // Peel the stuff out of the expression
603
604 // y is the left side of rhs
605 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&> (rhs.expression().left());
606
607 // ax is the right side of rhs and is in a binary node
608 typedef BinaryNode<OpMultiply,
611
612 // get the binary node
613 const BN &mulNode = static_cast<const BN&> (rhs.expression().right());
614
615 // get a and x out of the bynary node
616 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode.left());
617 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&>(mulNode.right().child());
618 // Set pointers
619 REAL ar = a.elem().elem().elem().elem();
620 REAL *aptr = (REAL *)&ar;
621
622 if ( s.hasOrderedRep() ) {
623
624 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
625 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
626 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
627
628 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
629 int n_4vec = (s.end()-s.start()+1);
630 xmayz_g5ProjMinus(zptr, aptr, xptr, yptr, n_4vec);
631
632 }
633 else {
634 const int* tab = s.siteTable().slice();
635 for(int j=0; j < s.numSiteTable(); j++) {
636 int i=tab[j];
637 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
638 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
639 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
640
641 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
642 xmayz_g5ProjMinus(zptr, aptr, xptr, yptr, 1);
643
644 }
645 }
646
647}
648
649// d = ax + P+ y
650template<>
651inline
653 const OpAssign &op,
654 const QDPExpr<
659 >,
661 >,
662 OLattice< TVec > > &rhs,
663 const Subset& s)
664{
665#ifdef DEBUG_BLAS_G5
666 QDPIO::cout << "z = a*x + P{+} y" << endl;
667#endif
668
669
670 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&> (rhs.expression().right().child());
671
672 // ax is the left side of rhs and is in a binary node
673 typedef BinaryNode<OpMultiply,
676
677 // get the binary node
678 const BN &mulNode = static_cast<const BN&> (rhs.expression().left());
679
680 // get a and x out of the bynary node
681 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode.left());
682 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&>(mulNode.right());
683 // Set pointers
684 REAL ar = a.elem().elem().elem().elem();
685 REAL *aptr = (REAL *)&ar;
686
687 if( s.hasOrderedRep() ) {
688
689 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
690 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
691 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
692
693
694 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
695 int n_4vec = (s.end()-s.start()+1);
696 axpyz_g5ProjPlus(zptr, aptr, xptr, yptr, n_4vec);
697 }
698 else {
699 const int* tab = s.siteTable().slice();
700 for(int j=0; j < s.numSiteTable(); j++) {
701 int i=tab[j];
702 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
703 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
704 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
705
706 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
707 axpyz_g5ProjPlus(zptr, aptr, xptr, yptr, 1);
708
709 }
710 }
711
712}
713
714// d = ax + P- y
715template<>
716inline
718 const OpAssign &op,
719 const QDPExpr<
724 >,
726 >,
727 OLattice< TVec > > &rhs,
728 const Subset& s)
729{
730#ifdef DEBUG_BLAS_G5
731 QDPIO::cout << "z = a*x + P{-} y" << endl;
732#endif
733
734
735 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&> (rhs.expression().right().child());
736
737 // ax is the left side of rhs and is in a binary node
738 typedef BinaryNode<OpMultiply,
741
742 // get the binary node
743 const BN &mulNode = static_cast<const BN&> (rhs.expression().left());
744
745 // get a and x out of the bynary node
746 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode.left());
747 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&>(mulNode.right());
748 // Set pointers
749 REAL ar = a.elem().elem().elem().elem();
750 REAL *aptr = (REAL *)&ar;
751
752 if( s.hasOrderedRep() ) {
753 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
754 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
755 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
756
757
758 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
759 int n_4vec = (s.end()-s.start()+1);
760 axpyz_g5ProjMinus(zptr, aptr, xptr, yptr, n_4vec);
761 }
762 else {
763 const int* tab = s.siteTable().slice();
764 for(int j=0; j < s.numSiteTable(); j++) {
765 int i=tab[j];
766 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
767 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
768 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
769
770 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
771 axpyz_g5ProjMinus(zptr, aptr, xptr, yptr, 1);
772
773 }
774 }
775}
776
777
778// d = ax - P+ y
779template<>
780inline
782 const OpAssign &op,
783 const QDPExpr<
788 >,
790 >,
791 OLattice< TVec > > &rhs,
792 const Subset& s)
793{
794#ifdef DEBUG_BLAS_G5
795 QDPIO::cout << "z = a*x + P{+} y" << endl;
796#endif
797
798
799 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&> (rhs.expression().right().child());
800
801 // ax is the left side of rhs and is in a binary node
802 typedef BinaryNode<OpMultiply,
805
806 // get the binary node
807 const BN &mulNode = static_cast<const BN&> (rhs.expression().left());
808
809 // get a and x out of the bynary node
810 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode.left());
811 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&>(mulNode.right());
812 // Set pointers
813 REAL ar = a.elem().elem().elem().elem();
814 REAL *aptr = (REAL *)&ar;
815
816 if( s.hasOrderedRep()) {
817 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
818 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
819 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
820
821
822 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
823 int n_4vec = (s.end()-s.start()+1);
824 axmyz_g5ProjPlus(zptr, aptr, xptr, yptr, n_4vec);
825 }
826 else {
827 const int* tab = s.siteTable().slice();
828 for(int j=0; j < s.numSiteTable(); j++) {
829 int i=tab[j];
830 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
831 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
832 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
833
834 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
835 axmyz_g5ProjPlus(zptr, aptr, xptr, yptr, 1);
836
837 }
838 }
839}
840
841// d = ax - P- y
842template<>
843inline
845 const OpAssign &op,
846 const QDPExpr<
851 >,
853 >,
854 OLattice< TVec > > &rhs,
855 const Subset& s)
856{
857#ifdef DEBUG_BLAS_G5
858 QDPIO::cout << "z = a*x + P{-} y" << endl;
859#endif
860
861
862 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&> (rhs.expression().right().child());
863
864 // ax is the left side of rhs and is in a binary node
865 typedef BinaryNode<OpMultiply,
868
869 // get the binary node
870 const BN &mulNode = static_cast<const BN&> (rhs.expression().left());
871
872 // get a and x out of the bynary node
873 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode.left());
874 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&>(mulNode.right());
875 // Set pointers
876 REAL ar = a.elem().elem().elem().elem();
877 REAL *aptr = (REAL *)&ar;
878
879 if( s.hasOrderedRep() ) {
880 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
881 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
882 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
883
884
885 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
886 int n_4vec = (s.end()-s.start()+1);
887 axmyz_g5ProjMinus(zptr, aptr, xptr, yptr, n_4vec);
888 }
889 else {
890 const int* tab = s.siteTable().slice();
891 for(int j=0; j < s.numSiteTable(); j++) {
892 int i=tab[j];
893 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
894 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
895 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
896
897 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
898 axmyz_g5ProjMinus(zptr, aptr, xptr, yptr, 1);
899
900 }
901 }
902}
903
904// Vec = Scal * P_{+} Vec
905template<>
906inline
908 const OpAssign &op,
909 const QDPExpr<
913 >,
914 OLattice< TVec > > &rhs,
915 const Subset& s)
916{
917
918#ifdef DEBUG_BLAS_G5
919 cout << "BJ: v = a*P{+}v " << endl;
920#endif
921
922 const OLattice< TVec > &x = static_cast<const OLattice< TVec >&>(rhs.expression().right().child());
923 const OScalar< TScal > &a = static_cast<const OScalar< TScal >&>(rhs.expression().left());
924
925 REAL ar = a.elem().elem().elem().elem();
926 REAL *aptr = &ar;
927
928 if( s.hasOrderedRep()) {
929 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
930 REAL *zptr = &(d.elem(s.start()).elem(0).elem(0).real());
931 int n_4vec = (s.end()-s.start()+1);
932
933 scal_g5ProjPlus(zptr, aptr, xptr, n_4vec);
934 }
935 else {
936 const int* tab = s.siteTable().slice();
937 for(int j=0; j < s.numSiteTable(); j++) {
938 int i=tab[j];
939 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
940 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
941 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
942
943 scal_g5ProjPlus(zptr, aptr, xptr, 1);
944 }
945 }
946
947}
948
949// Vec = Scal * P_{-} Vec
950template<>
951inline
953 const OpAssign &op,
954 const QDPExpr<
958 >,
959 OLattice< TVec > > &rhs,
960 const Subset& s)
961{
962
963#ifdef DEBUG_BLAS_G5
964 cout << "BJ: v = a*P{-}v " << endl;
965#endif
966
967 const OLattice< TVec > &x = static_cast<const OLattice< TVec >&>(rhs.expression().right().child());
968 const OScalar< TScal > &a = static_cast<const OScalar< TScal >&>(rhs.expression().left());
969
970 REAL ar = a.elem().elem().elem().elem();
971 REAL *aptr = &ar;
972
973 if( s.hasOrderedRep() ) {
974 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
975 REAL *zptr = &(d.elem(s.start()).elem(0).elem(0).real());
976 int n_4vec = (s.end()-s.start()+1);
977
978 scal_g5ProjMinus(zptr, aptr, xptr, n_4vec);
979 }
980 else {
981 const int* tab = s.siteTable().slice();
982 for(int j=0; j < s.numSiteTable(); j++) {
983 int i=tab[j];
984 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
985 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
986 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
987
988 scal_g5ProjMinus(zptr, aptr, xptr, 1);
989 }
990 }
991
992}
993
994// z = ax + bP+ y
995template<>
996inline
998 const OpAssign &op,
999 const QDPExpr<
1007 >
1008 >,
1009 OLattice< TVec > > &rhs,
1010 const Subset& s)
1011{
1012
1013#ifdef DEBUG_BLAS_G5
1014 QDPIO::cout << "z = a*x + b*P+y" << endl;
1015#endif
1016
1017 // Peel the stuff out of the expression
1018 // y is the right side of rhs
1019
1020 // ax is the left side of rhs and is in a binary node
1021 typedef BinaryNode<OpMultiply,
1024
1025 typedef BinaryNode<OpMultiply,
1028
1029 // get the binary node
1030 const BN1 &mulNode1 = static_cast<const BN1&> (rhs.expression().left());
1031 const BN2 &mulNode2 = static_cast<const BN2&> (rhs.expression().right());
1032
1033 // get a and x out of the binary node
1034 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode1.left());
1035 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&>(mulNode1.right());
1036
1037 // get b and y out of the binary node
1038 const OScalar< TScal >& b = static_cast<const OScalar< TScal >&>(mulNode2.left());
1039 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&>(mulNode2.right().child());
1040
1041
1042 // Set pointers
1043 REAL *aptr = (REAL *)&(a.elem().elem().elem().elem());
1044 REAL *bptr = (REAL *)&(b.elem().elem().elem().elem());
1045
1046 if ( s.hasOrderedRep() ) {
1047 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1048 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1049 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1050
1051
1052 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1053 int n_4vec = (s.end()-s.start()+1);
1054 axpbyz_g5ProjPlus(zptr, aptr, xptr, bptr, yptr, n_4vec);
1055 }
1056 else {
1057 const int* tab = s.siteTable().slice();
1058 for(int j=0; j < s.numSiteTable(); j++) {
1059 int i=tab[j];
1060 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1061 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1062 REAL* zptr = &(d.elem(i).elem(0).elem(0).real());
1063
1064
1065 axpbyz_g5ProjPlus(zptr, aptr, xptr, bptr, yptr, 1);
1066 }
1067 }
1068
1069}
1070
1071// z = ax + bP- y
1072template<>
1073inline
1075 const OpAssign &op,
1076 const QDPExpr<
1084 >
1085 >,
1086 OLattice< TVec > > &rhs,
1087 const Subset& s)
1088{
1089
1090#ifdef DEBUG_BLAS_G5
1091 QDPIO::cout << "z = a*x + b*P-y" << endl;
1092#endif
1093
1094 // Peel the stuff out of the expression
1095 // y is the right side of rhs
1096
1097 // ax is the left side of rhs and is in a binary node
1098 typedef BinaryNode<OpMultiply,
1101
1102 typedef BinaryNode<OpMultiply,
1105
1106 // get the binary node
1107 const BN1 &mulNode1 = static_cast<const BN1&> (rhs.expression().left());
1108 const BN2 &mulNode2 = static_cast<const BN2&> (rhs.expression().right());
1109
1110 // get a and x out of the binary node
1111 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode1.left());
1112 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&>(mulNode1.right());
1113
1114 // get b and y out of the binary node
1115 const OScalar< TScal >& b = static_cast<const OScalar< TScal >&>(mulNode2.left());
1116 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&>(mulNode2.right().child());
1117
1118
1119 // Set pointers
1120 REAL *aptr = (REAL *)&(a.elem().elem().elem().elem());
1121 REAL *bptr = (REAL *)&(b.elem().elem().elem().elem());
1122
1123 if( s.hasOrderedRep() ) {
1124 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1125 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1126 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1127
1128
1129 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1130 int n_4vec = (s.end()-s.start()+1);
1131 axpbyz_g5ProjMinus(zptr, aptr, xptr, bptr, yptr, n_4vec);
1132 }
1133 else {
1134 const int* tab = s.siteTable().slice();
1135 for(int j=0; j < s.numSiteTable(); j++) {
1136 int i=tab[j];
1137 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1138 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1139 REAL* zptr = &(d.elem(i).elem(0).elem(0).real());
1140
1141
1142 axpbyz_g5ProjMinus(zptr, aptr, xptr, bptr, yptr, 1);
1143 }
1144 }
1145
1146}
1147
1148// z = ax - bP+ y
1149template<>
1150inline
1152 const OpAssign &op,
1153 const QDPExpr<
1161 >
1162 >,
1163 OLattice< TVec > > &rhs,
1164 const Subset& s)
1165{
1166
1167#ifdef DEBUG_BLAS_G5
1168 QDPIO::cout << "z = a*x - b*P+y" << endl;
1169#endif
1170
1171 // Peel the stuff out of the expression
1172 // y is the right side of rhs
1173
1174 // ax is the left side of rhs and is in a binary node
1175 typedef BinaryNode<OpMultiply,
1178
1179 typedef BinaryNode<OpMultiply,
1182
1183 // get the binary node
1184 const BN1 &mulNode1 = static_cast<const BN1&> (rhs.expression().left());
1185 const BN2 &mulNode2 = static_cast<const BN2&> (rhs.expression().right());
1186
1187 // get a and x out of the binary node
1188 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode1.left());
1189 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&>(mulNode1.right());
1190
1191 // get b and y out of the binary node
1192 const OScalar< TScal >& b = static_cast<const OScalar< TScal >&>(mulNode2.left());
1193 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&>(mulNode2.right().child());
1194
1195
1196 // Set pointers
1197 REAL *aptr = (REAL *)&(a.elem().elem().elem().elem());
1198 REAL *bptr = (REAL *)&(b.elem().elem().elem().elem());
1199 if( s.hasOrderedRep()) {
1200 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1201 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1202 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1203
1204
1205 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1206 int n_4vec = (s.end()-s.start()+1);
1207 axmbyz_g5ProjPlus(zptr, aptr, xptr, bptr, yptr, n_4vec);
1208 }
1209 else {
1210 const int* tab = s.siteTable().slice();
1211 for(int j=0; j < s.numSiteTable(); j++) {
1212 int i=tab[j];
1213 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1214 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1215 REAL* zptr = &(d.elem(i).elem(0).elem(0).real());
1216
1217
1218 axmbyz_g5ProjPlus(zptr, aptr, xptr, bptr, yptr, 1);
1219 }
1220 }
1221
1222}
1223
1224// z = ax - bP- y
1225template<>
1226inline
1228 const OpAssign &op,
1229 const QDPExpr<
1237 >
1238 >,
1239 OLattice< TVec > > &rhs,
1240 const Subset& s)
1241{
1242
1243#ifdef DEBUG_BLAS_G5
1244 QDPIO::cout << "z = a*x - b*P-y" << endl;
1245#endif
1246
1247 // Peel the stuff out of the expression
1248 // y is the right side of rhs
1249
1250 // ax is the left side of rhs and is in a binary node
1251 typedef BinaryNode<OpMultiply,
1254
1255 typedef BinaryNode<OpMultiply,
1258
1259 // get the binary node
1260 const BN1 &mulNode1 = static_cast<const BN1&> (rhs.expression().left());
1261 const BN2 &mulNode2 = static_cast<const BN2&> (rhs.expression().right());
1262
1263 // get a and x out of the binary node
1264 const OScalar< TScal >& a = static_cast<const OScalar< TScal >&>(mulNode1.left());
1265 const OLattice< TVec >& x = static_cast<const OLattice< TVec >&>(mulNode1.right());
1266
1267 // get b and y out of the binary node
1268 const OScalar< TScal >& b = static_cast<const OScalar< TScal >&>(mulNode2.left());
1269 const OLattice< TVec >& y = static_cast<const OLattice< TVec >&>(mulNode2.right().child());
1270
1271
1272 // Set pointers
1273 REAL *aptr = (REAL *)&(a.elem().elem().elem().elem());
1274 REAL *bptr = (REAL *)&(b.elem().elem().elem().elem());
1275 if ( s.hasOrderedRep() ) {
1276
1277 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1278 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1279 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1280
1281
1282 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1283 int n_4vec = (s.end()-s.start()+1);
1284 axmbyz_g5ProjMinus(zptr, aptr, xptr, bptr, yptr, n_4vec);
1285 }
1286 else {
1287 const int* tab = s.siteTable().slice();
1288 for(int j=0; j < s.numSiteTable(); j++) {
1289 int i=tab[j];
1290 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1291 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1292 REAL* zptr = &(d.elem(i).elem(0).elem(0).real());
1293
1294
1295 axmbyz_g5ProjMinus(zptr, aptr, xptr, bptr, yptr, 1);
1296 }
1297 }
1298
1299}
1300
1301// Vec = Scal * GammaConst<Ns,Ns-1>* Vec
1302template<>
1303inline
1305 const OpAssign &op,
1306 const QDPExpr<
1309 BinaryNode<
1313 >
1314 >,
1316 > &rhs,
1317 const Subset& s)
1318{
1319
1320#ifdef DEBUG_BLAS_G5
1321 QDPIO::cout << "z = a*(GammaConst<Ns,Ns*Ns-1>()*x)" << endl;
1322#endif
1323
1324
1325 typedef BinaryNode<
1327 GammaConst<Ns,Ns*Ns-1>,
1329 > BN1;
1330
1331 const OScalar< TScal > &a = static_cast<const OScalar< TScal >&>(rhs.expression().left());
1332 const BN1 &node = static_cast<const BN1&>(rhs.expression().right());
1333
1334 const OLattice< TVec > &x = static_cast<const OLattice< TVec >&>(node.right());
1335
1336 REAL ar = a.elem().elem().elem().elem();
1337 REAL *aptr = &ar;
1338 if ( s.hasOrderedRep() ) {
1339 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1340 REAL *zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1341 int n_4vec = (s.end()-s.start()+1);
1342
1343 scal_g5(zptr, aptr, xptr, n_4vec);
1344 }
1345 else {
1346 const int* tab=s.siteTable().slice();
1347 for(int j=0; j < s.numSiteTable(); j++) {
1348 int i=tab[j];
1349 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1350 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
1351 scal_g5(zptr, aptr, xptr, 1);
1352 }
1353 }
1354
1355}
1356
1357
1358// Vec = Vec - a*Gamma5*Vec
1359//
1360template<>
1361inline
1363 const OpAssign &op,
1364 const QDPExpr<
1369 BinaryNode<
1373 >
1374 >
1375 >,
1376 OLattice< TVec > > &rhs,
1377 const Subset& s)
1378{
1379
1380#ifdef DEBUG_BLAS_G5
1381 QDPIO::cout << "z = x - a GammaConst<Ns,Ns*Ns-1>()*y" << endl;
1382#endif
1383 const OLattice<TVec>& x = static_cast<const OLattice<TVec>&>(rhs.expression().left());
1384
1385 typedef BinaryNode<OpMultiply,
1387 BinaryNode<
1389 GammaConst<Ns,Ns*Ns-1>,
1391 >
1392 > MN;
1393 const MN& mul_node = static_cast<const MN&>(rhs.expression().right());
1394
1395 const OScalar<TScal>& a = static_cast<const OScalar<TScal>& >(mul_node.left());
1396
1397 typedef BinaryNode<
1399 GammaConst<Ns,Ns*Ns-1>,
1401 > GN;
1402
1403 const GN& gamma_node = static_cast<const GN&>(mul_node.right());
1404 const OLattice<TVec>& y = static_cast<const OLattice<TVec>&>(gamma_node.right());
1405
1406 REAL ar = a.elem().elem().elem().elem();
1407 REAL *aptr = (REAL *)&ar;
1408 if( s.hasOrderedRep() ) {
1409 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1410 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1411 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1412
1413
1414 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1415 int n_4vec = (s.end()-s.start()+1);
1416 xmayz_g5(zptr, aptr, xptr, yptr, n_4vec);
1417 }
1418 else {
1419 const int* tab=s.siteTable().slice();
1420 for(int j=0; j < s.numSiteTable(); j++) {
1421 int i=tab[j];
1422 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1423 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1424 REAL* zptr = &(d.elem(i).elem(0).elem(0).real());
1425 xmayz_g5(zptr, aptr, xptr, yptr, 1);
1426
1427 }
1428 }
1429
1430}
1431
1432
1433// Vec = a*Vec + b*Gamma5*Vec
1434//
1435template<>
1436inline
1438 const OpAssign &op,
1439 const QDPExpr<
1444 >,
1447 BinaryNode<
1451 >
1452 >
1453 >,
1454 OLattice< TVec > > &rhs,
1455 const Subset& s)
1456{
1457
1458#ifdef DEBUG_BLAS_G5
1459 QDPIO::cout << "z = a*x + b*GammaConst<Ns,Ns*Ns-1>()*y" << endl;
1460#endif
1461
1462 typedef BinaryNode<OpMultiply,
1465 > MN1;
1466
1467 typedef BinaryNode<OpMultiply,
1469 BinaryNode<
1471 GammaConst<Ns,Ns*Ns-1>,
1473 >
1474 > MN2;
1475
1476 typedef BinaryNode<
1478 GammaConst<Ns,Ns*Ns-1>,
1480 > GN;
1481
1482 const MN1& mulNode1 = static_cast< const MN1& >(rhs.expression().left());
1483 const MN2& mulNode2 = static_cast< const MN2& >(rhs.expression().right());
1484 const GN& gammaNode = static_cast< const GN& >(mulNode2.right());
1485
1486 const OScalar<TScal>& a = static_cast<const OScalar<TScal>&>(mulNode1.left());
1487 const OLattice<TVec>& x = static_cast<const OLattice<TVec>&>(mulNode1.right());
1488
1489 const OScalar<TScal>& b = static_cast<const OScalar<TScal>&>(mulNode2.left());
1490 const OLattice<TVec>& y = static_cast<const OLattice<TVec>&>(gammaNode.right());
1491
1492
1493 REAL *aptr = (REAL *)&(a.elem().elem().elem().elem());
1494 REAL *bptr = (REAL *)&(b.elem().elem().elem().elem());
1495 if( s.hasOrderedRep() ) {
1496 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1497 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1498 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1499
1500
1501 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1502 int n_4vec = (s.end()-s.start()+1);
1503 axpbyz_g5(zptr, aptr, xptr, bptr, yptr, n_4vec);
1504 }
1505 else {
1506 const int* tab=s.siteTable().slice();
1507 for(int j=0; j < s.numSiteTable(); j++) {
1508 int i=tab[j];
1509 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1510 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1511 REAL* zptr = &(d.elem(i).elem(0).elem(0).real());
1512
1513
1514 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1515 axpbyz_g5(zptr, aptr, xptr, bptr, yptr, 1);
1516
1517 }
1518 }
1519
1520}
1521
1522// Vec = Gamma_5 *( a*Vec - b*Vec )
1523//
1524template<>
1525inline
1527 const OpAssign &op,
1528 const QDPExpr<
1535 >,
1539 >
1540 >
1541 >,
1542 OLattice< TVec > > &rhs,
1543 const Subset& s)
1544{
1545
1546#ifdef DEBUG_BLAS_G5
1547 QDPIO::cout << "z = GammaConst<Ns,Ns*Ns-1>()*(ax - by)" << endl;
1548#endif
1549
1550 typedef BinaryNode<OpSubtract,
1554 >,
1558 >
1559 > AXMBY;
1560
1561 const AXMBY& axmby_node = static_cast<const AXMBY&>(rhs.expression().right());
1562
1563
1564 typedef BinaryNode<OpMultiply,
1567 > MN;
1568
1569 const MN& mulNode1 = static_cast<const MN& >( axmby_node.left());
1570 const MN& mulNode2 = static_cast<const MN& >( axmby_node.right());
1571
1572 const OScalar<TScal>& a = static_cast<const OScalar<TScal>&>(mulNode1.left());
1573 const OLattice<TVec>& x = static_cast<const OLattice<TVec>&>(mulNode1.right());
1574
1575 const OScalar<TScal>& b = static_cast<const OScalar<TScal>&>(mulNode2.left());
1576 const OLattice<TVec>& y = static_cast<const OLattice<TVec>&>(mulNode2.right());
1577
1578
1579 REAL *aptr = (REAL *)&(a.elem().elem().elem().elem());
1580 REAL *bptr = (REAL *)&(b.elem().elem().elem().elem());
1581 if( s.hasOrderedRep() ) {
1582 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1583 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1584 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1585
1586
1587 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1588 int n_4vec = (s.end()-s.start()+1);
1589 g5_axmbyz(zptr, aptr, xptr, bptr, yptr, n_4vec);
1590 }
1591 else {
1592 const int* tab=s.siteTable().slice();
1593 for(int j=0; j < s.numSiteTable(); j++) {
1594 int i=tab[j];
1595 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1596 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1597 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
1598
1599
1600 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1601 g5_axmbyz(zptr, aptr, xptr, bptr, yptr, 1);
1602
1603 }
1604 }
1605
1606
1607}
1608
1609
1610// Vec = a*Vec + b*Gamma5*i*Vec
1611//
1612template<>
1613inline
1615 const OpAssign &op,
1616 const QDPExpr<
1621 >,
1624 BinaryNode<
1629 >
1630 >
1631 >
1632 >,
1633 OLattice< TVec > > &rhs,
1634 const Subset& s)
1635{
1636
1637#ifdef DEBUG_BLAS_G5
1638 QDPIO::cout << "z = a*x + b*GammaConst<Ns,Ns*Ns-1>()*timesI(y)" << endl;
1639#endif
1640
1641 typedef BinaryNode<OpMultiply,
1644 > MN1;
1645
1646 typedef BinaryNode<OpMultiply,
1648 BinaryNode<
1650 GammaConst<Ns,Ns*Ns-1>,
1653 >
1654 >
1655 > MN2;
1656
1657 typedef BinaryNode<
1659 GammaConst<Ns,Ns*Ns-1>,
1662 >
1663 > GN;
1664
1665 typedef UnaryNode< FnTimesI,
1667 > IN;
1668
1669 const MN1& mulNode1 = static_cast< const MN1& >(rhs.expression().left());
1670 const MN2& mulNode2 = static_cast< const MN2& >(rhs.expression().right());
1671 const GN& gammaNode = static_cast< const GN& >(mulNode2.right());
1672 const IN& mulINode = static_cast< const IN& >(gammaNode.right());
1673
1674 const OScalar<TScal>& a = static_cast<const OScalar<TScal>&>(mulNode1.left());
1675 const OLattice<TVec>& x = static_cast<const OLattice<TVec>&>(mulNode1.right());
1676
1677 const OScalar<TScal>& b = static_cast<const OScalar<TScal>&>(mulNode2.left());
1678 const OLattice<TVec>& y = static_cast<const OLattice<TVec>&>(mulINode.child());
1679
1680
1681 REAL *aptr = (REAL *)&(a.elem().elem().elem().elem());
1682 REAL *bptr = (REAL *)&(b.elem().elem().elem().elem());
1683 if( s.hasOrderedRep() ) {
1684 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1685 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1686 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1687
1688
1689 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1690 int n_4vec = (s.end()-s.start()+1);
1691 axpbyz_ig5(zptr, aptr, xptr, bptr, yptr, n_4vec);
1692 }
1693 else {
1694 const int* tab=s.siteTable().slice();
1695 for(int j=0; j < s.numSiteTable(); j++) {
1696 int i=tab[j];
1697 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1698 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1699 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
1700
1701
1702 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1703 axpbyz_ig5(zptr, aptr, xptr, bptr, yptr, 1);
1704
1705 }
1706 }
1707
1708}
1709
1710// Vec = a*Vec - b*Gamma5*i*Vec
1711//
1712template<>
1713inline
1715 const OpAssign &op,
1716 const QDPExpr<
1721 >,
1724 BinaryNode<
1729 >
1730 >
1731 >
1732 >,
1733 OLattice< TVec > > &rhs,
1734 const Subset& s)
1735{
1736
1737#ifdef DEBUG_BLAS_G5
1738 QDPIO::cout << "z = a*x + b*GammaConst<Ns,Ns*Ns-1>()*timesI(y)" << endl;
1739#endif
1740
1741 typedef BinaryNode<OpMultiply,
1744 > MN1;
1745
1746 typedef BinaryNode<OpMultiply,
1748 BinaryNode<
1750 GammaConst<Ns,Ns*Ns-1>,
1753 >
1754 >
1755 > MN2;
1756
1757 typedef BinaryNode<
1759 GammaConst<Ns,Ns*Ns-1>,
1762 >
1763 > GN;
1764
1765 typedef UnaryNode< FnTimesI,
1767 > IN;
1768
1769 const MN1& mulNode1 = static_cast< const MN1& >(rhs.expression().left());
1770 const MN2& mulNode2 = static_cast< const MN2& >(rhs.expression().right());
1771 const GN& gammaNode = static_cast< const GN& >(mulNode2.right());
1772 const IN& mulINode = static_cast< const IN& >(gammaNode.right());
1773
1774 const OScalar<TScal>& a = static_cast<const OScalar<TScal>&>(mulNode1.left());
1775 const OLattice<TVec>& x = static_cast<const OLattice<TVec>&>(mulNode1.right());
1776
1777 const OScalar<TScal>& b = static_cast<const OScalar<TScal>&>(mulNode2.left());
1778 const OLattice<TVec>& y = static_cast<const OLattice<TVec>&>(mulINode.child());
1779
1780
1781 REAL *aptr = (REAL *)&(a.elem().elem().elem().elem());
1782 REAL *bptr = (REAL *)&(b.elem().elem().elem().elem());
1783 if( s.hasOrderedRep() ) {
1784 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1785 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1786 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1787
1788
1789
1790 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1791 int n_4vec = (s.end()-s.start()+1);
1792 axmbyz_ig5(zptr, aptr, xptr, bptr, yptr, n_4vec);
1793 }
1794 else {
1795 const int* tab=s.siteTable().slice();
1796 for(int j=0; j < s.numSiteTable(); j++) {
1797 int i=tab[j];
1798 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1799 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1800 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
1801
1802
1803 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1804 axmbyz_ig5(zptr, aptr, xptr, bptr, yptr, 1);
1805
1806 }
1807 }
1808
1809}
1810
1811// Vec = Vec + a*Gamma5*i*Vec
1812//
1813template<>
1814inline
1816 const OpAssign &op,
1817 const QDPExpr<
1822 BinaryNode<
1827 >
1828 >
1829 >
1830 >,
1831 OLattice< TVec > > &rhs,
1832 const Subset& s)
1833{
1834
1835#ifdef DEBUG_BLAS_G5
1836 QDPIO::cout << "z = x + a GammaConst<Ns,Ns*Ns-1>()*i*y" << endl;
1837#endif
1838 const OLattice<TVec>& x = static_cast<const OLattice<TVec>&>(rhs.expression().left());
1839
1840 typedef BinaryNode<OpMultiply,
1842 BinaryNode<
1844 GammaConst<Ns,Ns*Ns-1>,
1847 >
1848 >
1849 > MN;
1850 const MN& mul_node = static_cast<const MN&>(rhs.expression().right());
1851
1852 const OScalar<TScal>& a = static_cast<const OScalar<TScal>& >(mul_node.left());
1853
1854 typedef BinaryNode<
1856 GammaConst<Ns,Ns*Ns-1>,
1859 >
1860 > GN;
1861
1862 typedef UnaryNode<FnTimesI,
1864 > IN;
1865
1866 const GN& gamma_node = static_cast<const GN&>(mul_node.right());
1867 const IN& timesI_node = static_cast<const IN&>(gamma_node.right());
1868
1869 const OLattice<TVec>& y = static_cast<const OLattice<TVec>&>(timesI_node.child());
1870
1871 REAL ar = a.elem().elem().elem().elem();
1872 REAL *aptr = (REAL *)&ar;
1873 if( s.hasOrderedRep() ) {
1874 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1875 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1876 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1877
1878 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1879 int n_4vec = (s.end()-s.start()+1);
1880 xpayz_ig5(zptr, aptr, xptr, yptr, n_4vec);
1881 }
1882 else {
1883 const int* tab=s.siteTable().slice();
1884 for(int j=0; j < s.numSiteTable(); j++) {
1885 int i=tab[j];
1886 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1887 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1888 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
1889
1890
1891 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1892 xpayz_ig5(zptr, aptr, xptr, yptr, 1);
1893
1894 }
1895 }
1896
1897}
1898
1899// Vec = Vec - a*Gamma5*i*Vec
1900//
1901template<>
1902inline
1904 const OpAssign &op,
1905 const QDPExpr<
1910 BinaryNode<
1915 >
1916 >
1917 >
1918 >,
1919 OLattice< TVec > > &rhs,
1920 const Subset& s)
1921{
1922
1923#ifdef DEBUG_BLAS_G5
1924 QDPIO::cout << "z = x - a GammaConst<Ns,Ns*Ns-1>()*i*y" << endl;
1925#endif
1926 const OLattice<TVec>& x = static_cast<const OLattice<TVec>&>(rhs.expression().left());
1927
1928 typedef BinaryNode<OpMultiply,
1930 BinaryNode<
1932 GammaConst<Ns,Ns*Ns-1>,
1935 >
1936 >
1937 > MN;
1938 const MN& mul_node = static_cast<const MN&>(rhs.expression().right());
1939
1940 const OScalar<TScal>& a = static_cast<const OScalar<TScal>& >(mul_node.left());
1941
1942 typedef BinaryNode<
1944 GammaConst<Ns,Ns*Ns-1>,
1947 >
1948 > GN;
1949
1950 typedef UnaryNode<FnTimesI,
1952 > IN;
1953
1954 const GN& gamma_node = static_cast<const GN&>(mul_node.right());
1955 const IN& timesI_node = static_cast<const IN&>(gamma_node.right());
1956
1957 const OLattice<TVec>& y = static_cast<const OLattice<TVec>&>(timesI_node.child());
1958
1959 REAL ar = a.elem().elem().elem().elem();
1960 REAL *aptr = (REAL *)&ar;
1961 if( s.hasOrderedRep()) {
1962
1963 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
1964 REAL *yptr = (REAL *) &(y.elem(s.start()).elem(0).elem(0).real());
1965 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
1966
1967
1968 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1969 int n_4vec = (s.end()-s.start()+1);
1970 xmayz_ig5(zptr, aptr, xptr, yptr, n_4vec);
1971 }
1972 else {
1973 const int* tab=s.siteTable().slice();
1974 for(int j=0; j < s.numSiteTable(); j++) {
1975 int i=tab[j];
1976 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
1977 REAL *yptr = (REAL *) &(y.elem(i).elem(0).elem(0).real());
1978 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
1979
1980
1981 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
1982 xmayz_ig5(zptr, aptr, xptr, yptr, 1);
1983
1984 }
1985 }
1986
1987}
1988
1989
1990
1991// Vec += a*Gamma5*i*Vec
1992//
1993template<>
1994inline
1996 const OpAddAssign &op,
1997 const QDPExpr<
2000 BinaryNode<
2005 >
2006 >
2007 >,
2009 > &rhs,
2010 const Subset& s)
2011{
2012
2013#ifdef DEBUG_BLAS_G5
2014 QDPIO::cout << "z += a GammaConst<Ns,Ns*Ns-1>()*i*y" << endl;
2015#endif
2016
2017#if 0
2018 typedef BinaryNode<OpMultiply,
2020 BinaryNode<
2022 GammaConst<Ns,Ns*Ns-1>,
2025 >
2026 >
2027 > MN;
2028
2029 const MN& mul_node = static_cast<const MN&>(rhs.expression().right());
2030#endif
2031
2032 const OScalar<TScal>& a = static_cast<const OScalar<TScal>& >(rhs.expression().left());
2033
2034 typedef BinaryNode<
2036 GammaConst<Ns,Ns*Ns-1>,
2039 >
2040 > GN;
2041
2042 typedef UnaryNode<FnTimesI,
2044 > IN;
2045
2046 const GN& gamma_node = static_cast<const GN&>(rhs.expression().right());
2047 const IN& timesI_node = static_cast<const IN&>(gamma_node.right());
2048
2049 const OLattice<TVec>& x = static_cast<const OLattice<TVec>&>(timesI_node.child());
2050
2051 REAL ar = a.elem().elem().elem().elem();
2052 REAL *aptr = (REAL *)&ar;
2053 if( s.hasOrderedRep() ) {
2054 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
2055 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
2056
2057
2058 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
2059 int n_4vec = (s.end()-s.start()+1);
2060 xpayz_ig5(zptr, aptr, zptr, xptr, n_4vec);
2061 }
2062 else {
2063 const int* tab=s.siteTable().slice();
2064 for(int j=0; j < s.numSiteTable(); j++) {
2065 int i=tab[j];
2066 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
2067 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
2068
2069 xpayz_ig5(zptr, aptr, zptr, xptr, 1);
2070
2071 }
2072 }
2073
2074}
2075
2076
2077// Vec -= a*Gamma5*i*Vec
2078//
2079template<>
2080inline
2082 const OpSubtractAssign &op,
2083 const QDPExpr<
2086 BinaryNode<
2091 >
2092 >
2093 >,
2095 > &rhs,
2096 const Subset& s)
2097{
2098
2099#ifdef DEBUG_BLAS_G5
2100 QDPIO::cout << "z -= a GammaConst<Ns,Ns*Ns-1>()*i*y" << endl;
2101#endif
2102
2103#if 0
2104 typedef BinaryNode<OpMultiply,
2106 BinaryNode<
2108 GammaConst<Ns,Ns*Ns-1>,
2111 >
2112 >
2113 > MN;
2114
2115 const MN& mul_node = static_cast<const MN&>(rhs.expression().right());
2116#endif
2117
2118 const OScalar<TScal>& a = static_cast<const OScalar<TScal>& >(rhs.expression().left());
2119
2120 typedef BinaryNode<
2122 GammaConst<Ns,Ns*Ns-1>,
2125 >
2126 > GN;
2127
2128 typedef UnaryNode<FnTimesI,
2130 > IN;
2131
2132 const GN& gamma_node = static_cast<const GN&>(rhs.expression().right());
2133 const IN& timesI_node = static_cast<const IN&>(gamma_node.right());
2134
2135 const OLattice<TVec>& x = static_cast<const OLattice<TVec>&>(timesI_node.child());
2136
2137 REAL ar = a.elem().elem().elem().elem();
2138 REAL *aptr = (REAL *)&ar;
2139 if( s.hasOrderedRep() ) {
2140 REAL *xptr = (REAL *) &(x.elem(s.start()).elem(0).elem(0).real());
2141 REAL* zptr = &(d.elem(s.start()).elem(0).elem(0).real());
2142
2143
2144 // Get the no of 3vecs. s.start() and s.end() are inclusive so add +1
2145 int n_4vec = (s.end()-s.start()+1);
2146 xmayz_ig5(zptr, aptr, zptr, xptr, n_4vec);
2147 }
2148 else {
2149 const int* tab=s.siteTable().slice();
2150 for(int j=0; j < s.numSiteTable(); j++) {
2151 int i=tab[j];
2152 REAL *xptr = (REAL *) &(x.elem(i).elem(0).elem(0).real());
2153 REAL *zptr = &(d.elem(i).elem(0).elem(0).real());
2154
2155 xmayz_ig5(zptr, aptr, zptr, xptr, 1);
2156
2157 }
2158 }
2159
2160}
2161
2162
2163} // namespace QDP;
2164
2165#endif // guard
2166
Outer grid Lattice type.
Definition qdp_outer.h:264
T & elem(int i)
Definition qdp_outer.h:400
Outer grid Scalar class *‍/.
Definition qdp_outer.h:37
Primitive Scalar.
Primitive spin Vector class.
Expression class for QDP.
Definition qdp_qdpexpr.h:16
QDPType - major type class/container for all QDP objects.
Definition qdp_qdptype.h:29
Subsets - controls how lattices are looped.
Definition qdp_subset.h:39
int end() const
Definition qdp_subset.h:81
const multi1d< int > & siteTable() const
Definition qdp_subset.h:83
int numSiteTable() const
Definition qdp_subset.h:84
bool hasOrderedRep() const
Definition qdp_subset.h:79
int start() const
Definition qdp_subset.h:80
const T * slice() const
Return ref to a column slice.
Definition qdp_multi.h:225
REAL32 REAL
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)
const int Ns
Definition qdp_params.h:26
StandardOutputStream cout
Definition qdp_stdio.cc:21
Yet another random number generator.
PScalar< PScalar< RScalar< REAL > > > TScal
void add_g5ProjPlus(REAL *Out, REAL *X, REAL *Y, int n_4vec)
void axpbyz_g5ProjMinus(REAL *Out, REAL *scalep, REAL *InScale, REAL *scalep2, REAL *Add, int n_4vec)
MakeReturn< UnaryNode< FnReal, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnReal >::Type_t >::Expression_t real(const QDPExpr< T1, C1 > &l)
Definition qdp.h:4972
void axmbyz_g5ProjMinus(REAL *Out, REAL *scalep, REAL *InScale, REAL *scalep2, REAL *Add, int n_4vec)
void scal_g5ProjMinus(REAL *Out, REAL *scalep, REAL *In, int n_4vec)
void axpbyz_ig5(REAL *Out, REAL *scalep, REAL *InScale, REAL *scalep2, REAL *Add, int n_4vec)
void xpayz_ig5(REAL *Out, REAL *scalep, REAL *InScale, REAL *Add, int n_4vec)
void add_g5ProjMinus(REAL *Out, REAL *X, REAL *Y, int n_4vec)
void xmayz_g5(REAL *Out, REAL *scalep, REAL *Add, REAL *InScale, int n_4vec)
void axmyz_g5ProjMinus(REAL *Out, REAL *scalep, REAL *InScale, REAL *Add, int n_4vec)
void axmbyz_ig5(REAL *Out, REAL *scalep, REAL *InScale, REAL *scalep2, REAL *Add, int n_4vec)
void xmayz_g5ProjPlus(REAL *Out, REAL *scalep, REAL *Add, REAL *InScale, int n_4vec)
void axpbyz_g5ProjPlus(REAL *Out, REAL *scalep, REAL *InScale, REAL *scalep2, REAL *Add, int n_4vec)
void sub_g5ProjPlus(REAL *Out, REAL *X, REAL *Y, int n_4vec)
void xmayz_ig5(REAL *Out, REAL *scalep, REAL *InScale, REAL *Add, int n_4vec)
void axpbyz_g5(REAL *Out, REAL *scalep, REAL *InScale, REAL *scalep2, REAL *Add, int n_4vec)
void axmbyz_g5ProjPlus(REAL *Out, REAL *scalep, REAL *InScale, REAL *scalep2, REAL *Add, int n_4vec)
void sub_g5ProjMinus(REAL *Out, REAL *X, REAL *Y, int n_4vec)
void scal_g5ProjPlus(REAL *Out, REAL *scalep, REAL *In, int n_4vec)
void g5_axmbyz(REAL *Out, REAL *scalep, REAL *InScale, REAL *scalep2, REAL *Add, int n_4vec)
void xpayz_g5ProjMinus(REAL *Out, REAL *scalep, REAL *Add, REAL *InScale, int n_4vec)
void axpyz_g5ProjPlus(REAL *Out, REAL *scalep, REAL *InScale, REAL *Add, int n_4vec)
PSpinVector< PColorVector< RComplex< REAL >, 3 >, Ns > TVec
void scal_g5(REAL *Out, REAL *scalep, REAL *In, int n_4vec)
void axmyz_g5ProjPlus(REAL *Out, REAL *scalep, REAL *InScale, REAL *Add, int n_4vec)
void axpyz_g5ProjMinus(REAL *Out, REAL *scalep, REAL *InScale, REAL *Add, int n_4vec)
void xmayz_g5ProjMinus(REAL *Out, REAL *scalep, REAL *Add, REAL *InScale, int n_4vec)
void xpayz_g5ProjPlus(REAL *Out, REAL *scalep, REAL *Add, REAL *InScale, int n_4vec)