7 #include "cpp_dslash.h"
8 #include "cpp_dslash_qdp_packer.h"
11 using namespace CPlusPlusWilsonDslash;
21 D =
new Dslash<float>(Layout::lattSize().slice(),
22 Layout::QDPXX_getSiteCoords,
23 Layout::QDPXX_getLinearSiteIndex,
24 Layout::QDPXX_nodeNumber);
29 CPPWilsonDslashF::CPPWilsonDslashF()
30 #ifndef CHROMA_STATIC_PACKED_GAUGE
31 : packed_gauge(
nullptr)
40 #ifndef CHROMA_STATIC_PACKED_GAUGE
41 : packed_gauge(
nullptr)
52 #ifndef CHROMA_STATIC_PACKED_GAUGE
53 : packed_gauge(
nullptr)
58 create(
state, aniso_);
63 const multi1d<Real>& coeffs_)
64 #ifndef CHROMA_STATIC_PACKED_GAUGE
65 : packed_gauge(
nullptr)
70 create(
state, coeffs_);
94 const multi1d<Real>& coeffs_)
102 fbc =
state->getFermBC();
105 if (fbc.operator->() == 0)
107 QDPIO::cerr <<
"CPPWilsonDslashF: error: fbc is null" << std::endl;
112 multi1d<LatticeColorMatrixF>
u =
state->getLinks();
115 for(
int mu=0;
mu <
u.size(); ++
mu)
124 if ( packed_gauge ==
nullptr ) {
125 packed_gauge = (PrimitiveSU3MatrixF *)QDP::Allocator::theQDPAllocator::Instance().allocate( Layout::sitesOnNode()*
Nd*
sizeof(PrimitiveSU3MatrixF),
127 if( packed_gauge ==
nullptr ) {
128 QDPIO::cout <<
"Failed to allocate packed gauge in CPP_Dslash " <<std::endl;
134 QDPIO::cout <<
"Done " << std::endl << std::flush;
136 QDPIO::cout <<
"Calling pack_gauge_field..." << std::flush;
139 qdp_pack_gauge(
u, packed_gauge);
142 QDPIO::cout <<
"Done" << std::endl << std::flush;
149 CPPWilsonDslashF::~CPPWilsonDslashF()
157 #ifndef CHROMA_STATIC_PACKED_GAUGE
158 QDP::Allocator::theQDPAllocator::Instance().free(packed_gauge);
197 int source_cb = 1 -
cb;
199 int cbsites = QDP::Layout::sitesOnNode()/2;
201 (*D)((
float *)&(
chi.elem(all.start()).elem(0).elem(0).real()),
202 (
float *)&(
psi.elem(all.start()).elem(0).elem(0).real()),
203 (
float *)&(packed_gauge[0]),
212 getFermBC().modifyF(
chi, QDP::rb[
cb]);
Primary include file for CHROMA library code.
void create(Handle< FermState< T, P, Q > > state)
Creation routine.
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.