QDP++
qdp_scalarsite_sse_linalg_double.h
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: qdp_scalarsite_sse_linalg_double.h,v 1.2 2009-02-10 17:06:37 bjoo Exp $
3
9
10#ifndef QDP_SCALARSITE_SSE_LINALG_DOUBLE_H
11#define QDP_SCALARSITE_SSE_LINALG_DOUBLE_H
12
14
15
16namespace QDP {
17
18// #define QDP_SCALARSITE_DEBUG
19
20#define QDP_SCALARSITE_USE_EVALUATE
21
22
29
30
31// Types needed for the expression templates.
33
34 // Vector and half vector not yet ready.
35#if 0
38#endif
39
40
41
42// Optimized version of
43// PColorMatrix<RComplex<REAL64>,3> <- PColorMatrix<RComplex<REAL64>,3> * PColorMatrix<RComplex<REAL64>,3>
44template<>
49{
52
53#if defined(QDP_SCALARSITE_DEBUG)
54 cout << "M*M" << endl;
55#endif
56
57 REAL64* lm = (REAL64 *) &(l.elem(0,0).real());
58 REAL64* rm = (REAL64 *) &(r.elem(0,0).real());
59 REAL64* dm = (REAL64 *) &(d.elem(0,0).real());
60
61 // Use Unaligned here
62 ssed_m_eq_mm_u(dm,lm,rm,1);
63
64 return d;
65}
66
67
68
69// Optimized version of
70// PScalar<PColorMatrix<RComplex<REAL64>,3>> <- PScalar<PColorMatrix<RComplex<REAL64>,3>> *
71// PScalar<PColorMatrix<RComplex<REAL64>,3>>
72template<>
74 PScalar<PColorMatrix<RComplex<REAL64>,3> >, OpMultiply>::Type_t
77{
80
81#if defined(QDP_SCALARSITE_DEBUG)
82 cout << "PSc<M>*PSc<M>" << endl;
83#endif
84 REAL64* lm = (REAL64 *)&(l.elem().elem(0,0).real());
85 REAL64* rm = (REAL64 *)&(r.elem().elem(0,0).real());
86 REAL64* dm = (REAL64 *)&(d.elem().elem(0,0).real());
87
88 // Use unaligned here
89 ssed_m_eq_mm_u(dm, lm, rm, 1);
90
91 return d;
92}
93
94
95// Optimized version of
96// PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3>>> <- PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3>>> *
97// PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3>>>
98template<>
100 PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3> > >, OpMultiply>::Type_t
103{
106
107#if defined(QDP_SCALARSITE_DEBUG)
108 cout << "PSc<PSc<M>>*PSc<PSc<M>>" << endl;
109#endif
110
111 REAL64* lm = (REAL64 *)&(l.elem().elem().elem(0,0).real());
112 REAL64* rm = (REAL64 *)&(r.elem().elem().elem(0,0).real());
113 REAL64* dm = (REAL64 *)&(d.elem().elem().elem(0,0).real());
114
115 // Use unaligned here
116 ssed_m_eq_mm_u(dm,lm, rm,1);
117
118 return d;
119}
120
121
122// Optimized version of
123// PColorMatrix<RComplex<REAL64>,3> <- adj(PColorMatrix<RComplex<REAL64>,3>) * PColorMatrix<RComplex<REAL64>,3>
124template<>
125inline BinaryReturn<PMatrix<RComplex<REAL64>,3,PColorMatrix>,
126 PMatrix<RComplex<REAL64>,3,PColorMatrix>, OpAdjMultiply>::Type_t
129{
132
133#if defined(QDP_SCALARSITE_DEBUG)
134 cout << "adj(M)*M" << endl;
135#endif
136 REAL64* lm = (REAL64 *) &(l.elem(0,0).real());
137 REAL64* rm = (REAL64 *) &(r.elem(0,0).real());
138 REAL64* dm = (REAL64 *) &(d.elem(0,0).real());
139
140 ssed_m_eq_hm_u(dm,lm,rm,1);
141
142 return d;
143}
144
145
146// Optimized version of
147// PScalar<PColorMatrix<RComplex<REAL64>,3>> <- adj(PScalar<PColorMatrix<RComplex<REAL64>,3>>) * PScalar<PColorMatrix<RComplex<REAL64>,3>>
148template<>
150 PScalar<PColorMatrix<RComplex<REAL64>,3> >, OpAdjMultiply>::Type_t
153{
156
157#if defined(QDP_SCALARSITE_DEBUG)
158 cout << "adj(PSc<M>)*PSc<M>" << endl;
159#endif
160
161 REAL64* lm = (REAL64 *)&(l.elem().elem(0,0).real());
162 REAL64* rm = (REAL64 *)&(r.elem().elem(0,0).real());
163 REAL64* dm = (REAL64 *)&(d.elem().elem(0,0).real());
164
165 ssed_m_eq_hm_u(dm, lm, rm, 1);
166
167
168 return d;
169}
170
171
172// Optimized version of
173// PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3>>> <- adj(PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3>>>) *
174// PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3>>>
175template<>
177 PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3> > >, OpAdjMultiply>::Type_t
180{
183
184#if defined(QDP_SCALARSITE_DEBUG)
185 cout << "adj(PSc<PSc<M>>)*PSc<PSc<M>>" << endl;
186#endif
187
188 REAL64* lm = (REAL64 *)&(l.elem().elem().elem(0,0).real());
189 REAL64* rm = (REAL64 *)&(r.elem().elem().elem(0,0).real());
190 REAL64* dm = (REAL64 *)&(d.elem().elem().elem(0,0).real());
191
192 ssed_m_eq_hm_u(dm,lm, rm,1);
193
194 return d;
195}
196
197
198// Optimized version of
199// PColorMatrix<RComplex<REAL64>,3> <- PColorMatrix<RComplex<REAL64>,3> * adj(PColorMatrix<RComplex<REAL64>,3>)
200template<>
201inline BinaryReturn<PMatrix<RComplex<REAL64>,3,PColorMatrix>,
202 PMatrix<RComplex<REAL64>,3,PColorMatrix>, OpMultiplyAdj>::Type_t
205{
208
209#if defined(QDP_SCALARSITE_DEBUG)
210 cout << "M*adj(M)" << endl;
211#endif
212 REAL64* lm = (REAL64 *) &(l.elem(0,0).real());
213 REAL64* rm = (REAL64 *) &(r.elem(0,0).real());
214 REAL64* dm = (REAL64 *) &(d.elem(0,0).real());
215
216 ssed_m_eq_mh_u(dm,lm,rm,1);
217
218
219 return d;
220}
221
222
223// Optimized version of
224// PScalar<PColorMatrix<RComplex<REAL64>,3>> <- PScalar<PColorMatrix<RComplex<REAL64>,3>> *
225// adj(PScalar<PColorMatrix<RComplex<REAL64>,3>>)
226template<>
228 PScalar<PColorMatrix<RComplex<REAL64>,3> >, OpMultiplyAdj>::Type_t
231{
234
235#if defined(QDP_SCALARSITE_DEBUG)
236 cout << "PSc<M>*adj(PSc<M>)" << endl;
237#endif
238 REAL64* lm = (REAL64 *)&(l.elem().elem(0,0).real());
239 REAL64* rm = (REAL64 *)&(r.elem().elem(0,0).real());
240 REAL64* dm = (REAL64 *)&(d.elem().elem(0,0).real());
241
242 ssed_m_eq_mh_u(dm,lm,rm,1);
243 return d;
244}
245
246
247// Optimized version of
248// PScalar<Pscalar<PColorMatrix<RComplex<REAL64>,3>>> <- PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3>>> *
249// adj(PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3>>>)
250template<>
252 PScalar<PScalar<PColorMatrix<RComplex<REAL64>,3> > >, OpMultiplyAdj>::Type_t
255{
258
259#if defined(QDP_SCALARSITE_DEBUG)
260 cout << "PSc<PSc<M>>*adj(PSc<PSc<M>>)" << endl;
261#endif
262 REAL64* lm = (REAL64 *)&(l.elem().elem().elem(0,0).real());
263 REAL64* rm = (REAL64 *)&(r.elem().elem().elem(0,0).real());
264 REAL64* dm = (REAL64 *)&(d.elem().elem().elem(0,0).real());
265
266 ssed_m_eq_mh_u(dm,lm,rm,1);
267 return d;
268}
269
270
271// Ooops, this macro does not exist!!
272
273// Optimized version of
274// PColorMatrix<RComplex<REAL64>,3> <- adj(PColorMatrix<RComplex<REAL64>,3>) * adj(PColorMatrix<RComplex<REAL64>,3>)
275template<>
276inline BinaryReturn<PMatrix<RComplex<REAL64>,3,PColorMatrix>,
277 PMatrix<RComplex<REAL64>,3,PColorMatrix>, OpAdjMultiplyAdj>::Type_t
280{
283
285
286//
287
288 REAL64* lm = (REAL64 *) &(l.elem(0,0).real());
289 REAL64* rm = (REAL64 *) &(r.elem(0,0).real());
290 REAL64* dm = (REAL64 *) &(d.elem(0,0).real());
291 ssed_m_eq_hh_u(dm,lm,rm,1);
292
293 return d;
294}
295
296
297#if 0
298// Optimized version of
299// PColorVector<RComplex<REAL64>,3> <- PColorMatrix<RComplex<REAL64>,3> * PColorVector<RComplex<REAL64>,3>
300template<>
301inline BinaryReturn<PMatrix<RComplex<REAL64>,3,PColorMatrix>,
302 PVector<RComplex<REAL64>,3,PColorVector>, OpMultiply>::Type_t
303operator*(const PMatrix<RComplex<REAL64>,3,PColorMatrix>& l,
304 const PVector<RComplex<REAL64>,3,PColorVector>& r)
305{
307 PVector<RComplex<REAL64>,3,PColorVector>, OpMultiply>::Type_t d;
308
309#if defined(QDP_SCALARSITE_DEBUG)
310 cout << "M*V" << endl;
311#endif
312
313 REAL64* lm = (REAL64 *)&(l.elem(0,0).real());
314 su3_vectorf* rv = (su3_vectorf *)&(r.elem(0).real());
315 su3_vectorf* dv = (su3_vectorf *)&(d.elem(0).real());
316
317 intrin_sse_mult_su3_mat_vec(lm,rv,dv);
318
319 return d;
320}
321
322
323
324// Optimized version of
325// PScalar<PColorVector<RComplex<REAL64>,3>> <- PScalar<PColorMatrix<RComplex<REAL64>,3>> * PScalar<PColorVector<RComplex<REAL64>,3>>
326template<>
331{
334
335#if defined(QDP_SCALARSITE_DEBUG)
336 cout << "PSc<M>*PSc<V>" << endl;
337#endif
338
339 REAL64* lm = (REAL64 *)&(l.elem().elem(0,0).real());
340 su3_vectorf* rv = (su3_vectorf *)&(r.elem().elem(0).real());
341 su3_vectorf* dv = (su3_vectorf *)&(d.elem().elem(0).real());
342
343 intrin_sse_mult_su3_mat_vec(lm,rv,dv);
344
345 return d;
346}
347
348
349// Optimized version of
350// PColorVector<RComplex<REAL64>,3> <- adj(PColorMatrix<RComplex<REAL64>,3>) * PColorVector<RComplex<REAL64>,3>
351template<>
356{
359
360#if defined(QDP_SCALARSITE_DEBUG)
361 cout << "adj(M)*V" << endl;
362#endif
363
364 REAL64* lm = (REAL64 *)&(l.elem(0,0).real());
365 su3_vectorf* rv = (su3_vectorf *)&(r.elem(0).real());
366 su3_vectorf* dv = (su3_vectorf *)&(d.elem(0).real());
367
368 intrin_sse_mult_adj_su3_mat_vec(lm,rv,dv);
369
370 return d;
371}
372
373
374// Optimized version of StaggeredFermion <- ColorMatrix*StaggeredFermion
375// PSpinVector<PColorVector<RComplex<REAL64>,3>,1> <- PScalar<PColorMatrix<RComplex<REAL64>,3>> * PSpinVector<PColorVector<RComplex<REAL64>,3>,1>
376template<>
381{
384
385#if defined(QDP_SCALARSITE_DEBUG)
386 cout << "M*S" << endl;
387#endif
388 REAL64* lm = (REAL64 *)&(l.elem().elem(0,0).real());
389 su3_vectorf* rv = (su3_vectorf *)&(r.elem(0).elem(0).real());
390 su3_vectorf* dv = (su3_vectorf *)&(d.elem(0).elem(0).real());
391
392 intrin_sse_mult_su3_mat_vec(lm,rv,dv);
393
394 return d;
395}
396
397
398// Optimized version of
399// PScalar<PColorVector<RComplex<REAL64>,3>> <- adj(PScalar<PColorMatrix<RComplex<REAL64>,3>>) * PScalar<PColorVector<RComplex<REAL64>,3>>
400template<>
405{
408
409#if defined(QDP_SCALARSITE_DEBUG)
410 cout << "adj(PSc<M>)*PSc<V>" << endl;
411#endif
412 REAL64* lm = (REAL64 *)&(l.elem().elem(0,0).real());
413 su3_vectorf* rv = (su3_vectorf *)&(r.elem().elem(0).real());
414 su3_vectorf* dv = (su3_vectorf *)&(d.elem().elem(0).real());
415
416 intrin_sse_mult_adj_su3_mat_vec(lm,rv,dv);
417
418 return d;
419}
420
421
422// Optimized version of StaggeredFermion <- adj(ColorMatrix)*StaggeredFermion
423// PSpinVector<PColorVector<RComplex<REAL64>,3>,1> <- adj(PScalar<PColorMatrix<RComplex<REAL64>,3>>) * PSpinVector<PColorVector<RComplex<REAL64>,3>,1>
424template<>
429{
432
433#if defined(QDP_SCALARSITE_DEBUG)
434 cout << "adj(PSc<M>)*S" << endl;
435#endif
436 REAL64* lm = (REAL64 *)&(l.elem().elem(0,0).real());
437 su3_vectorf* rv = (su3_vectorf *)&(r.elem(0).elem(0).real());
438 su3_vectorf* dv = (su3_vectorf *)&(d.elem(0).elem(0).real());
439
440 intrin_sse_mult_adj_su3_mat_vec(lm,rv,dv);
441
442 return d;
443}
444
445
446// Optimized version of HalfFermion <- ColorMatrix*HalfFermion
447// PSpinVector<PColorVector<RComplex<REAL64>,3>,2> <- PScalar<PColorMatrix<RComplex<REAL64>,3>> *
448// PSpinVector<ColorVector<RComplex<REAL64>,3>,2>
449template<>
454{
457
458#if defined(QDP_SCALARSITE_DEBUG)
459 cout << "PSc<M>*H" << endl;
460#endif
461 REAL64* lm =(REAL64 *)&( l.elem().elem(0,0).real() );
462 half_wilson_vectorf* rh = (half_wilson_vectorf *)&(r.elem(0).elem(0).real() );
463 half_wilson_vectorf* dh = (half_wilson_vectorf *)&(d.elem(0).elem(0).real() );
464
465 intrin_sse_mult_su3_mat_hwvec(lm,rh,dh);
466
467 return d;
468}
469
470
471// Optimized version of HalfFermion <- ColorMatrix*HalfFermion
472// PSpinVector<PColorVector<RComplex<REAL64>,3>,2> <- adj(PScalar<PColorMatrix<RComplex<REAL64>,3>>) *
473// PSpinVector<ColorVector<RComplex<REAL64>,3>,2>
474template<>
479{
482
483#if defined(QDP_SCALARSITE_DEBUG)
484 cout << "adj(PSc<M>)*H" << endl;
485#endif
486
487 REAL64* lm =(REAL64 *)&( l.elem().elem(0,0).real() );
488 half_wilson_vectorf* rh = (half_wilson_vectorf *)&(r.elem(0).elem(0).real() );
489 half_wilson_vectorf* dh = (half_wilson_vectorf *)&(d.elem(0).elem(0).real() );
490
491 intrin_sse_mult_adj_su3_mat_hwvec(lm,rh,dh);
492
493 return d;
494}
495
496
497// Optimized version of
498// PColorVector<RComplex<REAL64>,3> <- PColorVector<RComplex<REAL64>,3> + PColorVector<RComplex<REAL64>,3>
499template<>
504{
507
508#if defined(QDP_SCALARSITE_DEBUG)
509 cout << "V+V" << endl;
510#endif
511
512 su3_vectorf *lv = (su3_vectorf *)&( l.elem(0).real() );
513 su3_vectorf *rv = (su3_vectorf *)&( r.elem(0).real() );
514 su3_vectorf *dv = (su3_vectorf *)&( d.elem(0).real() );
515
516 intrin_sse_add_su3_vector(lv,rv,dv);
517
518 return d;
519}
520
521
522// Optimized version of DiracFermion <- ColorMatrix*DiracFermion
523// PSpinVector<PColorVector<RComplex<REAL64>,3>,4> <- PScalar<PColorMatrix<RComplex<REAL64>,3>>
524// * PSpinVector<PColorVector<RComplex<REAL64>,3>,4>
525template<>
530{
533
534#if defined(QDP_SCALARSITE_DEBUG)
535 cout << "PSc<M>*D" << endl;
536#endif
537 REAL64 *lm = (REAL64 *)&(l.elem().elem(0,0).real());
538 su3_vectorf *rv0 = (su3_vectorf *)&(r.elem(0).elem(0).real());
539 su3_vectorf *rv1 = (su3_vectorf *)&(r.elem(1).elem(0).real());
540 su3_vectorf *rv2 = (su3_vectorf *)&(r.elem(2).elem(0).real());
541 su3_vectorf *rv3 = (su3_vectorf *)&(r.elem(3).elem(0).real());
542
543 su3_vectorf *dv0 = (su3_vectorf *)&(d.elem(0).elem(0).real());
544 su3_vectorf *dv1 = (su3_vectorf *)&(d.elem(1).elem(0).real());
545 su3_vectorf *dv2 = (su3_vectorf *)&(d.elem(2).elem(0).real());
546 su3_vectorf *dv3 = (su3_vectorf *)&(d.elem(3).elem(0).real());
547
548 intrin_sse_mult_su3_mat_vec(lm,rv0,dv0);
549 intrin_sse_mult_su3_mat_vec(lm,rv1,dv1);
550 intrin_sse_mult_su3_mat_vec(lm,rv2,dv2);
551 intrin_sse_mult_su3_mat_vec(lm,rv3,dv3);
552
553 return d;
554}
555
556
557// Optimized version of DiracFermion <- adj(ColorMatrix)*DiracFermion
558// PSpinVector<PColorVector<RComplex<REAL64>,3>,4> <- adj(PScalar<PColorMatrix<RComplex<REAL64>,3>>)
559// * PSpinVector<PColorVector<RComplex<REAL64>,3>,4>
560template<>
565{
568
569#if defined(QDP_SCALARSITE_DEBUG)
570 cout << "adj(PSc<M>)*D" << endl;
571#endif
572 REAL64 *lm = (REAL64 *)&(l.elem().elem(0,0).real());
573 su3_vectorf *rv0 = (su3_vectorf *)&(r.elem(0).elem(0).real());
574 su3_vectorf *rv1 = (su3_vectorf *)&(r.elem(1).elem(0).real());
575 su3_vectorf *rv2 = (su3_vectorf *)&(r.elem(2).elem(0).real());
576 su3_vectorf *rv3 = (su3_vectorf *)&(r.elem(3).elem(0).real());
577
578 su3_vectorf *dv0 = (su3_vectorf *)&(d.elem(0).elem(0).real());
579 su3_vectorf *dv1 = (su3_vectorf *)&(d.elem(1).elem(0).real());
580 su3_vectorf *dv2 = (su3_vectorf *)&(d.elem(2).elem(0).real());
581 su3_vectorf *dv3 = (su3_vectorf *)&(d.elem(3).elem(0).real());
582
583 intrin_sse_mult_adj_su3_mat_vec(lm,rv0,dv0);
584 intrin_sse_mult_adj_su3_mat_vec(lm,rv1,dv1);
585 intrin_sse_mult_adj_su3_mat_vec(lm,rv2,dv2);
586 intrin_sse_mult_adj_su3_mat_vec(lm,rv3,dv3);
587
588 return d;
589}
590
591
592// Optimized version of
593// PScalar<PColorVector<RComplex<REAL64>,3>> <- PScalar<PColorVector<RComplex<REAL64>,3>>
594// + PScalar<PColorVector<RComplex<REAL64>,3>>
595template<>
600{
603
604#if defined(QDP_SCALARSITE_DEBUG)
605 cout << "PSc<V>+PSc<V>" << endl;
606#endif
607
608 su3_vectorf *lv = (su3_vectorf *)&(l.elem().elem(0).real());
609 su3_vectorf *rv = (su3_vectorf *)&(r.elem().elem(0).real());
610 su3_vectorf *dv = (su3_vectorf *)&(d.elem().elem(0).real());
611
612 intrin_sse_add_su3_vector(lv,rv,dv);
613
614 return d;
615}
616
617#endif
618
619
620#if defined(QDP_SCALARSITE_USE_EVALUATE)
621// NOTE: let these be subroutines to save space
622
623//-------------------------------------------------------------------
624// Specialization to optimize the case
625// LatticeColorMatrix = LatticeColorMatrix * LatticeColorMatrix
626template<>
628 const OpAssign& op,
632 OLattice< DCol > >& rhs,
633 const Subset& s);
634
635// Specialization to optimize the case
636// LatticeColorMatrix = adj(LatticeColorMatrix) * LatticeColorMatrix
637template<>
639 const OpAssign& op,
643 OLattice< DCol > >& rhs,
644 const Subset& s);
645
646// Specialization to optimize the case
647// LatticeColorMatrix = LatticeColorMatrix * adj(LatticeColorMatrix)
648template<>
650 const OpAssign& op,
654 OLattice< DCol > >& rhs,
655 const Subset& s);
656
657// Specialization to optimize the case
658// LatticeColorMatrix = adj(LatticeColorMatrix) * adj(LatticeColorMatrix)
659template<>
661 const OpAssign& op,
665 OLattice< DCol > >& rhs,
666 const Subset& s);
667
668//-------------------------------------------------------------------
669// Specialization to optimize the case
670// LatticeColorMatrix += LatticeColorMatrix * LatticeColorMatrix
671template<>
673 const OpAddAssign& op,
677 OLattice< DCol > >& rhs,
678 const Subset& s);
679
680// Specialization to optimize the case
681// LatticeColorMatrix += adj(LatticeColorMatrix) * LatticeColorMatrix
682template<>
684 const OpAddAssign& op,
688 OLattice< DCol > >& rhs,
689 const Subset& s);
690
691// Specialization to optimize the case
692// LatticeColorMatrix += LatticeColorMatrix * adj(LatticeColorMatrix)
693template<>
695 const OpAddAssign& op,
699 OLattice< DCol > >& rhs,
700 const Subset& s);
701
702// Specialization to optimize the case
703// LatticeColorMatrix += adj(LatticeColorMatrix) * adj(LatticeColorMatrix)
704template<>
706 const OpAddAssign& op,
710 OLattice< DCol > >& rhs,
711 const Subset& s);
712
713//-------------------------------------------------------------------
714// Specialization to optimize the case
715// LatticeColorMatrix -= LatticeColorMatrix * LatticeColorMatrix
716template<>
718 const OpSubtractAssign& op,
722 OLattice< DCol > >& rhs,
723 const Subset& s);
724
725// Specialization to optimize the case
726// LatticeColorMatrix -= adj(LatticeColorMatrix) * LatticeColorMatrix
727template<>
729 const OpSubtractAssign& op,
733 OLattice< DCol > >& rhs,
734 const Subset& s);
735
736// Specialization to optimize the case
737// LatticeColorMatrix -= LatticeColorMatrix * adj(LatticeColorMatrix)
738template<>
740 const OpSubtractAssign& op,
744 OLattice< DCol > >& rhs,
745 const Subset& s);
746
747// Specialization to optimize the case
748// LatticeColorMatrix -= adj(LatticeColorMatrix) * adj(LatticeColorMatrix)
749template<>
751 const OpSubtractAssign& op,
755 OLattice< DCol > >& rhs,
756 const Subset& s);
757
758
759
760// Specialization to optimize the case
761// LatticeColorMatrix = LatticeColorMatrix
762template<>
764 const OpAssign& op,
765 const QDPExpr<
767 OLattice< DCol > >& rhs,
768 const Subset& s);
769
770
771//-------------------------------------------------------------------
772// Specialization to optimize the case
773// LatticeColorMatrix += LatticeColorMatrix
774template<>
776 const OpAddAssign& op,
777 const QDPExpr<
779 OLattice< DCol > >& rhs,
780 const Subset& s);
781
782//-------------------------------------------------------------------
783// Specialization to optimize the case
784// LatticeColorMatrix -= LatticeColorMatrix
785template<>
787 const OpSubtractAssign& op,
788 const QDPExpr<
790 OLattice< DCol > >& rhs,
791 const Subset& s);
792
793
794#if 0
795//-------------------------------------------------------------------
796
797// Specialization to optimize the case
798// LatticeHalfFermion = LatticeColorMatrix * LatticeHalfFermion
799// NOTE: let this be a subroutine to save space
800template<>
802 const OpAssign& op,
805 Reference<QDPType< DVec2, OLattice< DVec2 > > > >,
806 OLattice< DVec2 > >& rhs,
807 const Subset& s);
808
809#endif
810
811 // end of group optimizations
813
814#if defined(QDP_SCALARSITE_DEBUG)
815#undef QDP_SCALARSITE_DEBUG
816#endif
817
818#if defined(QDP_SCALARSITE_USE_EVALUATE)
819#undef QDP_SCALARSITE_USE_EVALUATE
820#endif
821
822#endif
823
824} // namespace QDP;
825
826
827#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
double REAL64
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)
PScalar< PColorMatrix< RComplex< REAL64 >, 3 > > DCol
StandardOutputStream cout
Definition qdp_stdio.cc:21
Yet another random number generator.
void ssed_m_eq_hh_u(REAL64 *m3, REAL64 *m2, REAL64 *m1, int n_mat)
void ssed_m_eq_mm_u(REAL64 *m3, REAL64 *m2, REAL64 *m1, int n_mat)
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
void ssed_m_eq_mh_u(REAL64 *m3, REAL64 *m2, REAL64 *m1, int n_mat)
void ssed_m_eq_hm_u(REAL64 *m3, REAL64 *m2, REAL64 *m1, int n_mat)
double REAL64