QDP++
qdp_generic_fused_spin_recon_evaluates.h
Go to the documentation of this file.
1#ifndef QDP_GENERIC_FUSED_SPIN_RECON_EVALUATES_H
2#define QDP_GENERIC_FUSED_SPIN_RECON_EVALUATES_H
4namespace QDP {
5
6
8// Threading evaluates
9//
10// by Xu Guo, EPCC, 28 August, 2008
13// the wrappers for the functions to be threaded
17// Vec = SpinReconstructDir0Plus( u * psi);
18template<>
19inline
21 const OpAssign& op,
22 const QDPExpr<
27 >,
29 >&rhs,
30 const Subset& s)
31{
32 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
33 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
34
35 if( s.hasOrderedRep() ) {
36 int totalSize = s.end() - s.start() +1;
37
39
41
43 // Original code
44
45 /*
46 for(int site = s.start(); site <= s.end(); site++) {
48 HVec tmp;
49 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
50 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
53 inlineSpinReconDir0Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
54 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
55 1);
56
57 }*/
59 }
60 else {
61
62 const int *tab = s.siteTable().slice();
63
64 int totalSize = s.numSiteTable();
65
67
69
71 // Original code
73 /*
74 for(int j=0; j < s.numSiteTable(); j++) {
75 int site = tab[j];
76
77 HVec tmp;
78 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
79 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
80
81
82 inlineSpinReconDir0Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
83 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
84 1);
85 }*/
86 }
87}
88
89// Vec = SpinReconstructDir0Minus( u * psi);
90template<>
91inline
93 const OpAssign& op,
94 const QDPExpr<
99 >,
101 >&rhs,
102 const Subset& s)
103{
104 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
105 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
106
107
108 if( s.hasOrderedRep() ) {
109 int totalSize = s.end() - s.start() +1;
110
112
114
116 // Original code
118 /*
119 for(int site = s.start(); site <= s.end(); site++) {
120
121 HVec tmp;
122 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
123 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
124
125
126 inlineSpinReconDir0Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
127 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
128 1);
129
130 }*/
131
132 }
133 else {
134 const int *tab = s.siteTable().slice();
135
136 int totalSize = s.numSiteTable();
137
139
141
143 // Original code
145 /*
146 for(int j=0; j < s.numSiteTable(); j++) {
147 int site = tab[j];
148
149
150 HVec tmp;
151 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
152 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
153
154
155 inlineSpinReconDir0Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
156 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
157 1);
158
159
160 }*/
161 }
162
163}
164
165
166
167// Vec = SpinReconstructDir1Plus( u * psi);
168template<>
169inline
171 const OpAssign& op,
172 const QDPExpr<
173 BinaryNode<
177 >,
179 >&rhs,
180 const Subset& s)
181{
182 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
183 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
184
185 if( s.hasOrderedRep() ) {
186
187 int totalSize = s.end() - s.start() +1;
188
190
192
194 // Original code
196 /*
197 for(int site = s.start(); site <= s.end(); site++) {
198 HVec tmp;
199 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
200 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
201
202
203 inlineSpinReconDir1Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
204 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
205 1);
206
207 }*/
208
209 }
210 else {
211
212 const int *tab = s.siteTable().slice();
213
214 int totalSize = s.numSiteTable();
215
217
219
221 // Original code
223 /*
224 for(int j=0; j < s.numSiteTable(); j++) {
225 int site = tab[j];
226
227 HVec tmp;
228 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
229 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
230
231
232 inlineSpinReconDir1Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
233 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
234 1);
235
236
237 }*/
238 }
239}
240
241// Vec = SpinReconstructDir1Minus( u * psi);
242template<>
243inline
245 const OpAssign& op,
246 const QDPExpr<
247 BinaryNode<
251 >,
253 >&rhs,
254 const Subset& s)
255{
256 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
257 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
258
259 if( s.hasOrderedRep() ) {
260
261 int totalSize = s.end() - s.start() +1;
262
264
266
268 // Original code
270 /*
271 for(int site = s.start(); site <= s.end(); site++) {
272 HVec tmp;
273 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
274 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
275
276
277 inlineSpinReconDir1Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
278 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
279 1);
280
281 }*/
282
283 }
284 else {
285
286 const int *tab = s.siteTable().slice();
287
288 int totalSize = s.numSiteTable();
289
291
293
295 // Original code
297 /*
298 for(int j=0; j < s.numSiteTable(); j++) {
299 int site = tab[j];
300
301 HVec tmp;
302 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
303 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
304
305
306 inlineSpinReconDir1Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
307 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
308 1);
309
310
311 }*/
312 }
313}
314
315
316
317// Vec = SpinReconstructDir2Plus( u * psi);
318template<>
319inline
321 const OpAssign& op,
322 const QDPExpr<
323 BinaryNode<
327 >,
329 >&rhs,
330 const Subset& s)
331{
332 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
333 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
334
335
336 if( s.hasOrderedRep() ) {
337
338 int totalSize = s.end() - s.start() +1;
339
341
343
345 // Original code
347 /*
348 for(int site = s.start(); site <= s.end(); site++) {
349 HVec tmp;
350 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
351 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
352
353
354 inlineSpinReconDir2Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
355 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
356 1);
357
358 }*/
359
360 }
361 else {
362
363 const int *tab = s.siteTable().slice();
364
365 int totalSize = s.numSiteTable();
366
368
370
372 // Original code
374 /*
375 for(int j=0; j < s.numSiteTable(); j++) {
376 int site = tab[j];
377
378 HVec tmp;
379 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
380 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
381
382
383 inlineSpinReconDir2Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
384 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
385 1);
386
387
388 }*/
389 }
390}
391
392// Vec = SpinReconstructDir2Minus( u * psi);
393template<>
394inline
396 const OpAssign& op,
397 const QDPExpr<
398 BinaryNode<
402 >,
404 >&rhs,
405 const Subset& s)
406{
407 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
408 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
409
410
411 if( s.hasOrderedRep() ) {
412
413 int totalSize = s.end() - s.start() +1;
414
416
418
420 // Original code
422 /*
423 for(int site = s.start(); site <= s.end(); site++) {
424 HVec tmp;
425 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
426 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
427
428
429 inlineSpinReconDir2Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
430 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
431 1);
432 }*/
433
434 }
435 else {
436
437 const int *tab = s.siteTable().slice();
438
439 int totalSize = s.numSiteTable();
440
442
444
446 // Original code
448 /*
449 for(int j=0; j < s.numSiteTable(); j++) {
450 int site = tab[j];
451
452 HVec tmp;
453 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
454 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
455
456
457 inlineSpinReconDir2Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
458 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
459 1);
460
461
462 }*/
463 }
464}
465
466
467
468// Vec = SpinReconstructDir3Plus( u * psi);
469template<>
470inline
472 const OpAssign& op,
473 const QDPExpr<
474 BinaryNode<
478 >,
480 >&rhs,
481 const Subset& s)
482{
483 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
484 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
485
486
487 if( s.hasOrderedRep() ) {
488
489 int totalSize = s.end() - s.start() +1;
490
492
494
496 // Original code
498 /*
499 for(int site = s.start(); site <= s.end(); site++) {
500 HVec tmp;
501 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
502 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
503
504
505 inlineSpinReconDir3Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
506 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
507 1);
508
509 }*/
510
511 }
512 else {
513
514 const int *tab = s.siteTable().slice();
515
516 int totalSize = s.numSiteTable();
517
519
521
523 // Original code
525 /*
526 for(int j=0; j < s.numSiteTable(); j++) {
527 int site = tab[j];
528
529 HVec tmp;
530 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
531 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
532
533
534 inlineSpinReconDir3Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
535 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
536 1);
537
538
539 }*/
540 }
541
542}
543
544// Vec = SpinReconstructDir3Minus( u * psi);
545template<>
546inline
548 const OpAssign& op,
549 const QDPExpr<
550 BinaryNode<
554 >,
556 >&rhs,
557 const Subset& s)
558{
559 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
560 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
561
562 if( s.hasOrderedRep() ) {
563
564 int totalSize = s.end() - s.start() +1;
565
567
569
571 // Original code
573 /*
574 for(int site = s.start(); site <= s.end(); site++) {
575
576 HVec tmp;
577 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
578 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
579 inlineSpinReconDir3Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
580 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
581 1);
582
583 }*/
584 }
585 else {
586
587 const int *tab = s.siteTable().slice();
588
589 int totalSize = s.numSiteTable();
590
592
594
596 // Original code
598 /*
599 for(int j=0; j < s.numSiteTable(); j++) {
600 int site = tab[j];
601
602 HVec tmp;
603 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
604 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
605 inlineSpinReconDir3Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
606 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
607 1);
608
609
610 }*/
611 }
612
613}
614
615
616
617// Vec += SpinReconstructDir0Plus( u * psi);
618template<>
619inline
621 const OpAddAssign& op,
622 const QDPExpr<
623 BinaryNode<
627 >,
629 >&rhs,
630 const Subset& s)
631{
632 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
633 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
634
635 if( s.hasOrderedRep() ) {
636
637 int totalSize = s.end() - s.start() +1;
638
640
642
644 // Original code
646 /*
647 for(int site = s.start(); site <= s.end(); site++) {
648
649 HVec tmp;
650 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
651 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
652
653
654 inlineAddSpinReconDir0Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
655 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
656 1);
657
658
659 }*/
660 }
661 else {
662
663 const int *tab = s.siteTable().slice();
664
665 int totalSize = s.numSiteTable();
666
668
670
672 // Original code
674 /*
675 for(int j=0; j < s.numSiteTable(); j++) {
676 int site = tab[j];
677
678 HVec tmp;
679 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
680 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
681
682
683 inlineAddSpinReconDir0Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
684 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
685 1);
686
687
688 }*/
689 }
690}
691
692// Vec += SpinReconstructDir0Minus( u * psi);
693template<>
694inline
696 const OpAddAssign& op,
697 const QDPExpr<
698 BinaryNode<
702 >,
704 >&rhs,
705 const Subset& s)
706{
707 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
708 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
709
710 if( s.hasOrderedRep() ) {
711
712 int totalSize = s.end() - s.start() +1;
713
715
717
719 // Original code
721 /*
722 for(int site = s.start(); site <= s.end(); site++) {
723 HVec tmp;
724 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
725 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
726
727
728 inlineAddSpinReconDir0Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
729 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
730 1);
731
732
733
734 }*/
735 }
736 else {
737
738 const int *tab = s.siteTable().slice();
739
740 int totalSize = s.numSiteTable();
741
743
745
747 // Original code
749 /*
750 for(int j=0; j < s.numSiteTable(); j++) {
751 int site = tab[j];
752
753 HVec tmp;
754 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
755 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
756
757
758 inlineAddSpinReconDir0Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
759 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
760 1);
761
762
763 }*/
764 }
765
766}
767
768
769
770// Vec += SpinReconstructDir1Plus( u * psi);
771template<>
772inline
774 const OpAddAssign& op,
775 const QDPExpr<
776 BinaryNode<
780 >,
782 >&rhs,
783 const Subset& s)
784{
785 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
786 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
787
788
789 if( s.hasOrderedRep() ) {
790
791 int totalSize = s.end() - s.start() +1;
792
794
796
798 // Original code
800 /*
801 for(int site = s.start(); site <= s.end(); site++) {
802
803 HVec tmp;
804 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
805 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
806
807
808 inlineAddSpinReconDir1Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
809 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
810 1);
811
812 }*/
813 }
814 else {
815 const int *tab = s.siteTable().slice();
816
817 int totalSize = s.numSiteTable();
818
820
822
824 // Original code
826 /*
827 for(int j=0; j < s.numSiteTable(); j++) {
828 int site = tab[j];
829
830 HVec tmp;
831 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
832 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
833
834
835 inlineAddSpinReconDir1Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
836 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
837 1);
838
839
840 }*/
841 }
842
843}
844
845// Vec += SpinReconstructDir1Minus( u * psi);
846template<>
847inline
849 const OpAddAssign& op,
850 const QDPExpr<
851 BinaryNode<
855 >,
857 >&rhs,
858 const Subset& s)
859{
860 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
861 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
862
863 if( s.hasOrderedRep() ) {
864 int totalSize = s.end() - s.start() +1;
865
867
869
871 // Original code
873 /*
874 for(int site = s.start(); site <= s.end(); site++) {
875 HVec tmp;
876 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
877 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
878
879
880 inlineAddSpinReconDir1Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
881 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
882 1);
883
884
885 }*/
886 }
887 else {
888 const int *tab = s.siteTable().slice();
889
890 int totalSize = s.numSiteTable();
891
893
895
897 // Original code
899 /*
900 for(int j=0; j < s.numSiteTable(); j++) {
901 int site = tab[j];
902
903
904 HVec tmp;
905 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
906 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
907
908
909 inlineAddSpinReconDir1Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
910 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
911 1);
912
913
914 }*/
915 }
916
917}
918
919
920
921// Vec += SpinReconstructDir2Plus( u * psi);
922template<>
923inline
925 const OpAddAssign& op,
926 const QDPExpr<
927 BinaryNode<
931 >,
933 >&rhs,
934 const Subset& s)
935{
936 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
937 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
938
939
940 if( s.hasOrderedRep() ) {
941 int totalSize = s.end() - s.start() +1;
942
944
946
948 // Original code
950 /*
951 for(int site = s.start(); site <= s.end(); site++) {
952 HVec tmp;
953 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
954 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
955
956
957 inlineAddSpinReconDir2Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
958 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
959 1);
960 }*/
961 }
962 else {
963 const int *tab = s.siteTable().slice();
964
965 int totalSize = s.numSiteTable();
966
968
970
972 // Original code
974 /*
975 for(int j=0; j < s.numSiteTable(); j++) {
976 int site = tab[j];
977
978 HVec tmp;
979 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
980 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
981
982
983 inlineAddSpinReconDir2Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
984 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
985 1);
986
987
988 }*/
989 }
990}
991
992// Vec += SpinReconstructDir2Minus( u * psi);
993template<>
994inline
996 const OpAddAssign& op,
997 const QDPExpr<
998 BinaryNode<
1002 >,
1004 >&rhs,
1005 const Subset& s)
1006{
1007 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
1008 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
1009
1010 if( s.hasOrderedRep() ) {
1011
1012 int totalSize = s.end() - s.start() +1;
1013
1015
1017
1019 // Original code
1021 /*
1022 for(int site = s.start(); site <= s.end(); site++) {
1023 HVec tmp;
1024 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
1025 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
1026
1027
1028 inlineAddSpinReconDir2Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
1029 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1030 1);
1031 }*/
1032 }
1033 else {
1034 const int *tab = s.siteTable().slice();
1035
1036 int totalSize = s.numSiteTable();
1037
1039
1041
1043 // Original code
1045 /*
1046 for(int j=0; j < s.numSiteTable(); j++) {
1047 int site = tab[j];
1048
1049 HVec tmp;
1050 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
1051 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
1052
1053
1054 inlineAddSpinReconDir2Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
1055 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1056 1);
1057
1058
1059 }*/
1060 }
1061
1062}
1063
1064
1065
1066// Vec += SpinReconstructDir3Plus( u * psi);
1067template<>
1068inline
1070 const OpAddAssign& op,
1071 const QDPExpr<
1072 BinaryNode<
1076 >,
1078 >&rhs,
1079 const Subset& s)
1080{
1081 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
1082 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
1083
1084 if( s.hasOrderedRep() ) {
1085
1086 int totalSize = s.end() - s.start() +1;
1087
1089
1091
1093 // Original code
1095 /*
1096 for(int site = s.start(); site <= s.end(); site++) {
1097 HVec tmp;
1098 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
1099 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
1100
1101
1102 inlineAddSpinReconDir3Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
1103 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1104 1);
1105
1106 } */
1107 }
1108 else {
1109 const int *tab = s.siteTable().slice();
1110
1111 int totalSize = s.numSiteTable();
1112
1114
1116
1118 // Original code
1120 /*
1121 for(int j=0; j < s.numSiteTable(); j++) {
1122 int site = tab[j];
1123
1124
1125 HVec tmp;
1126 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
1127 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
1128
1129
1130 inlineAddSpinReconDir3Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
1131 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1132 1);
1133 }*/
1134 }
1135
1136}
1137
1138// Vec += SpinReconstructDir3Minus( u * psi);
1139template<>
1140inline
1142 const OpAddAssign& op,
1143 const QDPExpr<
1144 BinaryNode<
1148 >,
1150 >&rhs,
1151 const Subset& s)
1152{
1153 const OLattice< SU3Mat >& u = static_cast< const OLattice< SU3Mat >& >(rhs.expression().left());
1154 const OLattice< HVec >& a = static_cast< const OLattice< HVec >& >(rhs.expression().right());
1155
1156 if( s.hasOrderedRep() ) {
1157 int totalSize = s.end() - s.start() +1;
1158
1160
1162
1164 // Original code
1166 /*
1167 for(int site = s.start(); site <= s.end(); site++) {
1168 HVec tmp;
1169 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
1170 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
1171
1172
1173 inlineAddSpinReconDir3Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
1174 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1175 1);
1176
1177 } */
1178 }
1179 else {
1180 const int *tab = s.siteTable().slice();
1181
1182 int totalSize = s.numSiteTable();
1183
1185
1187
1189 // Original code
1191 /*
1192 for(int j=0; j < s.numSiteTable(); j++) {
1193 int site = tab[j];
1194
1195 HVec tmp;
1196 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(0), tmp.elem(0));
1197 _inline_mult_su3_mat_vec(u.elem(site).elem(), a.elem(site).elem(1), tmp.elem(1));
1198
1199
1200 inlineAddSpinReconDir3Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
1201 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1202 1);
1203
1204 }*/
1205 }
1206
1207}
1208
1209
1210
1211} // namespace QDP;
1212
1213
1214
1215
1216
1217#endif
Outer grid Lattice type.
Definition qdp_outer.h:264
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
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)
Yet another random number generator.
PScalar< PColorMatrix< RComplex< REAL >, 3 > > SU3Mat
void dispatch_to_threads(int numSiteTable, Arg a, void(*func)(int, int, int, Arg *))
void inlineSpinReconDir0Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_0).
void unordered_fused_spin_recon_evaluate_function(int lo, int hi, int myId, unordered_fused_spin_recon_user_arg *arg)
void inlineAddSpinReconDir1Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_1).
PSpinVector< PColorVector< RComplex< REAL >, 3 >, 2 > HVec
void inlineAddSpinReconDir2Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_2).
void inlineAddSpinReconDir1Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_1).
void inlineSpinReconDir2Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_2).
void inlineSpinReconDir1Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_1).
void ordered_fused_spin_recon_evaluate_function(int lo, int hi, int myId, ordered_fused_spin_recon_user_arg *arg)
void inlineAddSpinReconDir3Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma3).
void inlineSpinReconDir2Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_2).
void inlineAddSpinReconDir3Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma3).
void inlineSpinReconDir3Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma3).
void inlineAddSpinReconDir0Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_0).
void inlineAddSpinReconDir2Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_2).
void inlineSpinReconDir3Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma3).
void inlineAddSpinReconDir0Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_0).
void inlineSpinReconDir1Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_1).
void inlineSpinReconDir0Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_0).
Reconstruct Dir0Minus Fused.
Reconstruct Dir0Plus Fused.
Reconstruct Dir1Minus Fused.
Reconstruct Dir1Plus Fused.
Reconstruct Dir2Minus Fused.
Reconstruct Dir2Plus Fused.
Reconstruct Dir3Minus Fused.
Reconstruct Dir3Plus Fused.