16 #include "qdp_map_obj_memory.h"
39 XMLReader inputtop(xml, path);
50 namespace GaugeTransfObjCallMapEnv
55 struct DumbDisambiguator {};
66 TheGaugeTransfObjFuncMap;
71 void gaugeTransfObj(
const std::string& output_id,
const LatticeColorMatrix& g,
const std::string& input_id)
77 XMLReader input_file_xml, input_record_xml;
92 void gaugeTransfGaugeField(
const std::string& output_id,
const LatticeColorMatrix& g,
const std::string& input_id)
97 const multi1d<T>& input_obj =
100 XMLReader input_file_xml, input_record_xml;
111 dest_gauge.resize(
Nd);
114 dest_gauge[
mu] = g_prec*input_obj[
mu]*adj(shift(g_prec,
FORWARD,
mu));
118 void gaugeTransfSubsetVectors(
const std::string& output_id,
const LatticeColorMatrix& g,
const std::string& input_id)
124 XMLReader input_file_xml, input_record_xml;
137 for(
int n=0;
n < input_obj->size();
n++) {
139 input_obj->get(
n,pair);
143 output_obj->insert(
n, pair2);
159 success &= TheGaugeTransfObjFuncMap::Instance().registerFunction(
std::string(
"LatticePropagator"),
160 gaugeTransfObj<LatticePropagator>);
161 success &= TheGaugeTransfObjFuncMap::Instance().registerFunction(
std::string(
"LatticeFermion"),
162 gaugeTransfObj<LatticeFermion>);
163 success &= TheGaugeTransfObjFuncMap::Instance().registerFunction(
std::string(
"LatticeStaggeredPropagator"),
164 gaugeTransfObj<LatticeStaggeredPropagator>);
165 success &= TheGaugeTransfObjFuncMap::Instance().registerFunction(
std::string(
"LatticeStaggeredFermion"),
166 gaugeTransfObj<LatticeStaggeredFermion>);
167 success &= TheGaugeTransfObjFuncMap::Instance().registerFunction(
std::string(
"SubsetVectorsLatticeColorVector"),
168 gaugeTransfSubsetVectors);
169 success &= TheGaugeTransfObjFuncMap::Instance().registerFunction(
std::string(
"Multi1dLatticeColorMatrix"),
170 gaugeTransfGaugeField<LatticeColorMatrix>);
179 namespace InlineGaugeTransfNamedObjEnv
213 Params::Params() { frequency = 0; }
219 XMLReader paramtop(xml_in, path);
221 if (paramtop.count(
"Frequency") == 1)
222 read(paramtop,
"Frequency", frequency);
227 read(paramtop,
"NamedObject", named_obj);
231 QDPIO::cerr << __func__ <<
": caught Exception reading XML: " << e << std::endl;
243 write(xml_out,
"NamedObject", named_obj);
255 push(xml_out,
"gauge_transf_object");
256 write(xml_out,
"update_no", update_no);
258 QDPIO::cout <<
name <<
": gauge transform an object of type "
259 <<
params.named_obj.object_type << std::endl;
264 const LatticeColorMatrix& g =
268 GaugeTransfObjCallMapEnv::TheGaugeTransfObjFuncMap::Instance().callFunction(
params.named_obj.object_type,
269 params.named_obj.output_id,
271 params.named_obj.input_id);
273 catch (std::bad_cast)
275 QDPIO::cerr <<
name <<
": cast error"
281 QDPIO::cerr <<
name <<
": error message: " << e
286 QDPIO::cout <<
name <<
": ran successfully" << std::endl;
Inline measurement factory.
Primary include file for CHROMA library code.
Class for counted reference semantics.
Gauge transform a named object.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
Inline task gauge transform some fermion object.
Named object function std::map.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
multi1d< Hadron2PtContraction_t > operator()(const multi1d< LatticeColorMatrix > &u)
Asqtad Staggered-Dirac operator.
push(xml_out,"Condensates")
LinOpSysSolverMGProtoClover::T T
Holds of vectors and weights.
#define TYPELIST_3(T1, T2, T3)