QDP++
qdp_scalarsite_sse_linalg.h
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: qdp_scalarsite_sse_linalg.h,v 1.17 2009-04-17 00:46:36 bjoo Exp $
3
9
10#ifndef QDP_SCALARSITE_SSE_LINALG_H
11#define QDP_SCALARSITE_SSE_LINALG_H
12
13// These SSE asm instructions are only supported under GCC/G++
14#if defined(__GNUC__)
15
16#include "sse_mult_su3_nn.h"
17#include "sse_mult_su3_an.h"
18
19#include "sse_mult_su3_na.h"
20#include "sse_mult_su3_mat_vec.h"
21#include "sse_mult_adj_su3_mat_vec.h"
22#include "sse_add_su3_vector.h"
23#include "sse_mult_su3_mat_hwvec.h"
24#include "sse_mult_adj_su3_mat_hwvec.h"
25
26namespace QDP {
27
28
29// #define QDP_SCALARSITE_DEBUG
30
31#define QDP_SCALARSITE_USE_EVALUATE
32
33
40
41// Use this def just to safe some typing later on in the file
43
44// Types needed for the expression templates.
48
49
50// Optimized version of
51// PColorMatrix<RComplexFloat,3> <- PColorMatrix<RComplexFloat,3> * PColorMatrix<RComplexFloat,3>
52template<>
57{
60
61#if defined(QDP_SCALARSITE_DEBUG)
62 cout << "M*M" << endl;
63#endif
64
65 su3_matrixf* lm = (su3_matrixf *) &(l.elem(0,0).real());
66 su3_matrixf* rm = (su3_matrixf *) &(r.elem(0,0).real());
67 su3_matrixf* dm = (su3_matrixf *) &(d.elem(0,0).real());
68
69 intrin_sse_mult_su3_nn(lm,rm,dm);
70
71 return d;
72}
73
74
75
76// Optimized version of
77// PScalar<PColorMatrix<RComplexFloat,3>> <- PScalar<PColorMatrix<RComplexFloat,3>> *
78// PScalar<PColorMatrix<RComplexFloat,3>>
79template<>
84{
87
88#if defined(QDP_SCALARSITE_DEBUG)
89 cout << "PSc<M>*PSc<M>" << endl;
90#endif
91 su3_matrixf* lm = (su3_matrixf *)&(l.elem().elem(0,0).real());
92 su3_matrixf* rm = (su3_matrixf *)&(r.elem().elem(0,0).real());
93 su3_matrixf* dm = (su3_matrixf *)&(d.elem().elem(0,0).real());
94
95 intrin_sse_mult_su3_nn(lm, rm, dm);
96
97 return d;
98}
99
100
101// Optimized version of
102// PScalar<PScalar<PColorMatrix<RComplexFloat,3>>> <- PScalar<PScalar<PColorMatrix<RComplexFloat,3>>> *
103// PScalar<PScalar<PColorMatrix<RComplexFloat,3>>>
104template<>
109{
112
113#if defined(QDP_SCALARSITE_DEBUG)
114 cout << "PSc<PSc<M>>*PSc<PSc<M>>" << endl;
115#endif
116
117 su3_matrixf* lm = (su3_matrixf *)&(l.elem().elem().elem(0,0).real());
118 su3_matrixf* rm = (su3_matrixf *)&(r.elem().elem().elem(0,0).real());
119 su3_matrixf* dm = (su3_matrixf *)&(d.elem().elem().elem(0,0).real());
120
121 intrin_sse_mult_su3_nn(lm, rm, dm);
122
123 return d;
124}
125
126
127// Optimized version of
128// PColorMatrix<RComplexFloat,3> <- adj(PColorMatrix<RComplexFloat,3>) * PColorMatrix<RComplexFloat,3>
129template<>
134{
137
138#if defined(QDP_SCALARSITE_DEBUG)
139 cout << "adj(M)*M" << endl;
140#endif
141 su3_matrixf* lm = (su3_matrixf *) &(l.elem(0,0).real());
142 su3_matrixf* rm = (su3_matrixf *) &(r.elem(0,0).real());
143 su3_matrixf* dm = (su3_matrixf *) &(d.elem(0,0).real());
144
145 intrin_sse_mult_su3_an(lm,rm,dm);
146
147 return d;
148}
149
150
151// Optimized version of
152// PScalar<PColorMatrix<RComplexFloat,3>> <- adj(PScalar<PColorMatrix<RComplexFloat,3>>) * PScalar<PColorMatrix<RComplexFloat,3>>
153template<>
158{
161
162#if defined(QDP_SCALARSITE_DEBUG)
163 cout << "adj(PSc<M>)*PSc<M>" << endl;
164#endif
165
166 su3_matrixf* lm = (su3_matrixf *)&(l.elem().elem(0,0).real());
167 su3_matrixf* rm = (su3_matrixf *)&(r.elem().elem(0,0).real());
168 su3_matrixf* dm = (su3_matrixf *)&(d.elem().elem(0,0).real());
169
170 intrin_sse_mult_su3_an(lm, rm, dm);
171
172
173 return d;
174}
175
176
177// Optimized version of
178// PScalar<PScalar<PColorMatrix<RComplexFloat,3>>> <- adj(PScalar<PScalar<PColorMatrix<RComplexFloat,3>>>) *
179// PScalar<PScalar<PColorMatrix<RComplexFloat,3>>>
180template<>
185{
188
189#if defined(QDP_SCALARSITE_DEBUG)
190 cout << "adj(PSc<PSc<M>>)*PSc<PSc<M>>" << endl;
191#endif
192
193 su3_matrixf* lm = (su3_matrixf *)&(l.elem().elem().elem(0,0).real());
194 su3_matrixf* rm = (su3_matrixf *)&(r.elem().elem().elem(0,0).real());
195 su3_matrixf* dm = (su3_matrixf *)&(d.elem().elem().elem(0,0).real());
196
197 intrin_sse_mult_su3_an(lm, rm, dm);
198
199 return d;
200}
201
202
203// Optimized version of
204// PColorMatrix<RComplexFloat,3> <- PColorMatrix<RComplexFloat,3> * adj(PColorMatrix<RComplexFloat,3>)
205template<>
210{
213
214#if defined(QDP_SCALARSITE_DEBUG)
215 cout << "M*adj(M)" << endl;
216#endif
217 su3_matrixf* lm = (su3_matrixf *) &(l.elem(0,0).real());
218 su3_matrixf* rm = (su3_matrixf *) &(r.elem(0,0).real());
219 su3_matrixf* dm = (su3_matrixf *) &(d.elem(0,0).real());
220
221 intrin_sse_mult_su3_na(lm,rm,dm);
222
223
224 return d;
225}
226
227
228// Optimized version of
229// PScalar<PColorMatrix<RComplexFloat,3>> <- PScalar<PColorMatrix<RComplexFloat,3>> *
230// adj(PScalar<PColorMatrix<RComplexFloat,3>>)
231template<>
236{
239
240#if defined(QDP_SCALARSITE_DEBUG)
241 cout << "PSc<M>*adj(PSc<M>)" << endl;
242#endif
243 su3_matrixf* lm = (su3_matrixf *)&(l.elem().elem(0,0).real());
244 su3_matrixf* rm = (su3_matrixf *)&(r.elem().elem(0,0).real());
245 su3_matrixf* dm = (su3_matrixf *)&(d.elem().elem(0,0).real());
246
247 intrin_sse_mult_su3_na(lm, rm, dm);
248
249 return d;
250}
251
252
253// Optimized version of
254// PScalar<Pscalar<PColorMatrix<RComplexFloat,3>>> <- PScalar<PScalar<PColorMatrix<RComplexFloat,3>>> *
255// adj(PScalar<PScalar<PColorMatrix<RComplexFloat,3>>>)
256template<>
261{
264
265#if defined(QDP_SCALARSITE_DEBUG)
266 cout << "PSc<PSc<M>>*adj(PSc<PSc<M>>)" << endl;
267#endif
268 su3_matrixf* lm = (su3_matrixf *)&(l.elem().elem().elem(0,0).real());
269 su3_matrixf* rm = (su3_matrixf *)&(r.elem().elem().elem(0,0).real());
270 su3_matrixf* dm = (su3_matrixf *)&(d.elem().elem().elem(0,0).real());
271
272 intrin_sse_mult_su3_na(lm, rm, dm);
273
274 return d;
275}
276
277
278// Ooops, this macro does not exist!!
279
280// Optimized version of
281// PColorMatrix<RComplexFloat,3> <- adj(PColorMatrix<RComplexFloat,3>) * adj(PColorMatrix<RComplexFloat,3>)
282template<>
287{
290
292
293//
294
295 su3_matrixf* lm = (su3_matrixf *) &(l.elem(0,0).real());
296 su3_matrixf* rm = (su3_matrixf *) &(r.elem(0,0).real());
297 su3_matrixf* tm = (su3_matrixf *) &(tmp.elem(0,0).real());
298
299 // Do the adj*adj the hard way
300
301 intrin_sse_mult_su3_nn(rm,lm,tm);
302
303 // Take the adj(r*l) = adj(l)*adj(r)
304 d.elem(0,0).real() = tmp.elem(0,0).real();
305 d.elem(0,0).imag() = -tmp.elem(0,0).imag();
306 d.elem(0,1).real() = tmp.elem(1,0).real();
307 d.elem(0,1).imag() = -tmp.elem(1,0).imag();
308 d.elem(0,2).real() = tmp.elem(2,0).real();
309 d.elem(0,2).imag() = -tmp.elem(2,0).imag();
310
311 d.elem(1,0).real() = tmp.elem(0,1).real();
312 d.elem(1,0).imag() = -tmp.elem(0,1).imag();
313 d.elem(1,1).real() = tmp.elem(1,1).real();
314 d.elem(1,1).imag() = -tmp.elem(1,1).imag();
315 d.elem(1,2).real() = tmp.elem(2,1).real();
316 d.elem(1,2).imag() = -tmp.elem(2,1).imag();
317
318 d.elem(2,0).real() = tmp.elem(0,2).real();
319 d.elem(2,0).imag() = -tmp.elem(0,2).imag();
320 d.elem(2,1).real() = tmp.elem(1,2).real();
321 d.elem(2,1).imag() = -tmp.elem(1,2).imag();
322 d.elem(2,2).real() = tmp.elem(2,2).real();
323 d.elem(2,2).imag() = -tmp.elem(2,2).imag();
324
325 return d;
326}
327
328
329// Optimized version of
330// PColorVector<RComplexFloat,3> <- PColorMatrix<RComplexFloat,3> * PColorVector<RComplexFloat,3>
331template<>
336{
339
340#if defined(QDP_SCALARSITE_DEBUG)
341 cout << "M*V" << endl;
342#endif
343
344 su3_matrixf* lm = (su3_matrixf *)&(l.elem(0,0).real());
345 su3_vectorf* rv = (su3_vectorf *)&(r.elem(0).real());
346 su3_vectorf* dv = (su3_vectorf *)&(d.elem(0).real());
347
348 intrin_sse_mult_su3_mat_vec(lm,rv,dv);
349
350 return d;
351}
352
353
354// Optimized version of
355// PScalar<PColorVector<RComplexFloat,3>> <- PScalar<PColorMatrix<RComplexFloat,3>> * PScalar<PColorVector<RComplexFloat,3>>
356template<>
361{
364
365#if defined(QDP_SCALARSITE_DEBUG)
366 cout << "PSc<M>*PSc<V>" << endl;
367#endif
368
369 su3_matrixf* lm = (su3_matrixf *)&(l.elem().elem(0,0).real());
370 su3_vectorf* rv = (su3_vectorf *)&(r.elem().elem(0).real());
371 su3_vectorf* dv = (su3_vectorf *)&(d.elem().elem(0).real());
372
373 intrin_sse_mult_su3_mat_vec(lm,rv,dv);
374
375 return d;
376}
377
378
379// Optimized version of
380// PColorVector<RComplexFloat,3> <- adj(PColorMatrix<RComplexFloat,3>) * PColorVector<RComplexFloat,3>
381template<>
386{
389
390#if defined(QDP_SCALARSITE_DEBUG)
391 cout << "adj(M)*V" << endl;
392#endif
393
394 su3_matrixf* lm = (su3_matrixf *)&(l.elem(0,0).real());
395 su3_vectorf* rv = (su3_vectorf *)&(r.elem(0).real());
396 su3_vectorf* dv = (su3_vectorf *)&(d.elem(0).real());
397
398 intrin_sse_mult_adj_su3_mat_vec(lm,rv,dv);
399
400 return d;
401}
402
403
404// Optimized version of StaggeredFermion <- ColorMatrix*StaggeredFermion
405// PSpinVector<PColorVector<RComplexFloat,3>,1> <- PScalar<PColorMatrix<RComplexFloat,3>> * PSpinVector<PColorVector<RComplexFloat,3>,1>
406template<>
411{
414
415#if defined(QDP_SCALARSITE_DEBUG)
416 cout << "M*S" << endl;
417#endif
418 su3_matrixf* lm = (su3_matrixf *)&(l.elem().elem(0,0).real());
419 su3_vectorf* rv = (su3_vectorf *)&(r.elem(0).elem(0).real());
420 su3_vectorf* dv = (su3_vectorf *)&(d.elem(0).elem(0).real());
421
422 intrin_sse_mult_su3_mat_vec(lm,rv,dv);
423
424 return d;
425}
426
427
428// Optimized version of
429// PScalar<PColorVector<RComplexFloat,3>> <- adj(PScalar<PColorMatrix<RComplexFloat,3>>) * PScalar<PColorVector<RComplexFloat,3>>
430template<>
435{
438
439#if defined(QDP_SCALARSITE_DEBUG)
440 cout << "adj(PSc<M>)*PSc<V>" << endl;
441#endif
442 su3_matrixf* lm = (su3_matrixf *)&(l.elem().elem(0,0).real());
443 su3_vectorf* rv = (su3_vectorf *)&(r.elem().elem(0).real());
444 su3_vectorf* dv = (su3_vectorf *)&(d.elem().elem(0).real());
445
446 intrin_sse_mult_adj_su3_mat_vec(lm,rv,dv);
447
448 return d;
449}
450
451
452// Optimized version of StaggeredFermion <- adj(ColorMatrix)*StaggeredFermion
453// PSpinVector<PColorVector<RComplexFloat,3>,1> <- adj(PScalar<PColorMatrix<RComplexFloat,3>>) * PSpinVector<PColorVector<RComplexFloat,3>,1>
454template<>
459{
462
463#if defined(QDP_SCALARSITE_DEBUG)
464 cout << "adj(PSc<M>)*S" << endl;
465#endif
466 su3_matrixf* lm = (su3_matrixf *)&(l.elem().elem(0,0).real());
467 su3_vectorf* rv = (su3_vectorf *)&(r.elem(0).elem(0).real());
468 su3_vectorf* dv = (su3_vectorf *)&(d.elem(0).elem(0).real());
469
470 intrin_sse_mult_adj_su3_mat_vec(lm,rv,dv);
471
472 return d;
473}
474
475
476// Optimized version of HalfFermion <- ColorMatrix*HalfFermion
477// PSpinVector<PColorVector<RComplexFloat,3>,2> <- PScalar<PColorMatrix<RComplexFloat,3>> *
478// PSpinVector<ColorVector<RComplexFloat,3>,2>
479template<>
484{
487
488#if defined(QDP_SCALARSITE_DEBUG)
489 cout << "PSc<M>*H" << endl;
490#endif
491 su3_matrixf* lm =(su3_matrixf *)&( l.elem().elem(0,0).real() );
492 half_wilson_vectorf* rh = (half_wilson_vectorf *)&(r.elem(0).elem(0).real() );
493 half_wilson_vectorf* dh = (half_wilson_vectorf *)&(d.elem(0).elem(0).real() );
494
495 intrin_sse_mult_su3_mat_hwvec(lm,rh,dh);
496
497 return d;
498}
499
500
501// Optimized version of HalfFermion <- ColorMatrix*HalfFermion
502// PSpinVector<PColorVector<RComplexFloat,3>,2> <- adj(PScalar<PColorMatrix<RComplexFloat,3>>) *
503// PSpinVector<ColorVector<RComplexFloat,3>,2>
504template<>
509{
512
513#if defined(QDP_SCALARSITE_DEBUG)
514 cout << "adj(PSc<M>)*H" << endl;
515#endif
516
517 su3_matrixf* lm =(su3_matrixf *)&( l.elem().elem(0,0).real() );
518 half_wilson_vectorf* rh = (half_wilson_vectorf *)&(r.elem(0).elem(0).real() );
519 half_wilson_vectorf* dh = (half_wilson_vectorf *)&(d.elem(0).elem(0).real() );
520
521 intrin_sse_mult_adj_su3_mat_hwvec(lm,rh,dh);
522
523 return d;
524}
525
526
527// Optimized version of
528// PColorVector<RComplexFloat,3> <- PColorVector<RComplexFloat,3> + PColorVector<RComplexFloat,3>
529template<>
534{
537
538#if defined(QDP_SCALARSITE_DEBUG)
539 cout << "V+V" << endl;
540#endif
541
542 su3_vectorf *lv = (su3_vectorf *)&( l.elem(0).real() );
543 su3_vectorf *rv = (su3_vectorf *)&( r.elem(0).real() );
544 su3_vectorf *dv = (su3_vectorf *)&( d.elem(0).real() );
545
546 intrin_sse_add_su3_vector(lv,rv,dv);
547
548 return d;
549}
550
551
552// Optimized version of DiracFermion <- ColorMatrix*DiracFermion
553// PSpinVector<PColorVector<RComplexFloat,3>,4> <- PScalar<PColorMatrix<RComplexFloat,3>>
554// * PSpinVector<PColorVector<RComplexFloat,3>,4>
555template<>
560{
563
564#if defined(QDP_SCALARSITE_DEBUG)
565 cout << "PSc<M>*D" << endl;
566#endif
567 su3_matrixf *lm = (su3_matrixf *)&(l.elem().elem(0,0).real());
568 su3_vectorf *rv0 = (su3_vectorf *)&(r.elem(0).elem(0).real());
569 su3_vectorf *rv1 = (su3_vectorf *)&(r.elem(1).elem(0).real());
570 su3_vectorf *rv2 = (su3_vectorf *)&(r.elem(2).elem(0).real());
571 su3_vectorf *rv3 = (su3_vectorf *)&(r.elem(3).elem(0).real());
572
573 su3_vectorf *dv0 = (su3_vectorf *)&(d.elem(0).elem(0).real());
574 su3_vectorf *dv1 = (su3_vectorf *)&(d.elem(1).elem(0).real());
575 su3_vectorf *dv2 = (su3_vectorf *)&(d.elem(2).elem(0).real());
576 su3_vectorf *dv3 = (su3_vectorf *)&(d.elem(3).elem(0).real());
577
578 intrin_sse_mult_su3_mat_vec(lm,rv0,dv0);
579 intrin_sse_mult_su3_mat_vec(lm,rv1,dv1);
580 intrin_sse_mult_su3_mat_vec(lm,rv2,dv2);
581 intrin_sse_mult_su3_mat_vec(lm,rv3,dv3);
582
583 return d;
584}
585
586
587// Optimized version of DiracFermion <- adj(ColorMatrix)*DiracFermion
588// PSpinVector<PColorVector<RComplexFloat,3>,4> <- adj(PScalar<PColorMatrix<RComplexFloat,3>>)
589// * PSpinVector<PColorVector<RComplexFloat,3>,4>
590template<>
595{
598
599#if defined(QDP_SCALARSITE_DEBUG)
600 cout << "adj(PSc<M>)*D" << endl;
601#endif
602 su3_matrixf *lm = (su3_matrixf *)&(l.elem().elem(0,0).real());
603 su3_vectorf *rv0 = (su3_vectorf *)&(r.elem(0).elem(0).real());
604 su3_vectorf *rv1 = (su3_vectorf *)&(r.elem(1).elem(0).real());
605 su3_vectorf *rv2 = (su3_vectorf *)&(r.elem(2).elem(0).real());
606 su3_vectorf *rv3 = (su3_vectorf *)&(r.elem(3).elem(0).real());
607
608 su3_vectorf *dv0 = (su3_vectorf *)&(d.elem(0).elem(0).real());
609 su3_vectorf *dv1 = (su3_vectorf *)&(d.elem(1).elem(0).real());
610 su3_vectorf *dv2 = (su3_vectorf *)&(d.elem(2).elem(0).real());
611 su3_vectorf *dv3 = (su3_vectorf *)&(d.elem(3).elem(0).real());
612
613 intrin_sse_mult_adj_su3_mat_vec(lm,rv0,dv0);
614 intrin_sse_mult_adj_su3_mat_vec(lm,rv1,dv1);
615 intrin_sse_mult_adj_su3_mat_vec(lm,rv2,dv2);
616 intrin_sse_mult_adj_su3_mat_vec(lm,rv3,dv3);
617
618 return d;
619}
620
621
622// Optimized version of
623// PScalar<PColorVector<RComplexFloat,3>> <- PScalar<PColorVector<RComplexFloat,3>>
624// + PScalar<PColorVector<RComplexFloat,3>>
625template<>
630{
633
634#if defined(QDP_SCALARSITE_DEBUG)
635 cout << "PSc<V>+PSc<V>" << endl;
636#endif
637
638 su3_vectorf *lv = (su3_vectorf *)&(l.elem().elem(0).real());
639 su3_vectorf *rv = (su3_vectorf *)&(r.elem().elem(0).real());
640 su3_vectorf *dv = (su3_vectorf *)&(d.elem().elem(0).real());
641
642 intrin_sse_add_su3_vector(lv,rv,dv);
643
644 return d;
645}
646
647
648#if defined(QDP_SCALARSITE_USE_EVALUATE)
649// NOTE: let these be subroutines to save space
650
651//-------------------------------------------------------------------
652// Specialization to optimize the case
653// LatticeColorMatrix = LatticeColorMatrix * LatticeColorMatrix
654template<>
656 const OpAssign& op,
660 OLattice< TCol > >& rhs,
661 const Subset& s);
662
663// Specialization to optimize the case
664// LatticeColorMatrix = adj(LatticeColorMatrix) * LatticeColorMatrix
665template<>
667 const OpAssign& op,
671 OLattice< TCol > >& rhs,
672 const Subset& s);
673
674// Specialization to optimize the case
675// LatticeColorMatrix = LatticeColorMatrix * adj(LatticeColorMatrix)
676template<>
678 const OpAssign& op,
682 OLattice< TCol > >& rhs,
683 const Subset& s);
684
685// Specialization to optimize the case
686// LatticeColorMatrix = adj(LatticeColorMatrix) * adj(LatticeColorMatrix)
687template<>
689 const OpAssign& op,
693 OLattice< TCol > >& rhs,
694 const Subset& s);
695
696//-------------------------------------------------------------------
697// Specialization to optimize the case
698// LatticeColorMatrix += LatticeColorMatrix * LatticeColorMatrix
699template<>
701 const OpAddAssign& op,
705 OLattice< TCol > >& rhs,
706 const Subset& s);
707
708// Specialization to optimize the case
709// LatticeColorMatrix += adj(LatticeColorMatrix) * LatticeColorMatrix
710template<>
712 const OpAddAssign& op,
716 OLattice< TCol > >& rhs,
717 const Subset& s);
718
719// Specialization to optimize the case
720// LatticeColorMatrix += LatticeColorMatrix * adj(LatticeColorMatrix)
721template<>
723 const OpAddAssign& op,
727 OLattice< TCol > >& rhs,
728 const Subset& s);
729
730// Specialization to optimize the case
731// LatticeColorMatrix += adj(LatticeColorMatrix) * adj(LatticeColorMatrix)
732template<>
734 const OpAddAssign& op,
738 OLattice< TCol > >& rhs,
739 const Subset& s);
740
741//-------------------------------------------------------------------
742// Specialization to optimize the case
743// LatticeColorMatrix -= LatticeColorMatrix * LatticeColorMatrix
744template<>
746 const OpSubtractAssign& op,
750 OLattice< TCol > >& rhs,
751 const Subset& s);
752
753// Specialization to optimize the case
754// LatticeColorMatrix -= adj(LatticeColorMatrix) * LatticeColorMatrix
755template<>
757 const OpSubtractAssign& op,
761 OLattice< TCol > >& rhs,
762 const Subset& s);
763
764// Specialization to optimize the case
765// LatticeColorMatrix -= LatticeColorMatrix * adj(LatticeColorMatrix)
766template<>
768 const OpSubtractAssign& op,
772 OLattice< TCol > >& rhs,
773 const Subset& s);
774
775// Specialization to optimize the case
776// LatticeColorMatrix -= adj(LatticeColorMatrix) * adj(LatticeColorMatrix)
777template<>
779 const OpSubtractAssign& op,
783 OLattice< TCol > >& rhs,
784 const Subset& s);
785
786
787
788// Specialization to optimize the case
789// LatticeColorMatrix = LatticeColorMatrix
790template<>
792 const OpAssign& op,
793 const QDPExpr<
795 OLattice< TCol > >& rhs,
796 const Subset& s);
797
798
799//-------------------------------------------------------------------
800// Specialization to optimize the case
801// LatticeColorMatrix += LatticeColorMatrix
802template<>
804 const OpAddAssign& op,
805 const QDPExpr<
807 OLattice< TCol > >& rhs,
808 const Subset& s);
809
810//-------------------------------------------------------------------
811// Specialization to optimize the case
812// LatticeColorMatrix -= LatticeColorMatrix
813template<>
815 const OpSubtractAssign& op,
816 const QDPExpr<
818 OLattice< TCol > >& rhs,
819 const Subset& s);
820
821//-------------------------------------------------------------------
822
823// Specialization to optimize the case
824// LatticeHalfFermion = LatticeColorMatrix * LatticeHalfFermion
825// NOTE: let this be a subroutine to save space
826template<>
828 const OpAssign& op,
831 Reference<QDPType< TVec2, OLattice< TVec2 > > > >,
832 OLattice< TVec2 > >& rhs,
833 const Subset& s);
834
835#endif
836
837 // end of group optimizations
839
840#if defined(QDP_SCALARSITE_DEBUG)
841#undef QDP_SCALARSITE_DEBUG
842#endif
843
844#if defined(QDP_SCALARSITE_USE_EVALUATE)
845#undef QDP_SCALARSITE_USE_EVALUATE
846#endif
847
848} // namespace QDP;
849
850#endif // defined(__GNUC__)
851
852#endif
Outer grid Lattice type.
Definition qdp_outer.h:264
Primitive color Matrix class.
Primitive color Vector class.
Primitive Matrix class.
Primitive Scalar.
Primitive spin Vector class.
Primitive 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
Reality complex.
Subsets - controls how lattices are looped.
Definition qdp_subset.h:39
BinaryReturn< IScalar< T1 >, IScalar< T2 >, OpAdjMultiplyAdj >::Type_t adjMultiplyAdj(const IScalar< T1 > &l, const IScalar< T2 > &r)
Definition qdp_inner.h:1198
BinaryReturn< IScalar< T1 >, IScalar< T2 >, OpMultiplyAdj >::Type_t multiplyAdj(const IScalar< T1 > &l, const IScalar< T2 > &r)
Definition qdp_inner.h:1189
BinaryReturn< IScalar< T1 >, IScalar< T2 >, OpAdjMultiply >::Type_t adjMultiply(const IScalar< T1 > &l, const IScalar< T2 > &r)
Definition qdp_inner.h:1180
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)
RComplex< BAGELQDPFloat > RComplexFloat
StandardOutputStream cout
Definition qdp_stdio.cc:21
Yet another random number generator.
MakeReturn< BinaryNode< OpMultiply, typenameCreateLeaf< QDPType< T1, C1 > >::Leaf_t, typenameCreateLeaf< QDPExpr< T2, C2 > >::Leaf_t >, typenameBinaryReturn< C1, C2, OpMultiply >::Type_t >::Expression_t operator*(const QDPType< T1, C1 > &l, const QDPExpr< T2, C2 > &r)
Definition qdp.h:2588
MakeReturn< BinaryNode< OpAdd, typenameCreateLeaf< QDPType< T1, C1 > >::Leaf_t, typenameCreateLeaf< QDPExpr< T2, C2 > >::Leaf_t >, typenameBinaryReturn< C1, C2, OpAdd >::Type_t >::Expression_t operator+(const QDPType< T1, C1 > &l, const QDPExpr< T2, C2 > &r)
Definition qdp.h:2556