9 #include "qdp_map_obj_disk.h"
10 #include "qdp_disk_map_slice.h"
26 namespace InlineWriteTimeSliceMapObjDiskEnv
28 namespace WriteMapObjCallEnv
39 void (*)(
const Params& named_obj),
51 QDP::MapObject<int,EVPair<LatticeColorVector> >& input_obj =
53 std::vector<int> keys; input_obj.keys(keys);
55 const int decay_dir =
Nd-1;
57 XMLBufferWriter file_xml;
59 push(file_xml,
"MODMetaData");
61 write(file_xml,
"lattSize", QDP::Layout::lattSize());
62 write(file_xml,
"decay_dir", decay_dir);
63 write(file_xml,
"num_vecs", keys.size());
69 QDP::MapObjectDisk<KeyTimeSliceColorVec_t,TimeSliceIO<LatticeColorVector> > output_obj;
71 output_obj.insertUserdata(file_xml.str());
75 int Lt = Layout::lattSize()[decay_dir];
77 int start =
params.param.start_t;
78 int end =
params.param.end_t;
79 QDPIO::cout <<
"start_t = " << start <<
", end_t = " << end <<
"\n";
81 for(
int i=0;
i < keys.size();
i++)
88 for(
int t=0;
t < Lt;
t++)
90 if ( ( ( start < end ) && (
t >= start &&
t < end ) ) ||
91 ( ( end < start ) && (
t >= start ||
t < end ) ) )
97 output_obj.insert(time_key, TimeSliceIO<LatticeColorVector>(tmpvec.
eigenVector,
t));
110 XMLBufferWriter gauge_xml;
116 const int decay_dir =
Nd-1;
118 XMLBufferWriter file_xml;
120 push(file_xml,
"MODMetaData");
122 write(file_xml,
"lattSize", QDP::Layout::lattSize());
123 write(file_xml,
"decay_dir", decay_dir);
125 write(file_xml,
"Config_info", gauge_xml);
129 QDP::MapObjectDisk<KeyTimeSliceGauge_t,TimeSliceIO<V> > output_obj;
131 output_obj.insertUserdata(file_xml.str());
135 int Lt = Layout::lattSize()[decay_dir];
137 for(
int mu=0;
mu <
u.size();
mu++)
140 for(
int t=0;
t < Lt;
t++)
146 output_obj.insert(time_key, TimeSliceIO<V>(
u[
mu],
t));
159 XMLBufferWriter gauge_xml;
165 const int decay_dir =
Nd-1;
167 XMLBufferWriter file_xml;
169 push(file_xml,
"MODMetaData");
171 write(file_xml,
"lattSize", QDP::Layout::lattSize());
172 write(file_xml,
"decay_dir", decay_dir);
174 write(file_xml,
"Config_info", gauge_xml);
178 QDP::MapObjectDisk<int,TimeSliceIO<V> > output_obj;
180 output_obj.insertUserdata(file_xml.str());
188 int Lt = Layout::lattSize()[decay_dir];
191 for(
int t=0;
t < Lt;
t++)
193 output_obj.insert(
t, TimeSliceIO<V>(
u,
t));
206 writeMapObjEVPairLCV);
208 writeMapObjArrayLatColMat<LatticeColorMatrix>);
210 writeMapObjArrayLatColMat<LatticeColorMatrixF>);
212 writeMapObjArrayLatColMat<LatticeColorMatrixD>);
214 writeMapObjKeyIntValLat<LatticePropagator>);
216 writeMapObjKeyIntValLat<LatticePropagatorF>);
218 writeMapObjKeyIntValLat<LatticePropagatorD>);
220 writeMapObjKeyIntValLat<LatticeFermion>);
222 writeMapObjKeyIntValLat<LatticeFermionF>);
224 writeMapObjKeyIntValLat<LatticeFermionD>);
226 writeMapObjKeyIntValLat<LatticeColorMatrix>);
228 writeMapObjKeyIntValLat<LatticeColorMatrixF>);
230 writeMapObjKeyIntValLat<LatticeColorMatrixD>);
232 writeMapObjKeyIntValLat<LatticeColorVector>);
234 writeMapObjKeyIntValLat<LatticeColorVectorF>);
236 writeMapObjKeyIntValLat<LatticeColorVectorD>);
251 return new InlineMeas(Params(xml_in, path));
276 XMLReader inputtop(xml, path);
286 XMLReader inputtop(xml, path);
300 XMLReader paramtop(xml_in, path);
302 if (paramtop.count(
"Frequency") == 1)
310 if (paramtop.count(
"Param") == 1)
320 QDPIO::cerr << __func__ <<
": caught Exception reading XML: " << e << std::endl;
333 push(xml_out,
"write_timeslice_map_object_disk");
334 write(xml_out,
"update_no", update_no);
336 QDPIO::cout <<
name <<
": std::map object write to a time-slice format" << std::endl;
340 QDPIO::cout <<
"Attempt to time-slice write the input object name = " <<
params.
named_obj.
input_id << std::endl;
356 QDPIO::cout <<
"Object successfully copied: time= "
357 << swatch.getTimeInSeconds()
358 <<
" secs" << std::endl;
360 catch( std::bad_cast )
370 QDPIO::cerr <<
name <<
": error message: " << e << std::endl;
375 QDPIO::cout <<
name <<
": Caught const char * exception: " << e << std::endl;
379 QDPIO::cout <<
name <<
": ran successfully" << std::endl;
Inline measurement factory.
Primary include file for CHROMA library code.
Class for counted reference semantics.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the writing.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void proginfo(XMLWriter &xml)
Print out basic information about this program.
Inline task to time-sliced std::map object.
Key for time-sliced color eigenvectors.
Key for time-sliced gauge fields.
Named object function std::map.
static bool registered
Local registration flag.
const std::string name
Name to be used.
void read(XMLReader &xml, const std::string &path, Params::Param_t &input)
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
multi1d< SubsetVectorWeight_t > getEigenValues(const MapObject< int, EVPair< LatticeColorVector > > &eigen_source, int num_vecs)
static QDP_ColorVector * out
Constructor.
static QDP_ColorVector * in
Print out basic info about this program.
Holds of vectors and eigenvalues.
Holds of vectors and weights.