8 " " << std::setiosflags(std::ios::fixed) \
9 << std::setprecision(X) \
25 sstep = PM->get_int(
"sstep",
LOC(), 1);
26 msize = PM->get_int(
"msize",
LOC(), 128);
49 DS->def_int(
"iter.sstep", &
sstep);
50 DS->def_int(
"iter.nstep", &
nstep);
51 DS->def_int(
"iter.nsamp", &
nsamp);
52 DS->def_int(
"iter.msize", &
msize);
71 int last_tried_dtsize =
msize;
74 << std::setw(10) <<
"Progress"
75 << std::setw(10) <<
"Time"
76 << std::setw(10) <<
"tsize"
77 << std::setw(10) <<
"dtsize"
78 << std::setw(10) <<
"try"
85 bool at_fullstep_initially = tsize_before_loop % (
msize) == 0;
86 bool at_fullstep_finally = tsize_after_loop % (
msize) == 0;
94 for (
int bto =
nbackup, bfrom = bto - 1; bto > 1; --bto, --bfrom) {
103 for (
auto& pkernel :
_child_kernels) { pkernel->executeKernel(stat); }
113 if (std::ifstream{
"X_STAT"}.good() && !
frez_ptr[0]) statc =
'X';
119 std::string directory =
_param->get_string(
"directory",
LOC());
134 int extend_dtsize = (at_fullstep_finally) ? 2 * last_tried_dtsize : 2 *
dtsize_ptr[0];
136 int new_dtsize = std::min({
msize, extend_dtsize, remain_dtsize});
152 for (
int bto =
nbackup, bfrom = bto - 1; bto > 1; --bto, --bfrom) {
160 std::cout << statc <<
"|:"
161 << std::resetiosflags(std::ios::scientific) << std::setiosflags(std::ios::fixed)
162 << std::setprecision(2) << std::setw(10) << 100 *
t_ptr[0] /
tend <<
"%"
163 << std::resetiosflags(std::ios::fixed) << std::setiosflags(std::ios::scientific)
165 << std::setw(10) << tsize_before_loop
166 << std::setw(10) << last_tried_dtsize
kids_bint * last_attempt_ptr
virtual void setInputParam_impl(std::shared_ptr< Param > &PM)
Virtual function to set input parameters for the kernel implementation.
virtual Status & initializeKernel_impl(Status &stat)
Virtual function to initialize the kernel implementation.
virtual void setInputDataSet_impl(std::shared_ptr< DataSet > &DS)
Virtual function to set input data set for the kernel implementation.
virtual const std::string getName()
Get the name of the kernel.
kids_bint * at_samplingstep_initially_ptr
kids_bint * at_samplingstep_finally_ptr
virtual Status & executeKernel_impl(Status &stat)
Virtual function to execute the kernel implementation.
const std::vector< std::string > backup_fields
virtual int getType() const
Get the type of the kernel.
std::vector< std::shared_ptr< Kernel > > _child_kernels
Vector containing shared pointers to the child kernels of this kernel.
std::shared_ptr< Param > _param
Shared pointer to the Param object associated with this kernel.
std::shared_ptr< DataSet > _dataset
Shared pointer to the DataSet object associated with this kernel.
#define LOC()
show the location information for debug
VARIABLE< kids_bint > frez
VARIABLE< kids_bint > at_samplingstep_finally
VARIABLE< kids_bint > at_samplingstep_initially
VARIABLE< kids_bint > last_attempt
VARIABLE< kids_int > istep
VARIABLE< kids_int > dtsize
VARIABLE< kids_int > tsize
VARIABLE< kids_int > isamp
VARIABLE< kids_int > fail_type
VARIABLE< kids_bint > succ
< http://warp.povusers.org/FunctionParser/fparser.html
constexpr dimension7 time_d
[T]
std::basic_string< CharT > concat(const separator_t< CharT > &sep, Args &&... seq)
constexpr uint32_t hash(const char *str)
declaration of variables used in the program.