MCPcopy Create free account
hub / github.com/RenderKit/oidn / main

Function main

apps/oidnTest.cpp:1519–1552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1517#endif // defined(OIDN_FILTER_RT)
1518
1519int main(int argc, char* argv[])
1520{
1521 Catch::Session session;
1522
1523 std::string deviceStr = "default";
1524
1525 using namespace Catch::clara;
1526 auto cli
1527 = session.cli()
1528 | Opt(deviceStr, "[0-9]+|default|cpu|sycl|cuda|hip|metal")
1529 ["--device"]
1530 ("Open Image Denoise device to use");
1531
1532 session.cli(cli);
1533
1534 int returnCode = session.applyCommandLine(argc, argv);
1535 if (returnCode != 0)
1536 return returnCode;
1537
1538 try
1539 {
1540 if (isdigit(deviceStr[0]))
1541 physicalDevice = fromString<int>(deviceStr);
1542 else
1543 deviceType = fromString<DeviceType>(deviceStr);
1544 }
1545 catch (const std::exception& e)
1546 {
1547 std::cerr << "Error: " << e.what() << std::endl;
1548 return 1;
1549 }
1550
1551 return session.run();
1552}

Callers

nothing calls this directly

Calls 5

OptClass · 0.85
cliMethod · 0.80
applyCommandLineMethod · 0.80
whatMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected