Will continue today.
This commit is contained in:
@@ -39,20 +39,20 @@ class Timer {
|
||||
timeval result;
|
||||
timersub(&end_, &start_, &result);
|
||||
std::stringstream str;
|
||||
str << (result.tv_sec + result.tv_usec / 1000000.0);
|
||||
str << (result.tv_sec + static_cast<double>(result.tv_usec) / 1000000.0);
|
||||
return str.str();
|
||||
}
|
||||
|
||||
double GetTotalElapsedTime() {
|
||||
timeval result;
|
||||
timersub(&end_, &start_, &result);
|
||||
return (result.tv_sec + result.tv_usec / 1000000.0);
|
||||
return (result.tv_sec + static_cast<double>(result.tv_usec) / 1000000.0);
|
||||
}
|
||||
|
||||
double GetElapsedTime(int checkpoint_id) {
|
||||
timeval result;
|
||||
timersub(&checkpoints_[checkpoint_id], &start_, &result);
|
||||
return (result.tv_sec + result.tv_usec / 1000000.0);
|
||||
return (result.tv_sec + static_cast<double>(result.tv_usec) / 1000000.0);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
+3
-1
@@ -45,7 +45,9 @@ void physpack::nbody_simulator::NbodySimulator::Init(
|
||||
table_ = arguments_in.table_;
|
||||
|
||||
// Declare the global constants.
|
||||
global_.Init(table_, arguments_in.relative_error_, arguments_in.probability_);
|
||||
global_.Init(
|
||||
table_, arguments_in.relative_error_, arguments_in.probability_,
|
||||
arguments_in.summary_compute_quantile_);
|
||||
}
|
||||
|
||||
bool physpack::nbody_simulator::NbodySimulator::ConstructBoostVariableMap_(
|
||||
|
||||
+5
-1
@@ -383,7 +383,9 @@ class NbodySimulatorGlobal {
|
||||
|
||||
void Init(
|
||||
core::table::Table *table_in,
|
||||
double relative_error_in, double probability_in) {
|
||||
double relative_error_in,
|
||||
double probability_in,
|
||||
double summary_compute_quantile_in) {
|
||||
|
||||
relative_error_ = relative_error_in;
|
||||
probability_ = probability_in;
|
||||
@@ -397,6 +399,8 @@ class NbodySimulatorGlobal {
|
||||
|
||||
// Initialize the potential.
|
||||
potential_.Init(total_num_tuples_);
|
||||
|
||||
summary_compute_quantile_ = summary_compute_quantile_in;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user