Bridge++  Ver. 2.0.2
fprop.h
Go to the documentation of this file.
1 
14 #ifndef FPROP_INCLUDED
15 #define FPROP_INCLUDED
16 
17 #include "Fopr/fopr.h"
18 
19 #include "IO/bridgeIO.h"
20 
22 
34 class Fprop
35 {
36  protected:
38  std::string m_mode; // mode for inverter.
39 
40  public:
42  : m_vl(CommonParameters::Vlevel()) {}
43 
44  virtual ~Fprop() {}
45 
46  private:
47  // non-copyable
48  Fprop(const Fprop&);
49  Fprop& operator=(const Fprop&);
50 
51  public:
53 
54  virtual void invert_D(Field&, const Field&, int&, double&) = 0;
55  virtual void invert_DdagD(Field&, const Field&, int&, double&) = 0;
56 
57  virtual void set_config(Field *) = 0;
58 
59  virtual double flop_count() = 0;
60 
62  virtual void invert(Field& x, const Field& b, int& nconv, double& diff)
63  {
64  if (m_mode == "D") {
65  invert_D(x, b, nconv, diff);
66  } else if (m_mode == "DdagD") {
67  invert_DdagD(x, b, nconv, diff);
68  } else {
69  vout.crucial("Fprop: unsupported mode\n");
70  exit(EXIT_FAILURE);
71  }
72  }
73 
75  virtual void set_mode(const std::string& mode) { m_mode = mode; }
76 
77  virtual void reset_performance()
78  { } // added [22 Sep 2018 H.Matsufuru]
79 
80  virtual void get_performance(double& flop_count, double& elapsed_time)
81  { } // added [07 Nov 2018 H.Matsufuru]
82 
83  virtual void report_performance()
84  { } // added [22 Sep 2018 H.Matsufuru]
85 
86  virtual void mult_performance(const std::string mode, const int Nrepeat)
87  { } // added [22 Sep 2018 H.Matsufuru]
88 };
89 #endif
Fprop::get_performance
virtual void get_performance(double &flop_count, double &elapsed_time)
Definition: fprop.h:80
bridgeIO.h
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
Fprop::flop_count
virtual double flop_count()=0
Fprop::set_config
virtual void set_config(Field *)=0
Fprop::operator=
Fprop & operator=(const Fprop &)
Fprop::set_mode
virtual void set_mode(const std::string &mode)
set the mode for invert(). [22 Sep 2018 H.Matsufuru]
Definition: fprop.h:75
Fprop::mult_performance
virtual void mult_performance(const std::string mode, const int Nrepeat)
Definition: fprop.h:86
Fprop::invert_D
virtual void invert_D(Field &, const Field &, int &, double &)=0
ParameterCheck::vl
Bridge::VerboseLevel vl
Definition: parameterCheck.cpp:18
Fprop::Fprop
Fprop()
Definition: fprop.h:41
Fprop::m_vl
Bridge::VerboseLevel m_vl
Definition: fprop.h:37
Fprop::report_performance
virtual void report_performance()
Definition: fprop.h:83
Fprop::invert
virtual void invert(Field &x, const Field &b, int &nconv, double &diff)
invert accordingly to the mode. [22 Sep 2018 H.Matsufuru]
Definition: fprop.h:62
Fprop::invert_DdagD
virtual void invert_DdagD(Field &, const Field &, int &, double &)=0
Fprop
Base class for fermion propagator class family.
Definition: fprop.h:34
fopr.h
Fprop::set_parameter_verboselevel
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: fprop.h:52
Fprop::~Fprop
virtual ~Fprop()
Definition: fprop.h:44
Fprop::m_mode
std::string m_mode
Definition: fprop.h:38
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition: bridgeIO.cpp:180
Field
Container of Field-type object.
Definition: field.h:46
Fprop::reset_performance
virtual void reset_performance()
Definition: fprop.h:77
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512