Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert some formatting #1518

Merged
merged 1 commit into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions src/liboslexec/llvmutil_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@ getargs(int argc, char* argv[])
{
bool help = false;
OIIO::ArgParse ap;
ap.options(
"llvmutil_test\n" OIIO_INTRO_STRING "\n"
"Usage: llvmutil_test [options]",
"--help", &help, "Print help message", "-v", &verbose, "Verbose mode",
"--debug", &debug, "Debug mode", "--memtest %d", &memtest,
"Memory test mode (arg: iterations)",
// "--iters %d", &iterations,
// Strutil::fmt::format("Number of iterations (default: {})", iterations).c_str(),
// "--trials %d", &ntrials, "Number of trials",
NULL);
// clang-format off
ap.options("llvmutil_test\n"
OIIO_INTRO_STRING "\n"
"Usage: llvmutil_test [options]",
"--help", &help, "Print help message",
"-v", &verbose, "Verbose mode",
"--debug", &debug, "Debug mode",
"--memtest %d", &memtest, "Memory test mode (arg: iterations)",
// "--iters %d", &iterations,
// Strutil::fmt::format("Number of iterations (default: {})", iterations).c_str(),
// "--trials %d", &ntrials, "Number of trials",
NULL);
// clang-format on
if (ap.parse(argc, (const char**)argv) < 0) {
std::cerr << ap.geterror() << std::endl;
ap.usage();
Expand Down
14 changes: 8 additions & 6 deletions src/liboslnoise/oslnoise_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,16 +371,18 @@ getargs(int argc, const char* argv[])
{
bool help = false;
OIIO::ArgParse ap;
// clang-format off
ap.options("oslnoise_test (" OSL_INTRO_STRING ")\n"
"Usage: oslnoise_test [options]",
// "%*", parse_files, "",
"--help", &help, "Print help message", "-v", &verbose,
"Verbose mode", "--img", &make_images, "Make test images",
"--help", &help, "Print help message",
"-v", &verbose, "Verbose mode",
"--img", &make_images, "Make test images",
"--iterations %d", &iterations,
ustring::fmtformat("Number of iterations (default: {})",
iterations)
.c_str(),
"--trials %d", &ntrials, "Number of trials", NULL);
ustring::fmtformat("Number of iterations (default: {})", iterations).c_str(),
"--trials %d", &ntrials, "Number of trials",
NULL);
// clang-format on
if (ap.parse(argc, (const char**)argv) < 0) {
std::cerr << ap.geterror() << std::endl;
ap.usage();
Expand Down
21 changes: 12 additions & 9 deletions src/oslinfo/oslinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,18 @@ main(int argc, char* argv[])
OIIO::Filesystem::convert_native_arguments(argc, (const char**)argv);

OIIO::ArgParse ap(argc, (const char**)argv);
ap.options(
"oslinfo -- list parameters of a compiled OSL shader\n" OSL_INTRO_STRING
"\n"
"Usage: oslinfo [options] file0 [file1 ...]\n",
"%*", input_file, "", "-h", &help, "Print help message", "--help",
&help, "", "-v", &verbose, "Verbose", "--runstats", &runstats,
"Benchmark shader loading time for queries", "-p %s", &searchpath,
"Set searchpath for shaders", "--param %s", &oneparam,
"Output information in just this parameter", NULL);
// clang-format off
ap.options("oslinfo -- list parameters of a compiled OSL shader\n" OSL_INTRO_STRING "\n"
"Usage: oslinfo [options] file0 [file1 ...]\n",
"%*", input_file, "",
"-h", &help, "Print help message",
"--help", &help, "",
"-v", &verbose, "Verbose",
"--runstats", &runstats, "Benchmark shader loading time for queries",
"-p %s", &searchpath, "Set searchpath for shaders",
"--param %s", &oneparam, "Output information in just this parameter",
NULL);
// clang-format on

if (ap.parse(argc, (const char**)argv) < 0) {
std::cerr << ap.geterror() << std::endl;
Expand Down
12 changes: 8 additions & 4 deletions src/osltoy/osltoymain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ getargs(int argc, char* argv[])
{
bool help = false;
OIIO::ArgParse ap;
// clang-format off
ap.options("osltoy -- interactive OSL plaything\n" OSL_INTRO_STRING "\n"
"Usage: osltoy [options] [filename...]",
"%*", parse_files, "", "--help", &help, "Print help message",
"-v", &verbose, "Verbose status messages", "--threads %d",
&threads, "Set thread count (0=cores)", "--res %d %d", &xres,
&yres, "Set resolution (x, y)", NULL);
"%*", parse_files, "",
"--help", &help, "Print help message",
"-v", &verbose, "Verbose status messages",
"--threads %d", &threads, "Set thread count (0=cores)",
"--res %d %d", &xres, &yres, "Set resolution (x, y)",
NULL);
// clang-format on
if (ap.parse(argc, (const char**)argv) < 0) {
std::cerr << ap.geterror() << std::endl;
ap.usage();
Expand Down
50 changes: 27 additions & 23 deletions src/testrender/testrender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,29 +115,33 @@ getargs(int argc, const char* argv[])
{
bool help = false;
OIIO::ArgParse ap;
ap.options("Usage: testrender [options] scene.xml outputfilename", "%*",
get_filenames, "", "--help", &help, "Print help message", "-v",
&verbose, "Verbose messages", "-t %d", &num_threads,
"Render using N threads (default: auto-detect)", "--optix",
&use_optix, "Use OptiX if available", "--debug", &debug1,
"Lots of debugging info", "--debug2", &debug2,
"Even more debugging info", "--runstats", &runstats,
"Print run statistics", "--stats", &runstats,
"", // DEPRECATED 1.7
"--profile", &profile, "Print profile information", "--saveptx",
&saveptx, "Save the generated PTX (OptiX mode only)", "--warmup",
&warmup, "Perform a warmup launch", "--res %d %d", &xres, &yres,
"Make an W x H image", "-r %d %d", &xres, &yres,
"", // synonym for -res
"-aa %d", &aa, "Trace NxN rays per pixel", "--iters %d", &iters,
"Number of iterations", "-O0", &O0,
"Do no runtime shader optimization", "-O1", &O1,
"Do a little runtime shader optimization", "-O2", &O2,
"Do lots of runtime shader optimization", "--debugnan",
&debugnan, "Turn on 'debugnan' mode", "--path %s", &shaderpath,
"Specify oso search path", "--options %s", &extraoptions,
"Set extra OSL options", "--texoptions %s", &texoptions,
"Set extra TextureSystem options", NULL);
// clang-format off
ap.options("Usage: testrender [options] scene.xml outputfilename",
"%*", get_filenames, "",
"--help", &help, "Print help message",
"-v", &verbose, "Verbose messages",
"-t %d", &num_threads, "Render using N threads (default: auto-detect)",
"--optix", &use_optix, "Use OptiX if available",
"--debug", &debug1, "Lots of debugging info",
"--debug2", &debug2, "Even more debugging info",
"--runstats", &runstats, "Print run statistics",
"--stats", &runstats, "", // DEPRECATED 1.7
"--profile", &profile, "Print profile information",
"--saveptx", &saveptx, "Save the generated PTX (OptiX mode only)",
"--warmup", &warmup, "Perform a warmup launch",
"--res %d %d", &xres, &yres, "Make an W x H image",
"-r %d %d", &xres, &yres, "", // synonym for -res
"-aa %d", &aa, "Trace NxN rays per pixel",
"--iters %d", &iters, "Number of iterations",
"-O0", &O0, "Do no runtime shader optimization",
"-O1", &O1, "Do a little runtime shader optimization",
"-O2", &O2, "Do lots of runtime shader optimization",
"--debugnan", &debugnan, "Turn on 'debugnan' mode",
"--path %s", &shaderpath, "Specify oso search path",
"--options %s", &extraoptions, "Set extra OSL options",
"--texoptions %s", &texoptions, "Set extra TextureSystem options",
NULL);
// clang-format on
if (ap.parse(argc, argv) < 0) {
std::cerr << ap.geterror() << std::endl;
ap.usage();
Expand Down
Loading