CHROMA
dslash_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Include possibly optimized Wilson dslash
4  */
5 
6 #ifndef DSLASH_W_H
7 #define DSLASH_W_H
8 
9 #include "qdp_config.h"
10 #include "chroma_config.h"
11 
12 // QDP Completely naive Dslash class
13 #include "lwldslash_w.h"
14 
15 // The QDP dslash class: QDPWilsonDslashOpt
16 // This is 'optimised' with temporaries and fused ops.
17 #include "lwldslash_qdpopt_w.h"
18 
19 
20 // The following is an ifdef lis that switches in optimised
21 // Dslash-es. Currently only optimised dslash is the SSE One;
22 #ifdef BUILD_CPP_WILSON_DSLASH
23 
24 #warning "Using New Dslashen"
25 
26 #include "lwldslash_w_cppf.h"
27 #include "lwldslash_w_cppd.h"
28 namespace Chroma {
29 
30 typedef CPPWilsonDslashF WilsonDslashF;
31 typedef CPPWilsonDslashD WilsonDslashD;
32 
33 #if BASE_PRECISION == 32
34 typedef CPPWilsonDslashF WilsonDslash;
35 #else
36 typedef CPPWilsonDslashD WilsonDslash;
37 #endif
38 
39 } // End Namespace Chroma
40 
41 
42 #elif defined BUILD_LLVM_WILSON_DSLASH
43 
44 #warning "Using LLVM Dslash"
45 
46 #include "lwldslash_llvm_w.h"
47 #include "lwldslash_w.h"
48 
49 namespace Chroma {
52 
53 #if BASE_PRECISION == 32
55 #else
57 #endif
58 }
59 
60 #elif defined(CHROMA_QPHIX_DSLASH_ENABLED)
61 #include "qphix_singleton.h"
62 #ifdef CHROMA_BUILDING_QPHIX_DSLASH
63 #warning YAY!!!
64 #include "lwldslash_w_qphix.h"
65 namespace Chroma {
66  using WilsonDslash = QPhiXWilsonDslashFloating;
67  using WilsonDslashF = QPhiXWilsonDslashF;
68  using WilsonDslashD = QPhiXWilsonDslashD;
69 }
70 #else
71 #warning BOOOO!!!!!// We aren't really building the QPhiX dslash... fallback
72 namespace Chroma {
73 
77 
78 } // end namespace Chroma
79 #endif // BUILDING_CHROMA_QPHIX_DSLASH
80 
81 #elif defined BUILD_SSE_WILSON_DSLASH
82 // The lwldslash_w_sse.h defines the SSE Dslash class
83 // The following typedef switches it in.
84 
85 # include "lwldslash_w_sse.h"
86 namespace Chroma {
87  typedef SSEWilsonDslash WilsonDslash;
88 #if BASE_PRECISION == 32
89  typedef SSEWilsonDslash WilsonDslashF;
90 
91  // original code:
92  // typedef QDPWilsonDslashOptD WilsonDslashD
93  // disabled for now until spin optimizations restored in QDP++
95 #else
96  typedef SSEWilsonDslash WilsonDslashD;
98 #endif
99 
100 } // end namespace Chroma
101 
102 // Many #elif clauses could come in here for other opotimised Dslash-es
103 #elif defined BUILD_PAB_WILSON_DSLASH
104 # include "lwldslash_w_pab.h"
105 namespace Chroma {
106 
107  // Assume a DP build
108  typedef PABWilsonDslash WilsonDslash;
109 
110  // I should set up both a single and a double prec PAB dslash?
112 
113 #ifndef CHROMA_USE_SLOPPY_BAGEL_DSLASH
114  // IF we are NOT Sloppy the PABWilsonDslash is the DP guy
115  typedef PABWilsonDslash WilsonDslashD;
116 #else
117  // If the Dsalsh is SLoppy it is a single prec dslash but
118  // with a double prec exterior... so we fall back to QDP
119  // Dslash for the true double
121 #endif
122 
123 
124 } // end namespace Chroma
125 
126 #else
127 
128 // Bottom line, if no optimised Dslash-s exist then the naive QDP Dslash
129 // becomes the WilsonDslash
130 namespace Chroma {
131 
135 
136 } // end namespace Chroma
137 #endif
138 
139 
140 // 3D Dslashes
141 // These guards make sure 3D is only ever considered in the right situations
142 #include "qdp_config.h"
143 #if QDP_NS==4
144 #if QDP_NC==3
145 #if QDP_ND==4
146 
147 #include "lwldslash_3d_qdp_w.h"
148 #ifdef BUILD_SSE_WILSON_DSLASH
149 #include "lwldslash_3d_sse_w.h"
150 
151 // For now this is the naive Wilson Dslash but
152 // I put in this clause because
153 namespace Chroma {
154 typedef SSEWilsonDslash3D WilsonDslash3D;
155 }
156 
157 #else
158 
159 // Bottom line, if no optimised 3d Dslash-s exist then the naive QDP Dslash3D
160 // becomes the WilsonDslash
161 namespace Chroma {
162 typedef QDPWilsonDslash3D WilsonDslash3D;
163 } // end namespace Chroma
164 #endif
165 
166 
167 #endif
168 #endif
169 #endif
170 
171 
172 #endif
General Wilson-Dirac dslash.
Definition: lwldslash_w.h:48
Wilson Dslash linear operator.
Wilson Dslash linear operator.
Wilson Dslash linear operator.
Wilson Dslash linear operator.
Wilson Dslash linear operator.
Wilson Dslash linear operator.
Wilson Dslash linear operator.
Wilson Dslash linear operator.
Wilson Dslash linear operator.
Wilson Dslash linear operator.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
QDPWilsonDslash WilsonDslash
Definition: dslash_w.h:132
QDPWilsonDslashT< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > QDPWilsonDslash
Definition: lwldslash_w.h:307
QDPWilsonDslashF WilsonDslashF
Definition: dslash_w.h:133
QDPWilsonDslashT< LatticeFermionD, multi1d< LatticeColorMatrixD >, multi1d< LatticeColorMatrixD > > QDPWilsonDslashD
Definition: lwldslash_w.h:316
LLVMWilsonDslashT< LatticeFermionD, multi1d< LatticeColorMatrixD >, multi1d< LatticeColorMatrixD > > LLVMWilsonDslashD
QDPWilsonDslashT< LatticeFermionF, multi1d< LatticeColorMatrixF >, multi1d< LatticeColorMatrixF > > QDPWilsonDslashF
Definition: lwldslash_w.h:312
QDPWilsonDslashD WilsonDslashD
Definition: dslash_w.h:134
Fermion action factories.