QDP++
qdp_sse_fused_spin_recon_evaluates.h
Go to the documentation of this file.
1#ifndef QDP_SSE_FUSED_SPIN_RECON_EVALYATES_H
2#define QDP_SSE_FUSED_SPIN_RECON_EVALUATES_H
3
4#include "sse_mult_su3_mat_hwvec.h"
5
6
8// Threading evaluates
9//
10// by Xu Guo, EPCC, 20 October, 2008
12
13// the wrappers for the functions to be threaded
15
16namespace QDP {
17
18
19// Vec = SpinReconstructDir0Plus( u * psi);
20template<>
21inline
23 const OpAssign& op,
24 const QDPExpr<
29 >,
31 >&rhs,
32 const Subset& s)
33{
34 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
35 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
36
37 if( s.hasOrderedRep() ) {
38
39 int totalSize = s.end() - s.start() +1;
40
42
44
46 // Original code
48 /*
49
50 for( int site = s.start(); site <= s.end(); site++) {
51 HVec32 tmp ;
52
53 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
54 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
55 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
56
57 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
58
59
60 inlineSpinReconDir0Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
61 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
62 1);
63 }*/
64 }
65 else {
66 const int* tab = s.siteTable().slice();
67
68 int totalSize = s.numSiteTable();
69
71
73
75 // Original code
77 /*
78 for(int j=0; j < s.numSiteTable(); j++) {
79 int site=tab[j];
80
81 HVec32 tmp ;
82
83 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
84 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
85 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
86
87 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
88
89
90 inlineSpinReconDir0Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
91 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
92 1);
93 }*/
94 }
95}
96
97// Vec = SpinReconstructDir0Minus( u * psi);
98template<>
99inline
101 const OpAssign& op,
102 const QDPExpr<
103 BinaryNode<
107 >,
109 >&rhs,
110 const Subset& s)
111{
112 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
113 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
114
115 if( s.hasOrderedRep() ) {
116
117 int totalSize = s.end() - s.start() +1;
118
120
122
124 // Original code
126 /*
127 for(int site=s.start(); site <= s.end(); ++site) {
128 HVec32 tmp ;
129 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
130 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
131 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
132
133 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
134
135 inlineSpinReconDir0Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
136 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
137 1);
138 }*/
139 }
140 else {
141 const int* tab = s.siteTable().slice();
142
143 int totalSize = s.numSiteTable();
144
146
148
150 // Original code
152 /*
153 for(int j=0; j < s.numSiteTable(); j++) {
154 int site=tab[j];
155
156 HVec32 tmp ;
157
158 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
159 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
160 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
161
162 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
163
164 inlineSpinReconDir0Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
165 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
166 1);
167
168
169 }*/
170 }
171}
172
173
174
175
176// Vec = SpinReconstructDir1Plus( u * psi);
177template<>
178inline
180 const OpAssign& op,
181 const QDPExpr<
182 BinaryNode<
186 >,
188 >&rhs,
189 const Subset& s)
190{
191 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
192 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
193
194 if( s.hasOrderedRep() ) {
195
196 int totalSize = s.end() - s.start() +1;
197
199
201
203 // Original code
205 /*
206 for(int site=s.start(); site <= s.end(); ++site) {
207 HVec32 tmp ;
208
209 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
210 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
211 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
212
213 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
214
215
216 inlineSpinReconDir1Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
217 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
218 1);
219 }*/
220 }
221 else {
222 const int* tab = s.siteTable().slice();
223
224 int totalSize = s.numSiteTable();
225
227
229
231 // Original code
233 /*
234 for(int j=0; j < s.numSiteTable(); j++) {
235 int site=tab[j];
236
237 HVec32 tmp ;
238
239 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
240 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
241 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
242
243 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
244
245
246 inlineSpinReconDir1Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
247 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
248 1);
249
250
251 }*/
252 }
253
254}
255
256// Vec = SpinReconstructDir1Minus( u * psi);
257template<>
258inline
260 const OpAssign& op,
261 const QDPExpr<
262 BinaryNode<
266 >,
268 >&rhs,
269 const Subset& s)
270{
271 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
272 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
273
274 if( s.hasOrderedRep() ) {
275
276 int totalSize = s.end() - s.start() +1;
277
279
281
283 // Original code
285 /*
286 for(int site=s.start(); site <= s.end(); ++site) {
287 HVec32 tmp ;
288
289 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
290 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
291 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
292
293 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
294
295
296 inlineSpinReconDir1Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
297 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
298 1);
299
300 }*/
301 }
302 else {
303
304 const int* tab = s.siteTable().slice();
305
306 int totalSize = s.numSiteTable();
307
309
311
313 // Original code
315 /*
316 for(int j=0; j < s.numSiteTable(); j++) {
317 int site=tab[j];
318
319 HVec32 tmp ;
320 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
321 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
322 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
323
324
325 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
326
327
328 inlineSpinReconDir1Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
329 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
330 1);
331
332
333 }*/
334 }
335}
336
337
338
339// Vec = SpinReconstructDir2Plus( u * psi);
340template<>
341inline
343 const OpAssign& op,
344 const QDPExpr<
345 BinaryNode<
349 >,
351 >&rhs,
352 const Subset& s)
353{
354 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
355 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
356
357 if( s.hasOrderedRep() ) {
358
359 int totalSize = s.end() - s.start() +1;
360
362
364
366 // Original code
368 /*
369 for(int site=s.start(); site <= s.end(); ++site) {
370 HVec32 tmp ;
371
372 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
373 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
374 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
375
376
377 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
378
379
380 inlineSpinReconDir2Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
381 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
382 1);
383
384
385 }*/
386 }
387 else {
388
389 const int* tab = s.siteTable().slice();
390
391 int totalSize = s.numSiteTable();
392
394
396
398 // Original code
400 /*
401
402 for(int j=0; j < s.numSiteTable(); j++) {
403 int site=tab[j];
404
405 HVec32 tmp ;
406 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
407 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
408 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
409
410
411 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
412
413
414
415 inlineSpinReconDir2Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
416 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
417 1);
418
419
420 }*/
421 }
422
423}
424
425// Vec = SpinReconstructDir2Minus( u * psi);
426template<>
427inline
429 const OpAssign& op,
430 const QDPExpr<
431 BinaryNode<
435 >,
437 >&rhs,
438 const Subset& s)
439{
440 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
441 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
442
443 if( s.hasOrderedRep() ) {
444
445 int totalSize = s.end() - s.start() +1;
446
448
450
452 // Original code
454 /*
455
456 for(int site=s.start(); site <= s.end(); ++site) {
457 HVec32 tmp ;
458 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
459 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
460 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
461
462
463 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
464
465
466 inlineSpinReconDir2Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
467 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
468 1);
469
470 }*/
471 }
472 else {
473 const int* tab = s.siteTable().slice();
474
475 int totalSize = s.numSiteTable();
476
478
480
482 // Original code
484 /*
485
486 for(int j=0; j < s.numSiteTable(); j++) {
487 int site=tab[j];
488
489 HVec32 tmp ;
490
491 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
492 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
493 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
494
495
496 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
497
498 inlineSpinReconDir2Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
499 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
500 1);
501 }*/
502 }
503}
504
505
506
507// Vec = SpinReconstructDir3Plus( u * psi);
508template<>
509inline
511 const OpAssign& op,
512 const QDPExpr<
513 BinaryNode<
517 >,
519 >&rhs,
520 const Subset& s)
521{
522 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
523 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
524
525 if( s.hasOrderedRep() ) {
526
527 int totalSize = s.end() - s.start() +1;
528
530
532
534 // Original code
536 /*
537
538 for(int site=s.start(); site <= s.end(); ++site) {
539 HVec32 tmp ;
540
541 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
542 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
543 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
544
545
546 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
547
548
549 inlineSpinReconDir3Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
550 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
551 1);
552
553 }*/
554 }
555 else {
556
557 const int* tab = s.siteTable().slice();
558
559 int totalSize = s.numSiteTable();
560
562
564
566 // Original code
568 /*
569 for(int j=0; j < s.numSiteTable(); j++) {
570 int site=tab[j];
571
572 HVec32 tmp ;
573
574 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
575 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
576 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
577
578
579 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
580
581
582 inlineSpinReconDir3Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
583 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
584 1);
585 }*/
586 }
587}
588
589// Vec = SpinReconstructDir3Minus( u * psi);
590template<>
591inline
593 const OpAssign& op,
594 const QDPExpr<
595 BinaryNode<
599 >,
601 >&rhs,
602 const Subset& s)
603{
604 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
605 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
606
607 if( s.hasOrderedRep() ) {
608
609 int totalSize = s.end() - s.start() +1;
610
612
614
616 // Original code
618 /*
619
620 for(int site=s.start(); site <= s.end(); ++site) {
621 HVec32 tmp ;
622
623 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
624 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
625 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
626
627
628 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
629
630 inlineSpinReconDir3Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
631 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
632 1);
633 }*/
634 }
635 else {
636
637 const int* tab = s.siteTable().slice();
638
639 int totalSize = s.numSiteTable();
640
642
644
646 // Original code
648 /*
649
650 for(int j=0; j < s.numSiteTable(); j++) {
651 int site=tab[j];
652
653 HVec32 tmp ;
654
655 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
656 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
657 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
658
659
660 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
661
662
663
664 inlineSpinReconDir3Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
665 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
666 1);
667 }*/
668 }
669}
670
671
672
673// Vec += SpinReconstructDir0Plus( u * psi);
674template<>
675inline
677 const OpAddAssign& op,
678 const QDPExpr<
679 BinaryNode<
683 >,
685 >&rhs,
686 const Subset& s)
687{
688 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
689 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
690
691 if( s.hasOrderedRep() ) {
692
693 int totalSize = s.end() - s.start() +1;
694
696
698
700 // Original code
702 /*
703 for(int site=s.start(); site <= s.end(); ++site) {
704 HVec32 tmp ;
705
706 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
707 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
708 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
709
710
711 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
712
713 inlineAddSpinReconDir0Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
714 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
715 1);
716 }*/
717 }
718 else {
719 const int* tab = s.siteTable().slice();
720
721 int totalSize = s.numSiteTable();
722
724
726
728 // Original code
730
731 /*
732 for(int j=0; j < s.numSiteTable(); j++) {
733 int site=tab[j];
734
735 HVec32 tmp ;
736
737 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
738 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
739 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
740
741
742 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
743
744
745
746 inlineAddSpinReconDir0Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
747 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
748 1);
749
750
751 }*/
752 }
753
754}
755
756// Vec += SpinReconstructDir0Minus( u * psi);
757template<>
758inline
760 const OpAddAssign& op,
761 const QDPExpr<
762 BinaryNode<
766 >,
768 >&rhs,
769 const Subset& s)
770{
771 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
772 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
773
774 if( s.hasOrderedRep() ) {
775
776 int totalSize = s.end() - s.start() +1;
777
779
781
783 // Original code
785
786 /*
787 for(int site=s.start(); site <= s.end(); ++site) {
788 HVec32 tmp ;
789
790 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
791 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
792 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
793
794
795 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
796
797 inlineAddSpinReconDir0Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
798 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
799 1);
800 }*/
801 }
802 else {
803 const int* tab = s.siteTable().slice();
804
805 int totalSize = s.numSiteTable();
806
808
810
812 // Original code
814 /*
815 for(int j=0; j < s.numSiteTable(); j++) {
816 int site=tab[j];
817
818 HVec32 tmp ;
819
820 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
821 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
822 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
823
824
825 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
826
827
828
829 inlineAddSpinReconDir0Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
830 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
831 1);
832
833 }*/
834 }
835}
836
837
838
839// Vec += SpinReconstructDir1Plus( u * psi);
840template<>
841inline
843 const OpAddAssign& op,
844 const QDPExpr<
845 BinaryNode<
849 >,
851 >&rhs,
852 const Subset& s)
853{
854 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
855 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
856
857
858 if( s.hasOrderedRep() ) {
859
860 int totalSize = s.end() - s.start() +1;
861
863
865
867 // Original code
869 /*
870 for(int site=s.start(); site <= s.end(); ++site) {
871
872 HVec32 tmp ;
873
874 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
875 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
876 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
877
878
879 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
880
881 inlineAddSpinReconDir1Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
882 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
883 1);
884 }*/
885 }
886 else {
887 const int* tab = s.siteTable().slice();
888
889 int totalSize = s.numSiteTable();
890
892
894
896 // Original code
898 /*
899 for(int j=0; j < s.numSiteTable(); j++) {
900 int site=tab[j];
901
902 HVec32 tmp ;
903
904 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
905 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
906 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
907
908
909 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
910
911
912 inlineAddSpinReconDir1Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
913 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
914 1);
915 }*/
916 }
917}
918
919// Vec += SpinReconstructDir1Minus( u * psi);
920template<>
921inline
923 const OpAddAssign& op,
924 const QDPExpr<
925 BinaryNode<
929 >,
931 >&rhs,
932 const Subset& s)
933{
934 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
935 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
936
937 if( s.hasOrderedRep() ) {
938
939 int totalSize = s.end() - s.start() +1;
940
942
944
946 // Original code
948 /*
949 for(int site=s.start(); site <= s.end(); ++site) {
950 HVec32 tmp ;
951
952 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
953 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
954 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
955
956
957 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
958
959
960 inlineAddSpinReconDir1Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
961 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
962 1);
963 }*/
964 }
965 else {
966
967 const int* tab = s.siteTable().slice();
968
969 int totalSize = s.numSiteTable();
970
972
974
976 // Original code
978 /*
979 for(int j=0; j < s.numSiteTable(); j++) {
980 int site=tab[j];
981
982 HVec32 tmp ;
983
984 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
985 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
986 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
987
988
989 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
990
991
992 inlineAddSpinReconDir1Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
993 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
994 1);
995 }*/
996 }
997}
998
999
1000
1001// Vec += SpinReconstructDir2Plus( u * psi);
1002template<>
1003inline
1005 const OpAddAssign& op,
1006 const QDPExpr<
1007 BinaryNode<
1011 >,
1013 >&rhs,
1014 const Subset& s)
1015{
1016 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
1017 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
1018
1019 if( s.hasOrderedRep() ) {
1020
1021 int totalSize = s.end() - s.start() +1;
1022
1024
1026
1028 // Original code
1030 /*
1031 for(int site=s.start(); site <= s.end(); ++site) {
1032 HVec32 tmp ;
1033
1034 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
1035 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
1036 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
1037
1038
1039 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
1040
1041
1042 inlineAddSpinReconDir2Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
1043 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1044 1);
1045
1046 }*/
1047 }
1048 else {
1049 const int* tab = s.siteTable().slice();
1050
1051 int totalSize = s.numSiteTable();
1052
1054
1056
1058 // Original code
1060 /*
1061 for(int j=0; j < s.numSiteTable(); j++) {
1062 int site=tab[j];
1063
1064 HVec32 tmp ;
1065
1066 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
1067 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
1068 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
1069
1070
1071 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
1072
1073 inlineAddSpinReconDir2Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
1074 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1075 1);
1076
1077
1078 }*/
1079 }
1080}
1081
1082// Vec += SpinReconstructDir2Minus( u * psi);
1083template<>
1084inline
1086 const OpAddAssign& op,
1087 const QDPExpr<
1088 BinaryNode<
1092 >,
1094 >&rhs,
1095 const Subset& s)
1096{
1097 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
1098 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
1099
1100 if( s.hasOrderedRep() ) {
1101
1102 int totalSize = s.end() - s.start() +1;
1103
1105
1107
1109 // Original code
1111 /*
1112 for(int site=s.start(); site <= s.end(); ++site) {
1113
1114 HVec32 tmp ;
1115 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
1116 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
1117 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
1118
1119
1120 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
1121
1122 inlineAddSpinReconDir2Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
1123 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1124 1);
1125 }*/
1126 }
1127 else {
1128 const int* tab = s.siteTable().slice();
1129
1130 int totalSize = s.numSiteTable();
1131
1133
1135
1137 // Original code
1139
1140 /*
1141 for(int j=0; j < s.numSiteTable(); j++) {
1142 int site=tab[j];
1143
1144 HVec32 tmp ;
1145 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
1146 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
1147 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
1148
1149
1150 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
1151
1152
1153 inlineAddSpinReconDir2Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
1154 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1155 1);
1156 }*/
1157 }
1158}
1159
1160
1161
1162// Vec += SpinReconstructDir3Plus( u * psi);
1163template<>
1164inline
1166 const OpAddAssign& op,
1167 const QDPExpr<
1168 BinaryNode<
1172 >,
1174 >&rhs,
1175 const Subset& s)
1176{
1177 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
1178 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
1179
1180 if( s.hasOrderedRep() ) {
1181
1182 int totalSize = s.end() - s.start() +1;
1183
1185
1187
1189 // Original code
1191
1192 /*
1193 for(int site=s.start(); site <= s.end(); ++site) {
1194 HVec32 tmp ;
1195
1196 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
1197 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
1198 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
1199
1200
1201 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
1202
1203
1204 inlineAddSpinReconDir3Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
1205 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1206 1);
1207 }*/
1208 }
1209 else {
1210
1211 const int* tab = s.siteTable().slice();
1212
1213 int totalSize = s.numSiteTable();
1214
1216
1218
1220 // Original code
1222 /*
1223 for(int j=0; j < s.numSiteTable(); j++) {
1224 int site=tab[j];
1225
1226 HVec32 tmp ;
1227
1228
1229 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
1230 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
1231 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
1232
1233
1234 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
1235
1236 inlineAddSpinReconDir3Plus( (REAL *)&(tmp.elem(0).elem(0).real()),
1237 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1238 1);
1239
1240 }*/
1241 }
1242}
1243
1244// Vec += SpinReconstructDir3Minus( u * psi);
1245template<>
1246inline
1248 const OpAddAssign& op,
1249 const QDPExpr<
1250 BinaryNode<
1254 >,
1256 >&rhs,
1257 const Subset& s)
1258{
1259 const OLattice< SU3Mat32 >& u = static_cast< const OLattice< SU3Mat32 >& >(rhs.expression().left());
1260 const OLattice< HVec32 >& a = static_cast< const OLattice< HVec32 >& >(rhs.expression().right());
1261
1262 if( s.hasOrderedRep() ) {
1263
1264 int totalSize = s.end() - s.start() +1;
1265
1267
1269
1271 // Original code
1273 /*
1274 for(int site=s.start(); site <= s.end(); ++site) {
1275 HVec32 tmp ;
1276
1277 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
1278 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
1279 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
1280
1281
1282 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
1283
1284
1285
1286 inlineAddSpinReconDir3Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
1287 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1288 1);
1289
1290 }*/
1291 }
1292 else {
1293
1294 const int* tab = s.siteTable().slice();
1295
1296 int totalSize = s.numSiteTable();
1297
1299
1301
1303 // Original code
1305 /*
1306 for(int j=0; j < s.numSiteTable(); j++) {
1307 int site=tab[j];
1308
1309 HVec32 tmp ;
1310
1311 su3_matrixf* um = (su3_matrixf *)&(u.elem(site).elem().elem(0,0).real());
1312 half_wilson_vectorf *ah = (half_wilson_vectorf *)&( a.elem(site).elem(0).elem(0).real());
1313 half_wilson_vectorf *tmph = (half_wilson_vectorf *)&( tmp.elem(0).elem(0).real());
1314
1315
1316 intrin_sse_mult_su3_mat_hwvec(um, ah, tmph);
1317
1318 inlineAddSpinReconDir3Minus( (REAL *)&(tmp.elem(0).elem(0).real()),
1319 (REAL *)&(d.elem(site).elem(0).elem(0).real()),
1320 1);
1321 }*/
1322 }
1323}
1324
1325
1326
1327} // namespace QDP;
1328
1329
1330
1331
1332
1333#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.
void dispatch_to_threads(int numSiteTable, Arg a, void(*func)(int, int, int, Arg *))
PSpinVector< PColorVector< RComplex< REAL32 >, 3 >, 2 > HVec32
void inlineSpinReconDir0Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_0).
void inlineAddSpinReconDir1Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_1).
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).
PScalar< PColorMatrix< RComplex< REAL32 >, 3 > > SU3Mat32
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).
void ordered_sse_fused_spin_recon_evaluate_function(int lo, int hi, int myId, ordered_sse_fused_spin_recon_user_arg *arg)
void unordered_sse_fused_spin_recon_evaluate_function(int lo, int hi, int myId, unordered_sse_fused_spin_recon_user_arg *arg)
Reconstruct Dir0Minus Fused.
Reconstruct Dir0Plus Fused.
Reconstruct Dir1Minus Fused.
Reconstruct Dir1Plus Fused.
Reconstruct Dir2Minus Fused.
Reconstruct Dir2Plus Fused.
Reconstruct Dir3Minus Fused.
Reconstruct Dir3Plus Fused.