Go to the documentation of this file.
31 const int Nin = b.
nin();
32 const int Nvol = b.
nvol();
33 const int Nex = b.
nex();
35 Field Be(Nin, Nvol / 2, Nex);
36 Field bo(Nin, Nvol / 2, Nex);
37 Field xe(Nin, Nvol / 2, Nex);
43 vout.
general(
m_vl,
"Fprop_Standard_eo: the given Fopr is not Fopr_eo.\n");
67 const int Nin = b.
nin();
68 const int Nvol = b.
nvol();
69 const int Nex = b.
nex();
71 Field Be(Nin, Nvol / 2, Nex);
72 Field bo(Nin, Nvol / 2, Nex);
73 Field xe(Nin, Nvol / 2, Nex);
75 int Nconv1 = 0, Nconv2 = 0;
76 double diff1 = 1.0, diff2 = 1.0;
80 vout.
crucial(
m_vl,
"Fprop_Standard_eo: the given Fopr is not Fopr_eo.\n");
103 Nconv = 2 * (Nconv1 + Nconv2);
106 diff = (diff1 + diff2) / 2.0;
124 if (flop_fopr < eps) {
129 const double flop_axpy =
static_cast<double>(Nin * Nex * 2) * (Nvol / 2 * NPE);
131 const double flop_preProp = flop_fopr + flop_axpy;
133 const double flop_postProp = flop_fopr + flop_axpy;
135 const double flop = flop_preProp + 2 * flop_solver + flop_postProp;
152 Field axq(nin, nvol, nex), abq(nin, nvol, nex);
156 unique_ptr<Timer> timer(
new Timer);
158 std::string mode_prev = fopr->
get_mode();
166 for (
int i = 0; i < Nrepeat; ++i) {
167 fopr->
mult(axq, abq);
168 fopr->
mult(abq, axq);
175 double flop_total = flop_fopr * double(2 * Nrepeat);
177 double elapsed_time = timer->elapsed_sec();
178 double flops = flop_total / elapsed_time;
179 double gflops = flops * 1.0e-9;
void set(const int jin, const int site, const int jex, double v)
virtual void mult(AFIELD &, const AFIELD &)
multiplies fermion operator to a given field.
virtual double flop_count()=0
void invert_DdagD(Field &, const Field &, int &, double &)
virtual int field_nex()=0
returns the external degree of freedom of the fermion field.
static const std::string class_name
void mult_performance(const std::string mode, const int Nrepeat)
virtual void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
virtual void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
virtual void set_config(Field *)=0
sets the gauge configuration.
virtual void solve(Field &solution, const Field &source, int &Nconv, double &diff)=0
virtual std::string get_mode() const
returns the current mult mode.
virtual int field_nvol()=0
returns the volume of the fermion field.
void convertField(Field &eo, const Field &lex)
virtual double flop_count()
returns the number of floating point operations.
virtual void preProp(AFIELD &, AFIELD &, const AFIELD &)=0
Bridge::VerboseLevel m_vl
virtual Fopr * get_fopr()=0
virtual void postProp(AFIELD &, const AFIELD &, const AFIELD &)=0
void crucial(const char *format,...)
Container of Field-type object.
virtual int field_nin()=0
returns the on-site degree of freedom of the fermion field.
void general(const char *format,...)
void invert_D(Field &, const Field &, int &, double &)
static double epsilon_criterion()