CHROMA
inline_rng.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline task to read and write RNG seed
4  */
5 
6 #ifndef __inline_rng_h__
7 #define __inline_rng_h__
8 
9 #include "chromabase.h"
11 
12 namespace Chroma
13 {
14  /*! \ingroup inlineio */
15  namespace InlineSetRNGEnv
16  {
17  bool registerAll();
18 
19  //! Parameter structure
20  /*! \ingroup inlineio */
21  struct Params
22  {
23  Params();
24  Params(XMLReader& xml_in, const std::string& path);
25  void writeXML(XMLWriter& xml_out, const std::string& path);
26 
27  unsigned long frequency;
28 
29  QDP::Seed ran_seed;
30  };
31 
32  //! Set the RNG seed
33  /*! \ingroup inlineio */
35  {
36  public:
38  InlineMeas(const Params& p) : params(p) {}
40 
41  unsigned long getFrequency(void) const {return params.frequency;}
42 
43  //! Do the writing
44  void operator()(const unsigned long update_no,
45  XMLWriter& xml_out);
46 
47  private:
49  };
50 
51  }
52 }
53 
54 #endif
Abstract inline measurements.
Primary include file for CHROMA library code.
unsigned long getFrequency(void) const
Tell me how often I should measure this beastie.
Definition: inline_rng.h:41
InlineMeas(const InlineMeas &p)
Definition: inline_rng.h:39
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the writing.
Definition: inline_rng.cc:76
bool registerAll()
Register all the factories.
Definition: inline_rng.cc:28
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Parameter structure.
Definition: inline_rng.h:22
void writeXML(XMLWriter &xml_out, const std::string &path)
Definition: inline_rng.cc:64