7 #include "cpp_dslash.h"
8 #include "cpp_dslash_qdp_packer.h"
12 using namespace CPlusPlusWilsonDslash;
21 QDPIO::cout <<
"Calling init_sse_su3dslash()... " << std::endl;
26 D=
new Dslash<double>(Layout::lattSize().slice(),
27 Layout::QDPXX_getSiteCoords,
28 Layout::QDPXX_getLinearSiteIndex,
29 Layout::QDPXX_nodeNumber);
35 CPPWilsonDslashD::CPPWilsonDslashD()
36 #ifndef CHROMA_STATIC_PACKED_GAUGE
37 : packed_gauge(
nullptr)
46 #ifndef CHROMA_STATIC_PACKED_GAUGE
47 : packed_gauge(
nullptr)
57 #ifndef CHROMA_STATIC_PACKED_GAUGE
58 : packed_gauge(
nullptr)
62 create(
state, aniso_);
67 const multi1d<Real>& coeffs_)
68 #ifndef CHROMA_STATIC_PACKED_GAUGE
69 : packed_gauge(
nullptr)
73 create(
state, coeffs_);
97 const multi1d<Real>& coeffs_)
105 fbc =
state->getFermBC();
108 if (fbc.operator->() == 0)
110 QDPIO::cerr <<
"CPPWilsonDslashD: error: fbc is null" << std::endl;
115 multi1d<LatticeColorMatrixD>
u =
state->getLinks();
118 for(
int mu=0;
mu <
u.size(); ++
mu)
127 if ( packed_gauge ==
nullptr ) {
128 packed_gauge = (PrimitiveSU3MatrixD*)QDP::Allocator::theQDPAllocator::Instance().allocate( Layout::sitesOnNode()*
Nd*
sizeof(PrimitiveSU3MatrixD),
130 if( packed_gauge ==
nullptr ) {
131 QDPIO::cout <<
"Failed to allocate packed gauge in CPP_Dslash " <<std::endl;
137 QDPIO::cout <<
"Done " << std::endl << std::flush;
139 QDPIO::cout <<
"Calling pack_gauge_field..." << std::flush;
142 qdp_pack_gauge(
u, packed_gauge);
145 QDPIO::cout <<
"Done" << std::endl << std::flush;
152 CPPWilsonDslashD::~CPPWilsonDslashD()
156 #ifndef CHROMA_STATIC_PACKED_GAUGE
157 QDP::Allocator::theQDPAllocator::Instance().free(packed_gauge);
196 int source_cb = 1 -
cb;
198 int cbsites = QDP::Layout::sitesOnNode()/2;
201 (*D)((
double *)&(
chi.elem(all.start()).elem(0).elem(0).real()),
202 (
double *)&(
psi.elem(all.start()).elem(0).elem(0).real()),
203 (
double *)&(packed_gauge[0]),
212 getFermBC().modifyF(
chi, QDP::rb[
cb]);
Primary include file for CHROMA library code.
Support class for fermion actions and linear operators.
Class for counted reference semantics.
Wilson Dslash linear operator.
void init(MesonSpecData_t &data, XMLWriter &xml, const std::string &path, const std::string &id_tag, const Params ¶ms)
Do some initialization.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
multi1d< Real > makeFermCoeffs(const AnisoParam_t &aniso)
Make fermion coefficients.
Parameters for anisotropy.