Skip to content

Commit

Permalink
Add missing options to --help output
Browse files Browse the repository at this point in the history
Tweaked format of --help output to accommodate longer options.
  • Loading branch information
jrprice committed Mar 9, 2018
1 parent e6e4894 commit 6487cd0
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 72 deletions.
78 changes: 42 additions & 36 deletions src/kernel/oclgrind-kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,42 +226,48 @@ static void printUsage()
<< " oclgrind-kernel [--help | --version]" << endl
<< endl
<< "Options:" << endl
<< " --build-options OPTIONS "
"Additional options to pass to the OpenCL compiler" << endl
<< " --data-races "
"Enable data-race detection" << endl
<< " --disable-pch "
"Don't use precompiled headers" << endl
<< " --dump-spir "
"Dump SPIR to /tmp/oclgrind_*.{ll,bc}" << endl
<< " -g --global-mem "
"Output global memory at exit" << endl
<< " -h --help "
"Display usage information" << endl
<< " --inst-counts "
"Output histograms of instructions executed" << endl
<< " -i --interactive "
"Enable interactive mode" << endl
<< " --log LOGFILE "
"Redirect log/error messages to a file" << endl
<< " --max-errors NUM "
"Limit the number of error/warning messages" << endl
<< " --max-wgsize WGSIZE "
"Change the maximum work-group size of the device" << endl
<< " --num-threads NUM "
"Set the number of worker threads to use" << endl
<< " --pch-dir DIR "
"Override directory containing precompiled headers" << endl
<< " --plugins PLUGINS "
"Load colon separated list of plugin libraries" << endl
<< " -q --quick "
"Only run first and last work-group" << endl
<< " --uniform-writes "
"Don't suppress uniform write-write data-races" << endl
<< " --uninitialized "
"Report usage of uninitialized values" << endl
<< " -v --version "
"Display version information" << endl
<< " --build-options OPTIONS "
"Additional options to pass to the OpenCL compiler" << endl
<< " --constant-mem-size BYTES "
"Change the constant memory size of the device" << endl
<< " --data-races "
"Enable data-race detection" << endl
<< " --disable-pch "
"Don't use precompiled headers" << endl
<< " --dump-spir "
"Dump SPIR to /tmp/oclgrind_*.{ll,bc}" << endl
<< " --global-mem [-g] "
"Output global memory at exit" << endl
<< " --global-mem-size BYTES "
"Change the global memory size of the device" << endl
<< " --help [-h] "
"Display usage information" << endl
<< " --inst-counts "
"Output histograms of instructions executed" << endl
<< " --interactive [-i] "
"Enable interactive mode" << endl
<< " --local-mem-size BYTES "
"Change the local memory size of the device" << endl
<< " --log LOGFILE "
"Redirect log/error messages to a file" << endl
<< " --max-errors NUM "
"Limit the number of error/warning messages" << endl
<< " --max-wgsize WGSIZE "
"Change the maximum work-group size of the device" << endl
<< " --num-threads NUM "
"Set the number of worker threads to use" << endl
<< " --pch-dir DIR "
"Override directory containing precompiled headers" << endl
<< " --plugins PLUGINS "
"Load colon separated list of plugin libraries" << endl
<< " --quick [-q] "
"Only run first and last work-group" << endl
<< " --uniform-writes "
"Don't suppress uniform write-write data-races" << endl
<< " --uninitialized "
"Report usage of uninitialized values" << endl
<< " --version [-q] "
"Display version information" << endl
<< endl
<< "For more information, please visit the Oclgrind wiki page:" << endl
<< "-> https://github.com/jrprice/Oclgrind/wiki" << endl
Expand Down
78 changes: 42 additions & 36 deletions src/runtime/oclgrind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,42 +449,48 @@ static void printUsage()
<< " oclgrind [--help | --version]" << endl
<< endl
<< "Options:" << endl
<< " --build-options OPTIONS "
"Additional options to pass to the OpenCL compiler" << endl
<< " --check-api "
"Report errors on API calls" << endl
<< " --data-races "
"Enable data-race detection" << endl
<< " --disable-pch "
"Don't use precompiled headers" << endl
<< " --dump-spir "
"Dump SPIR to /tmp/oclgrind_*.{ll,bc}" << endl
<< " -h --help "
"Display usage information" << endl
<< " --inst-counts "
"Output histograms of instructions executed" << endl
<< " -i --interactive "
"Enable interactive mode" << endl
<< " --log LOGFILE "
"Redirect log/error messages to a file" << endl
<< " --max-errors NUM "
"Limit the number of error/warning messages" << endl
<< " --max-wgsize WGSIZE "
"Change the maximum work-group size of the device" << endl
<< " --num-threads NUM "
"Set the number of worker threads to use" << endl
<< " --pch-dir DIR "
"Override directory containing precompiled headers" << endl
<< " --plugins PLUGINS "
"Load colon separated list of plugin libraries" << endl
<< " -q --quick "
"Only run first and last work-group" << endl
<< " --uniform-writes "
"Don't suppress uniform write-write data-races" << endl
<< " --uninitialized "
"Report usage of uninitialized values" << endl
<< " -v --version "
"Display version information" << endl
<< " --build-options OPTIONS "
"Additional options to pass to the OpenCL compiler" << endl
<< " --check-api "
"Report errors on API calls" << endl
<< " --constant-mem-size BYTES "
"Change the constant memory size of the device" << endl
<< " --data-races "
"Enable data-race detection" << endl
<< " --disable-pch "
"Don't use precompiled headers" << endl
<< " --dump-spir "
"Dump SPIR to /tmp/oclgrind_*.{ll,bc}" << endl
<< " --global-mem-size BYTES "
"Change the global memory size of the device" << endl
<< " --help [-h] "
"Display usage information" << endl
<< " --inst-counts "
"Output histograms of instructions executed" << endl
<< " --interactive [-i] "
"Enable interactive mode" << endl
<< " --local-mem-size BYTES "
"Change the local memory size of the device" << endl
<< " --log LOGFILE "
"Redirect log/error messages to a file" << endl
<< " --max-errors NUM "
"Limit the number of error/warning messages" << endl
<< " --max-wgsize WGSIZE "
"Change the maximum work-group size of the device" << endl
<< " --num-threads NUM "
"Set the number of worker threads to use" << endl
<< " --pch-dir DIR "
"Override directory containing precompiled headers" << endl
<< " --plugins PLUGINS "
"Load colon separated list of plugin libraries" << endl
<< " --quick [-q] "
"Only run first and last work-group" << endl
<< " --uniform-writes "
"Don't suppress uniform write-write data-races" << endl
<< " --uninitialized "
"Report usage of uninitialized values" << endl
<< " --version [-v] "
"Display version information" << endl
<< endl
<< "For more information, please visit the Oclgrind wiki page:" << endl
<< "-> https://github.com/jrprice/Oclgrind/wiki" << endl
Expand Down

0 comments on commit 6487cd0

Please sign in to comment.