mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
bench: Fix negative values and zero for -evals flag
This commit is contained in:
parent
7b701fef58
commit
3bb0a4674f
1 changed files with 7 additions and 0 deletions
|
|
@ -51,6 +51,13 @@ int main(int argc, char** argv)
|
||||||
std::string scaling_str = gArgs.GetArg("-scaling", DEFAULT_BENCH_SCALING);
|
std::string scaling_str = gArgs.GetArg("-scaling", DEFAULT_BENCH_SCALING);
|
||||||
bool is_list_only = gArgs.GetBoolArg("-list", false);
|
bool is_list_only = gArgs.GetBoolArg("-list", false);
|
||||||
|
|
||||||
|
if (evaluations == 0) {
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
} else if (evaluations < 0) {
|
||||||
|
tfm::format(std::cerr, "Error parsing evaluations argument: %d\n", evaluations);
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
double scaling_factor;
|
double scaling_factor;
|
||||||
if (!ParseDouble(scaling_str, &scaling_factor)) {
|
if (!ParseDouble(scaling_str, &scaling_factor)) {
|
||||||
tfm::format(std::cerr, "Error parsing scaling factor as double: %s\n", scaling_str.c_str());
|
tfm::format(std::cerr, "Error parsing scaling factor as double: %s\n", scaling_str.c_str());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue