QDP++
qdp_scalarvecsite_sse.cc
Go to the documentation of this file.
1
7
8
9#include "qdp.h"
10
11// These SSE asm instructions are only supported under GCC/G++
12#if defined(__GNUC__) && __GNUC_MINOR__ >= 2 && QDP_USE_SSE == 1
13
14namespace QDP {
15
16// Specialization to optimize the case
17// LatticeColorMatrix[Subset] = LatticeColorMatrix * LatticeColorMatrix
18template<>
20 const OpAssign& op,
27 const Subset& s)
28{
29// cout << "call single site QDP_M_eq_M_times_M" << std::endl;
30
32
33 const C& l = static_cast<const C&>(rhs.expression().left());
34 const C& r = static_cast<const C&>(rhs.expression().right());
35
36 if( s.hasOrderedRep()) {
37 const int istart = s.start() >> INNER_LOG;
38 const int iend = s.end() >> INNER_LOG;
39
40 for(int i=istart; i <= iend; ++i)
41 {
42 float *dd = (float*)&(d.elem(i).elem());
43 float *ll = (float*)&(l.elem(i).elem());
44 float *rr = (float*)&(r.elem(i).elem());
45
49 }
50 }
51 else {
52 // Do unoptimised - hope this still workl
53 const int *tab = s.siteTable().slice();
54 for(int j=0; j < s.numSiteTable(); j++) {
55 i = tab[j];
56 d.elem(i).elem() = l.elem(i).elem() * r.elem(i).elem();
57 }
58 }
59
60}
61
62} // namespace QDP;
63
64#endif // defined(__GNUC__)
Outer grid Lattice type.
Definition qdp_outer.h:264
Primitive color Matrix class.
Primitive Scalar.
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
#define INNER_LOG
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)
OLattice< PScalar< PColorMatrix< RComplexFloat, 3 > > > C
Yet another random number generator.
Primary include file for QDP.
#define _inline_ssevec_mult_su3_nn(cc, aa, bb, j)