QDP++
sse_fused_spin_recon.h
Go to the documentation of this file.
1#ifndef SSE_FUSED_SPIN_RECON_H
2#define SSE_FUSED_SPIN_RECON_H
3
4#include "sse_mult_su3_mat_hwvec.h"
5
6namespace QDP {
7
8// Convenience Types
13
14
15// Tell the compiler what the result of the multiply
16// half spinor with gauge field operations are
17// OScalar
18template<>
25
26// Tell the compiler what the result of opreations are
27// For OLattice
28template<>
35
40{
42
43 template<class T1, class T2, int N>
45 operator()(const PScalar<T1>& a, const PSpinVector<T2,N>& b) const
46 {
47 return sreconDir0Minus(a, b);
48 }
49};
50
51
52// Proclaim that the return type of the fused op is the same as the return type
53// of the SpinReconstruction on a normal half vector
54template<class T1, class T2, int N>
55struct BinaryReturn< PScalar<T1>, PSpinVector<T2, N>, FnSReconDir0MinusProd>
56{
58};
59
60// For Generic Subtypes of OLattice<> and OScalar<>
61// Do the generic thing
62template<class T1, class T2, int N>
66 tmp=a*b;
68 ret = spinReconstructDir0Minus(tmp);
69 return ret;
70}
71
72// This rewrites spinReconstructDir0Minus( Matrix * Vec )
73// as a fused reconstruct: FnSReconDir0MinusProd< Matrix, Vec >
74template<class T1, class T2, template<class> class C, int N >
75inline typename MakeReturn<BinaryNode< FnSReconDir0MinusProd,
76 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
79spinReconstructDir0Minus(const QDPExpr<
81 Reference< QDPType< PScalar<T1> , C<PScalar<T1> > > >,
82 Reference< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >
83 >,
84 typename BinaryReturn< QDPType< PScalar<T1> , C<PScalar<T1> > >,
85 QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > >,
86 OpMultiply >::Type_t >& l)
87{
88
89
90 typedef BinaryNode< FnSReconDir0MinusProd,
91 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
92 typename CreateLeaf< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >::Leaf_t> Tree_t;
93
94
96 Tree_t(
97 CreateLeaf<QDPType<PScalar<T1> ,C<PScalar<T1> > > >::make(l.expression().left()),
98 CreateLeaf<QDPType<PSpinVector<T2,N>,C<PSpinVector<T2,N> > > >::make(l.expression().right())
99 )
100 );
101
102
103}
104
109{
110 PETE_EMPTY_CONSTRUCTORS(FnSReconDir0PlusProd)
111
112 template<class T1, class T2, int N>
113 inline typename BinaryReturn<PScalar<T1>, PSpinVector<T2,N>, FnSReconDir0PlusProd>::Type_t
114 operator()(const PScalar<T1>& a, const PSpinVector<T2,N>& b) const
115 {
116 return sreconDir0Plus(a, b);
117 }
118};
119
120
121// Proclaim that the return type of the fused op is the same as the return type
122// of the SpinReconstruction on a normal half vector
123template<class T1, class T2, int N>
124struct BinaryReturn< PScalar<T1>, PSpinVector<T2, N>, FnSReconDir0PlusProd>
125{
127};
128
129// For Generic Subtypes of OLattice<> and OScalar<>
130// Do the generic thing
131template<class T1, class T2, int N>
133sreconDir0Plus(const PScalar<T1>& a, const PSpinVector<T2,N>& b) {
135 tmp=a*b;
137 ret = spinReconstructDir0Plus(tmp);
138 return ret;
139}
140
141// This rewrites spinReconstructDir0Plus( Matrix * Vec )
142// as a fused reconstruct: FnSReconDir0PlusProd< Matrix, Vec >
143template<class T1, class T2, template<class> class C, int N >
144inline typename MakeReturn<BinaryNode< FnSReconDir0PlusProd,
145 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
148spinReconstructDir0Plus(const QDPExpr<
150 Reference< QDPType< PScalar<T1> , C<PScalar<T1> > > >,
151 Reference< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >
152 >,
153 typename BinaryReturn< QDPType< PScalar<T1> , C<PScalar<T1> > >,
154 QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > >,
155 OpMultiply >::Type_t >& l)
156{
157
158
159 typedef BinaryNode< FnSReconDir0PlusProd,
160 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
161 typename CreateLeaf< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >::Leaf_t> Tree_t;
162
163
165 Tree_t(
166 CreateLeaf<QDPType<PScalar<T1> ,C<PScalar<T1> > > >::make(l.expression().left()),
167 CreateLeaf<QDPType<PSpinVector<T2,N>,C<PSpinVector<T2,N> > > >::make(l.expression().right())
168 )
169 );
170
171
172}
173
178{
179 PETE_EMPTY_CONSTRUCTORS(FnSReconDir1MinusProd)
180
181 template<class T1, class T2, int N>
182 inline typename BinaryReturn<PScalar<T1>, PSpinVector<T2,N>, FnSReconDir1MinusProd>::Type_t
183 operator()(const PScalar<T1>& a, const PSpinVector<T2,N>& b) const
184 {
185 return sreconDir1Minus(a, b);
186 }
187};
188
189
190// Proclaim that the return type of the fused op is the same as the return type
191// of the SpinReconstruction on a normal half vector
192template<class T1, class T2, int N>
193struct BinaryReturn< PScalar<T1>, PSpinVector<T2, N>, FnSReconDir1MinusProd>
194{
196};
197
198// For Generic Subtypes of OLattice<> and OScalar<>
199// Do the generic thing
200template<class T1, class T2, int N>
204 tmp=a*b;
206 ret = spinReconstructDir1Minus(tmp);
207 return ret;
208}
209
210// This rewrites spinReconstructDir1Minus( Matrix * Vec )
211// as a fused reconstruct: FnSReconDir1MinusProd< Matrix, Vec >
212template<class T1, class T2, template<class> class C, int N >
213inline typename MakeReturn<BinaryNode< FnSReconDir1MinusProd,
214 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
216 typename BinaryReturn< C<PScalar<T1> >, C<PSpinVector<T2,N> >, FnSReconDir1MinusProd>::Type_t >::Expression_t
217spinReconstructDir1Minus(const QDPExpr<
219 Reference< QDPType< PScalar<T1> , C<PScalar<T1> > > >,
220 Reference< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >
221 >,
222 typename BinaryReturn< QDPType< PScalar<T1> , C<PScalar<T1> > >,
223 QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > >,
224 OpMultiply >::Type_t >& l)
225{
226
227
228 typedef BinaryNode< FnSReconDir1MinusProd,
229 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
230 typename CreateLeaf< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >::Leaf_t> Tree_t;
231
232
234 Tree_t(
235 CreateLeaf<QDPType<PScalar<T1> ,C<PScalar<T1> > > >::make(l.expression().left()),
236 CreateLeaf<QDPType<PSpinVector<T2,N>,C<PSpinVector<T2,N> > > >::make(l.expression().right())
237 )
238 );
239
240
241}
242
247{
248 PETE_EMPTY_CONSTRUCTORS(FnSReconDir1PlusProd)
249
250 template<class T1, class T2, int N>
251 inline typename BinaryReturn<PScalar<T1>, PSpinVector<T2,N>, FnSReconDir1PlusProd>::Type_t
252 operator()(const PScalar<T1>& a, const PSpinVector<T2,N>& b) const
253 {
254 return sreconDir1Plus(a, b);
255 }
256};
257
258
259// Proclaim that the return type of the fused op is the same as the return type
260// of the SpinReconstruction on a normal half vector
261template<class T1, class T2, int N>
262struct BinaryReturn< PScalar<T1>, PSpinVector<T2, N>, FnSReconDir1PlusProd>
263{
265};
266
267// For Generic Subtypes of OLattice<> and OScalar<>
268// Do the generic thing
269template<class T1, class T2, int N>
271sreconDir1Plus(const PScalar<T1>& a, const PSpinVector<T2,N>& b) {
273 tmp=a*b;
275 ret = spinReconstructDir1Plus(tmp);
276 return ret;
277}
278
279// This rewrites spinReconstructDir1Plus( Matrix * Vec )
280// as a fused reconstruct: FnSReconDir1PlusProd< Matrix, Vec >
281template<class T1, class T2, template<class> class C, int N >
282inline typename MakeReturn<BinaryNode< FnSReconDir1PlusProd,
283 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
286spinReconstructDir1Plus(const QDPExpr<
288 Reference< QDPType< PScalar<T1> , C<PScalar<T1> > > >,
289 Reference< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >
290 >,
291 typename BinaryReturn< QDPType< PScalar<T1> , C<PScalar<T1> > >,
292 QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > >,
293 OpMultiply >::Type_t >& l)
294{
295
296
297 typedef BinaryNode< FnSReconDir1PlusProd,
298 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
299 typename CreateLeaf< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >::Leaf_t> Tree_t;
300
301
303 Tree_t(
304 CreateLeaf<QDPType<PScalar<T1> ,C<PScalar<T1> > > >::make(l.expression().left()),
305 CreateLeaf<QDPType<PSpinVector<T2,N>,C<PSpinVector<T2,N> > > >::make(l.expression().right())
306 )
307 );
308
309
310}
311
312
317{
318 PETE_EMPTY_CONSTRUCTORS(FnSReconDir2MinusProd)
319
320 template<class T1, class T2, int N>
321 inline typename BinaryReturn<PScalar<T1>, PSpinVector<T2,N>, FnSReconDir2MinusProd>::Type_t
322 operator()(const PScalar<T1>& a, const PSpinVector<T2,N>& b) const
323 {
324 return sreconDir2Minus(a, b);
325 }
326};
327
328
329// Proclaim that the return type of the fused op is the same as the return type
330// of the SpinReconstruction on a normal half vector
331template<class T1, class T2, int N>
332struct BinaryReturn< PScalar<T1>, PSpinVector<T2, N>, FnSReconDir2MinusProd>
333{
335};
336
337// For Generic Subtypes of OLattice<> and OScalar<>
338// Do the generic thing
339template<class T1, class T2, int N>
343 tmp=a*b;
345 ret = spinReconstructDir2Minus(tmp);
346 return ret;
347}
348
349// This rewrites spinReconstructDir2Minus( Matrix * Vec )
350// as a fused reconstruct: FnSReconDir2MinusProd< Matrix, Vec >
351template<class T1, class T2, template<class> class C, int N >
352inline typename MakeReturn<BinaryNode< FnSReconDir2MinusProd,
353 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
355 typename BinaryReturn< C<PScalar<T1> >, C<PSpinVector<T2,N> >, FnSReconDir2MinusProd>::Type_t >::Expression_t
356spinReconstructDir2Minus(const QDPExpr<
358 Reference< QDPType< PScalar<T1> , C<PScalar<T1> > > >,
359 Reference< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >
360 >,
361 typename BinaryReturn< QDPType< PScalar<T1> , C<PScalar<T1> > >,
362 QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > >,
363 OpMultiply >::Type_t >& l)
364{
365
366
367 typedef BinaryNode< FnSReconDir2MinusProd,
368 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
369 typename CreateLeaf< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >::Leaf_t> Tree_t;
370
371
373 Tree_t(
374 CreateLeaf<QDPType<PScalar<T1> ,C<PScalar<T1> > > >::make(l.expression().left()),
375 CreateLeaf<QDPType<PSpinVector<T2,N>,C<PSpinVector<T2,N> > > >::make(l.expression().right())
376 )
377 );
378
379
380}
381
386{
387 PETE_EMPTY_CONSTRUCTORS(FnSReconDir2PlusProd)
388
389 template<class T1, class T2, int N>
390 inline typename BinaryReturn<PScalar<T1>, PSpinVector<T2,N>, FnSReconDir2PlusProd>::Type_t
391 operator()(const PScalar<T1>& a, const PSpinVector<T2,N>& b) const
392 {
393 return sreconDir2Plus(a, b);
394 }
395};
396
397
398// Proclaim that the return type of the fused op is the same as the return type
399// of the SpinReconstruction on a normal half vector
400template<class T1, class T2, int N>
401struct BinaryReturn< PScalar<T1>, PSpinVector<T2, N>, FnSReconDir2PlusProd>
402{
404};
405
406// For Generic Subtypes of OLattice<> and OScalar<>
407// Do the generic thing
408template<class T1, class T2, int N>
410sreconDir2Plus(const PScalar<T1>& a, const PSpinVector<T2,N>& b) {
412 tmp=a*b;
414 ret = spinReconstructDir2Plus(tmp);
415 return ret;
416}
417
418// This rewrites spinReconstructDir2Plus( Matrix * Vec )
419// as a fused reconstruct: FnSReconDir2PlusProd< Matrix, Vec >
420template<class T1, class T2, template<class> class C, int N >
421inline typename MakeReturn<BinaryNode< FnSReconDir2PlusProd,
422 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
425spinReconstructDir2Plus(const QDPExpr<
427 Reference< QDPType< PScalar<T1> , C<PScalar<T1> > > >,
428 Reference< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >
429 >,
430 typename BinaryReturn< QDPType< PScalar<T1> , C<PScalar<T1> > >,
431 QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > >,
432 OpMultiply >::Type_t >& l)
433{
434
435
436 typedef BinaryNode< FnSReconDir2PlusProd,
437 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
438 typename CreateLeaf< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >::Leaf_t> Tree_t;
439
440
442 Tree_t(
443 CreateLeaf<QDPType<PScalar<T1> ,C<PScalar<T1> > > >::make(l.expression().left()),
444 CreateLeaf<QDPType<PSpinVector<T2,N>,C<PSpinVector<T2,N> > > >::make(l.expression().right())
445 )
446 );
447
448
449}
450
451
456{
457 PETE_EMPTY_CONSTRUCTORS(FnSReconDir3MinusProd)
458
459 template<class T1, class T2, int N>
460 inline typename BinaryReturn<PScalar<T1>, PSpinVector<T2,N>, FnSReconDir3MinusProd>::Type_t
461 operator()(const PScalar<T1>& a, const PSpinVector<T2,N>& b) const
462 {
463 return sreconDir3Minus(a, b);
464 }
465};
466
467
468// Proclaim that the return type of the fused op is the same as the return type
469// of the SpinReconstruction on a normal half vector
470template<class T1, class T2, int N>
471struct BinaryReturn< PScalar<T1>, PSpinVector<T2, N>, FnSReconDir3MinusProd>
472{
474};
475
476// For Generic Subtypes of OLattice<> and OScalar<>
477// Do the generic thing
478template<class T1, class T2, int N>
482 tmp=a*b;
484 ret = spinReconstructDir3Minus(tmp);
485 return ret;
486}
487
488// This rewrites spinReconstructDir3Minus( Matrix * Vec )
489// as a fused reconstruct: FnSReconDir3MinusProd< Matrix, Vec >
490template<class T1, class T2, template<class> class C, int N >
491inline typename MakeReturn<BinaryNode< FnSReconDir3MinusProd,
492 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
494 typename BinaryReturn< C<PScalar<T1> >, C<PSpinVector<T2,N> >, FnSReconDir3MinusProd>::Type_t >::Expression_t
495spinReconstructDir3Minus(const QDPExpr<
497 Reference< QDPType< PScalar<T1> , C<PScalar<T1> > > >,
498 Reference< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >
499 >,
500 typename BinaryReturn< QDPType< PScalar<T1> , C<PScalar<T1> > >,
501 QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > >,
502 OpMultiply >::Type_t >& l)
503{
504
505
506 typedef BinaryNode< FnSReconDir3MinusProd,
507 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
508 typename CreateLeaf< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >::Leaf_t> Tree_t;
509
511 Tree_t(
512 CreateLeaf<QDPType<PScalar<T1> ,C<PScalar<T1> > > >::make(l.expression().left()),
513 CreateLeaf<QDPType<PSpinVector<T2,N>,C<PSpinVector<T2,N> > > >::make(l.expression().right())
514 )
515 );
516
517
518}
519
524{
525 PETE_EMPTY_CONSTRUCTORS(FnSReconDir3PlusProd)
526
527 template<class T1, class T2, int N>
528 inline typename BinaryReturn<PScalar<T1>, PSpinVector<T2,N>, FnSReconDir3PlusProd>::Type_t
529 operator()(const PScalar<T1>& a, const PSpinVector<T2,N>& b) const
530 {
531 return sreconDir3Plus(a, b);
532 }
533};
534
535
536// Proclaim that the return type of the fused op is the same as the return type
537// of the SpinReconstruction on a normal half vector
538template<class T1, class T2, int N>
539struct BinaryReturn< PScalar<T1>, PSpinVector<T2, N>, FnSReconDir3PlusProd>
540{
542};
543
544// For Generic Subtypes of OLattice<> and OScalar<>
545// Do the generic thing
546template<class T1, class T2, int N>
548sreconDir3Plus(const PScalar<T1>& a, const PSpinVector<T2,N>& b) {
550 tmp=a*b;
552 ret = spinReconstructDir3Plus(tmp);
553 return ret;
554}
555
556// This rewrites spinReconstructDir3Plus( Matrix * Vec )
557// as a fused reconstruct: FnSReconDir3PlusProd< Matrix, Vec >
558template<class T1, class T2, template<class> class C, int N >
559inline typename MakeReturn<BinaryNode< FnSReconDir3PlusProd,
560 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
563spinReconstructDir3Plus(const QDPExpr<
565 Reference< QDPType< PScalar<T1> , C<PScalar<T1> > > >,
566 Reference< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >
567 >,
568 typename BinaryReturn< QDPType< PScalar<T1> , C<PScalar<T1> > >,
569 QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > >,
570 OpMultiply >::Type_t >& l)
571{
572
573
574 typedef BinaryNode< FnSReconDir3PlusProd,
575 typename CreateLeaf< QDPType< PScalar<T1> , C<PScalar<T1> > > >::Leaf_t,
576 typename CreateLeaf< QDPType< PSpinVector<T2,N>, C<PSpinVector<T2,N> > > >::Leaf_t> Tree_t;
577
579 Tree_t(
580 CreateLeaf<QDPType<PScalar<T1> ,C<PScalar<T1> > > >::make(l.expression().left()),
581 CreateLeaf<QDPType<PSpinVector<T2,N>,C<PSpinVector<T2,N> > > >::make(l.expression().right())
582 )
583 );
584
585
586}
587
588
589
593
594// The actual fused op - Replace this with specialist code
595template<>
598{
601
602 su3_matrixf *am = (su3_matrixf *)&( a.elem().elem(0,0).real());
603 half_wilson_vectorf *bh = (half_wilson_vectorf *)&( b.elem(0).elem(0).real());
604 half_wilson_vectorf *dh = (half_wilson_vectorf *)&( d.elem(0).elem(0).real());
605
606 intrin_sse_mult_su3_mat_hwvec(am,bh,dh);
607
608 inlineSpinReconDir0Minus(&(d.elem(0).elem(0).real()),
609 &(ret.elem(0).elem(0).real()),
610 1);
611
612 return ret;
613}
614
615
616// The actual fused op - Replace this with specialist code
617template<>
618inline BinaryReturn< PScalar<ColMat32>, PSpinVector<ColVec32,2>, FnSReconDir0PlusProd>::Type_t
620{
623
624 su3_matrixf *am = (su3_matrixf *)&( a.elem().elem(0,0).real());
625 half_wilson_vectorf *bh = (half_wilson_vectorf *)&( b.elem(0).elem(0).real());
626 half_wilson_vectorf *dh = (half_wilson_vectorf *)&( d.elem(0).elem(0).real());
627
628 intrin_sse_mult_su3_mat_hwvec(am,bh,dh);
629
630 inlineSpinReconDir0Plus(&(d.elem(0).elem(0).real()),
631 &(ret.elem(0).elem(0).real()),
632 1);
633
634
635 return ret;
636}
637
638// The actual fused op - Replace this with specialist code
639template<>
640inline BinaryReturn< PScalar<ColMat32>, PSpinVector<ColVec32,2>, FnSReconDir1MinusProd>::Type_t
642{
645
646 su3_matrixf *am = (su3_matrixf *)&( a.elem().elem(0,0).real());
647 half_wilson_vectorf *bh = (half_wilson_vectorf *)&( b.elem(0).elem(0).real());
648 half_wilson_vectorf *dh = (half_wilson_vectorf *)&( d.elem(0).elem(0).real());
649
650 intrin_sse_mult_su3_mat_hwvec(am,bh,dh);
651
652 inlineSpinReconDir1Minus(&(d.elem(0).elem(0).real()),
653 &(ret.elem(0).elem(0).real()),
654 1);
655
656 return ret;
657}
658
659// The actual fused op - Replace this with specialist code
660template<>
661inline BinaryReturn< PScalar<ColMat32>, PSpinVector<ColVec32,2>, FnSReconDir1PlusProd>::Type_t
663{
666
667 su3_matrixf *am = (su3_matrixf *)&( a.elem().elem(0,0).real());
668 half_wilson_vectorf *bh = (half_wilson_vectorf *)&( b.elem(0).elem(0).real());
669 half_wilson_vectorf *dh = (half_wilson_vectorf *)&( d.elem(0).elem(0).real());
670
671 intrin_sse_mult_su3_mat_hwvec(am,bh,dh);
672
673
674 inlineSpinReconDir1Plus(&(d.elem(0).elem(0).real()),
675 &(ret.elem(0).elem(0).real()),
676 1);
677
678 return ret;
679}
680
681// The actual fused op - Replace this with specialist code
682template<>
683inline BinaryReturn< PScalar<ColMat32>, PSpinVector<ColVec32,2>, FnSReconDir2MinusProd>::Type_t
685{
688
689 su3_matrixf *am = (su3_matrixf *)&( a.elem().elem(0,0).real());
690 half_wilson_vectorf *bh = (half_wilson_vectorf *)&( b.elem(0).elem(0).real());
691 half_wilson_vectorf *dh = (half_wilson_vectorf *)&( d.elem(0).elem(0).real());
692
693 intrin_sse_mult_su3_mat_hwvec(am,bh,dh);
694
695 inlineSpinReconDir2Minus(&(d.elem(0).elem(0).real()),
696 &(ret.elem(0).elem(0).real()),
697 1);
698
699 return ret;
700}
701
702// The actual fused op - Replace this with specialist code
703template<>
704inline BinaryReturn< PScalar<ColMat32>, PSpinVector<ColVec32,2>, FnSReconDir2PlusProd>::Type_t
706{
709
710 su3_matrixf *am = (su3_matrixf *)&( a.elem().elem(0,0).real());
711 half_wilson_vectorf *bh = (half_wilson_vectorf *)&( b.elem(0).elem(0).real());
712 half_wilson_vectorf *dh = (half_wilson_vectorf *)&( d.elem(0).elem(0).real());
713
714 intrin_sse_mult_su3_mat_hwvec(am,bh,dh);
715
716 inlineSpinReconDir2Plus(&(d.elem(0).elem(0).real()),
717 &(ret.elem(0).elem(0).real()),
718 1);
719
720 return ret;
721
722}
723
724// The actual fused op - Replace this with specialist code
725template<>
726inline BinaryReturn< PScalar<ColMat32>, PSpinVector<ColVec32,2>, FnSReconDir3MinusProd>::Type_t
728{
731
732 su3_matrixf *am = (su3_matrixf *)&( a.elem().elem(0,0).real());
733 half_wilson_vectorf *bh = (half_wilson_vectorf *)&( b.elem(0).elem(0).real());
734 half_wilson_vectorf *dh = (half_wilson_vectorf *)&( d.elem(0).elem(0).real());
735
736 intrin_sse_mult_su3_mat_hwvec(am,bh,dh);
737
738 inlineSpinReconDir3Minus(&(d.elem(0).elem(0).real()),
739 &(ret.elem(0).elem(0).real()),
740 1);
741
742 return ret;
743}
744
745
746// The actual fused op - Replace this with specialist code
747template<>
748inline BinaryReturn< PScalar<ColMat32>, PSpinVector<ColVec32,2>, FnSReconDir3PlusProd>::Type_t
750{
753
754 su3_matrixf *am = (su3_matrixf *)&( a.elem().elem(0,0).real());
755 half_wilson_vectorf *bh = (half_wilson_vectorf *)&( b.elem(0).elem(0).real());
756 half_wilson_vectorf *dh = (half_wilson_vectorf *)&( d.elem(0).elem(0).real());
757
758 intrin_sse_mult_su3_mat_hwvec(am,bh,dh);
759
760 inlineSpinReconDir3Plus(&(d.elem(0).elem(0).real()),
761 &(ret.elem(0).elem(0).real()),
762 1);
763
764 return ret;
765}
766
767
768} // namespace QDP
769
770#endif
#define PETE_EMPTY_CONSTRUCTORS(CLASS)
Definition PETE.h:58
Outer grid Lattice type.
Definition qdp_outer.h:264
Outer grid Scalar class *‍/.
Definition qdp_outer.h:37
Primitive color Matrix class.
Primitive color Vector class.
Primitive Scalar.
Primitive spin Vector class.
QDPType - major type class/container for all QDP objects.
Definition qdp_qdptype.h:29
Yet another random number generator.
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir2PlusProd >::Type_t sreconDir2Plus(const PScalar< T1 > &a, const PSpinVector< T2, N > &b)
void inlineSpinReconDir0Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_0).
PSpinVector< ColVec32, 2 > Spin2_32
PColorMatrix< RComplex< REAL32 >, 3 > ColMat32
MakeReturn< UnaryNode< FnSpinReconstructDir2Minus, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnSpinReconstructDir2Minus >::Type_t >::Expression_t spinReconstructDir2Minus(const QDPExpr< T1, C1 > &l)
Definition qdp.h:5232
void inlineSpinReconDir2Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma_2).
MakeReturn< UnaryNode< FnSpinReconstructDir2Plus, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnSpinReconstructDir2Plus >::Type_t >::Expression_t spinReconstructDir2Plus(const QDPExpr< T1, C1 > &l)
Definition qdp.h:5180
void inlineSpinReconDir1Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_1).
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir3PlusProd >::Type_t sreconDir3Plus(const PScalar< T1 > &a, const PSpinVector< T2, N > &b)
MakeReturn< UnaryNode< FnSpinReconstructDir0Plus, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnSpinReconstructDir0Plus >::Type_t >::Expression_t spinReconstructDir0Plus(const QDPExpr< T1, C1 > &l)
Definition qdp.h:5154
PColorVector< RComplex< REAL32 >, 3 > ColVec32
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir0MinusProd >::Type_t sreconDir0Minus(const PScalar< T1 > &a, const PSpinVector< T2, N > &b)
MakeReturn< UnaryNode< FnSpinReconstructDir1Plus, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnSpinReconstructDir1Plus >::Type_t >::Expression_t spinReconstructDir1Plus(const QDPExpr< T1, C1 > &l)
Definition qdp.h:5167
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir3MinusProd >::Type_t sreconDir3Minus(const PScalar< T1 > &a, const PSpinVector< T2, N > &b)
MakeReturn< UnaryNode< FnSpinReconstructDir1Minus, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnSpinReconstructDir1Minus >::Type_t >::Expression_t spinReconstructDir1Minus(const QDPExpr< T1, C1 > &l)
Definition qdp.h:5219
PSpinVector< ColVec32, 4 > Spin4_32
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir1PlusProd >::Type_t sreconDir1Plus(const PScalar< T1 > &a, const PSpinVector< T2, N > &b)
void inlineSpinReconDir2Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma_2).
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir0PlusProd >::Type_t sreconDir0Plus(const PScalar< T1 > &a, const PSpinVector< T2, N > &b)
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir1MinusProd >::Type_t sreconDir1Minus(const PScalar< T1 > &a, const PSpinVector< T2, N > &b)
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir2MinusProd >::Type_t sreconDir2Minus(const PScalar< T1 > &a, const PSpinVector< T2, N > &b)
MakeReturn< UnaryNode< FnSpinReconstructDir3Minus, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnSpinReconstructDir3Minus >::Type_t >::Expression_t spinReconstructDir3Minus(const QDPExpr< T1, C1 > &l)
Definition qdp.h:5245
void inlineSpinReconDir3Minus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1-\gamma3).
void inlineSpinReconDir3Plus(const REAL *src, REAL *dst, unsigned int n_vec)
Spin recon (1/2)(1+\gamma3).
MakeReturn< UnaryNode< FnSpinReconstructDir0Minus, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnSpinReconstructDir0Minus >::Type_t >::Expression_t spinReconstructDir0Minus(const QDPExpr< T1, C1 > &l)
Definition qdp.h:5206
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).
MakeReturn< UnaryNode< FnSpinReconstructDir3Plus, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnSpinReconstructDir3Plus >::Type_t >::Expression_t spinReconstructDir3Plus(const QDPExpr< T1, C1 > &l)
Definition qdp.h:5193
OLattice< PScalar< PColorMatrix< RComplexFloat, 3 > > > C
UnaryReturn< PSpinVector< T2, N >, FnSpinReconstructDir0Minus >::Type_t Type_t
UnaryReturn< PSpinVector< T2, N >, FnSpinReconstructDir0Plus >::Type_t Type_t
UnaryReturn< PSpinVector< T2, N >, FnSpinReconstructDir1Minus >::Type_t Type_t
UnaryReturn< PSpinVector< T2, N >, FnSpinReconstructDir1Plus >::Type_t Type_t
UnaryReturn< PSpinVector< T2, N >, FnSpinReconstructDir2Minus >::Type_t Type_t
UnaryReturn< PSpinVector< T2, N >, FnSpinReconstructDir2Plus >::Type_t Type_t
UnaryReturn< PSpinVector< T2, N >, FnSpinReconstructDir3Minus >::Type_t Type_t
UnaryReturn< PSpinVector< T2, N >, FnSpinReconstructDir3Plus >::Type_t Type_t
Reconstruct Dir0Minus Fused.
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir0MinusProd >::Type_t operator()(const PScalar< T1 > &a, const PSpinVector< T2, N > &b) const
Reconstruct Dir0Plus Fused.
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir0PlusProd >::Type_t operator()(const PScalar< T1 > &a, const PSpinVector< T2, N > &b) const
Reconstruct Dir1Minus Fused.
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir1MinusProd >::Type_t operator()(const PScalar< T1 > &a, const PSpinVector< T2, N > &b) const
Reconstruct Dir1Plus Fused.
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir1PlusProd >::Type_t operator()(const PScalar< T1 > &a, const PSpinVector< T2, N > &b) const
Reconstruct Dir2Minus Fused.
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir2MinusProd >::Type_t operator()(const PScalar< T1 > &a, const PSpinVector< T2, N > &b) const
Reconstruct Dir2Plus Fused.
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir2PlusProd >::Type_t operator()(const PScalar< T1 > &a, const PSpinVector< T2, N > &b) const
Reconstruct Dir3Minus Fused.
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir3MinusProd >::Type_t operator()(const PScalar< T1 > &a, const PSpinVector< T2, N > &b) const
Reconstruct Dir3Plus Fused.
BinaryReturn< PScalar< T1 >, PSpinVector< T2, N >, FnSReconDir3PlusProd >::Type_t operator()(const PScalar< T1 > &a, const PSpinVector< T2, N > &b) const