CHROMA
null_predictor.cc
Go to the documentation of this file.
1 #include "chromabase.h"
3 
4 
5 namespace Chroma
6 {
7 
8  namespace Null4DChronoPredictorEnv
9  {
10  namespace
11  {
12  // Create a new 4D Zero Guess Predictor
13  // No params to read -- but preserve form
14  AbsChronologicalPredictor4D<LatticeFermion>* createPredictor(XMLReader& xml,
15  const std::string& path)
16  {
17  // No params to read
18  return new Null4DChronoPredictor;
19  }
20 
21  //! Local registration flag
22  bool registered = false;
23  }
24 
25  const std::string name = "NULL_4D_PREDICTOR";
26 
27  //! Register all the factories
28  bool registerAll()
29  {
30  bool success = true;
31  if (! registered)
32  {
33  success &= The4DChronologicalPredictorFactory::Instance().registerObject(name, createPredictor);
34  registered = true;
35  }
36  return success;
37  }
38 
39  }
40 
41 
42  namespace Null5DChronoPredictorEnv
43  {
44  namespace
45  {
46  // Create a new 5D Zero Guess Predictor
47  // No params to read
48  AbsChronologicalPredictor5D<LatticeFermion>* createPredictor(const int N5,
49  XMLReader& xml,
50  const std::string& path)
51  {
52  return new Null5DChronoPredictor(N5);
53  }
54 
55  //! Local registration flag
56  bool registered = false;
57  }
58 
59  const std::string name = "NULL_5D_PREDICTOR";
60 
61  //! Register all the factories
62  bool registerAll()
63  {
64  bool success = true;
65  if (! registered)
66  {
67  success &= The5DChronologicalPredictorFactory::Instance().registerObject(name, createPredictor);
68  registered = true;
69  }
70  return success;
71  }
72  }
73 
74 }
Primary include file for CHROMA library code.
Zero initial guess predictor.
Zero initial guess predictor.
static T & Instance()
Definition: singleton.h:432
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Null predictor: Leaves input x0 unchanged.