MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / main

Function main

samples/sampleDynamicReshape/sampleDynamicReshape.cpp:519–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519int main(int argc, char** argv)
520{
521 samplesCommon::Args args;
522 bool argsOK = samplesCommon::parseArgs(args, argc, argv);
523 if (!argsOK)
524 {
525 sample::gLogError << "Invalid arguments" << std::endl;
526 printHelpInfo();
527 return EXIT_FAILURE;
528 }
529 if (args.help)
530 {
531 printHelpInfo();
532 return EXIT_SUCCESS;
533 }
534
535 auto sampleTest = sample::gLogger.defineTest(gSampleName, argc, argv);
536
537 sample::gLogger.reportTestStart(sampleTest);
538
539 SampleDynamicReshape sample{initializeSampleParams(args)};
540
541 if (!sample.build())
542 {
543 return sample::gLogger.reportFail(sampleTest);
544 }
545 if (!sample.prepare())
546 {
547 return sample::gLogger.reportFail(sampleTest);
548 }
549 if (!sample.infer())
550 {
551 return sample::gLogger.reportFail(sampleTest);
552 }
553 return sample::gLogger.reportPass(sampleTest);
554}

Callers

nothing calls this directly

Calls 10

printHelpInfoFunction · 0.70
initializeSampleParamsFunction · 0.70
parseArgsFunction · 0.50
defineTestMethod · 0.45
reportTestStartMethod · 0.45
buildMethod · 0.45
reportFailMethod · 0.45
prepareMethod · 0.45
inferMethod · 0.45
reportPassMethod · 0.45

Tested by

no test coverage detected