File indexing completed on 2025-01-18 09:13:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include "CommandLineArguments.hpp"
0011
0012
0013 #include <boost/program_options.hpp>
0014
0015
0016 #include <cstdlib>
0017 #include <iostream>
0018 #include <string>
0019
0020
0021 namespace po = boost::program_options;
0022
0023 void CommandLineArguments::interpret(int argc, char* argv[]) {
0024
0025 po::options_description desc("Acts::Cuda::SeedFinder Test");
0026 desc.add_options()("help,h", "Produce a help message")(
0027 "spFile,f", po::value<std::string>()->default_value("sp.txt"),
0028 "SpacePoint text file name")(
0029 "quiet,q", po::bool_switch(),
0030 "Do not print the properties of the reconstructed seeds")(
0031 "onlyGPU,g", po::bool_switch(),
0032 "Run the seed finding using only the GPU implementation")(
0033 "groupsToIterate,n", po::value<unsigned int>()->default_value(500),
0034 "The number of groups to process as a maximum")(
0035 "filterDuplicates,d", po::bool_switch(),
0036 "Look for spacepoint duplicates in the input file, and remove them "
0037 "(slow!)")("cudaDevice", po::value<int>()->default_value(0),
0038 "The CUDA device to use in the test")(
0039 "cudaDeviceMemory", po::value<unsigned int>()->default_value(0),
0040 "The amount of CUDA device memory to use, in megabytes. By default it is"
0041 " 80% of the available amount.");
0042
0043
0044 po::variables_map vm;
0045 po::store(po::parse_command_line(argc, argv, desc), vm);
0046 po::notify(vm);
0047
0048
0049 if (vm.count("help")) {
0050 std::cout << desc << std::endl;
0051 exit(0);
0052 }
0053
0054
0055 spFile = vm["spFile"].as<std::string>();
0056 quiet = vm["quiet"].as<bool>();
0057 onlyGPU = vm["onlyGPU"].as<bool>();
0058 groupsToIterate = vm["groupsToIterate"].as<unsigned int>();
0059 filterDuplicates = vm["filterDuplicates"].as<bool>();
0060 cudaDevice = vm["cudaDevice"].as<int>();
0061 cudaDeviceMemory = vm["cudaDeviceMemory"].as<unsigned int>();
0062 return;
0063 }