diff options
Diffstat (limited to 'src/main/input-output/input/command_line_helper.cpp')
| -rw-r--r-- | src/main/input-output/input/command_line_helper.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/input-output/input/command_line_helper.cpp b/src/main/input-output/input/command_line_helper.cpp index 0f685cb..cfbfd2f 100644 --- a/src/main/input-output/input/command_line_helper.cpp +++ b/src/main/input-output/input/command_line_helper.cpp @@ -44,6 +44,8 @@ command_line_helper::command_line_helper() "percentage of the supplied solitaire game, given a timeout in milliseconds. Must supply " "either 'random', 'benchmark', 'solvability' or list of deals to be " "solved.") + ("cores", po::value<int>(), "the number of cores for the solvability percentages to be run across. " + "Must be supplied with the solvability option.") ("benchmark", "outputs performance statistics for the solver on the " "supplied solitaire game. Must supply " "either 'random', 'benchmark', 'solvability' or list of deals to be " @@ -116,6 +118,13 @@ bool command_line_helper::parse(int argc, const char* argv[]) { solvability = -1; } + if (vm.count("cores")) { + cores = vm["cores"].as<int>(); + } else { + cores = 1; + } + + benchmark = (vm.count("benchmark") != 0); // Handle logic error scenarios @@ -219,6 +228,10 @@ int command_line_helper::get_solvability() { return solvability; } +int command_line_helper::get_cores() { + return cores; +} + bool command_line_helper::get_available_game_types() { return available_game_types; } |
