From 567b9aafddc84dfcdb9f8521529b74d18686b158 Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Thu, 14 Jun 2018 13:42:03 +0100 Subject: Add cores cmdln arg --- src/main/input-output/input/command_line_helper.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main/input-output/input/command_line_helper.cpp') 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(), "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(); + } 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; } -- cgit v1.2.1