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

Function initializeSampleParams

samples/sampleINT8API/sampleINT8API.cpp:777–801  ·  view source on GitHub ↗

\brief This function initializes members of the params struct using the command line args

Source from the content-addressed store, hash-verified

775//! \brief This function initializes members of the params struct using the command line args
776//!
777SampleINT8APIParams initializeSampleParams(SampleINT8APIArgs args)
778{
779 SampleINT8APIParams params;
780 if (args.dataDirs.empty()) // Use default directories if user hasn't provided directory paths
781 {
782 params.dataDirs.push_back("data/samples/int8_api/");
783 params.dataDirs.push_back("data/int8_api/");
784 }
785 else // Use the data directory provided by the user
786 {
787 params.dataDirs = args.dataDirs;
788 }
789
790 params.dataDirs.push_back(""); // In case of absolute path search
791 params.verbose = args.verbose;
792 params.modelFileName = args.modelFileName;
793 params.imageFileName = args.imageFileName;
794 params.referenceFileName = args.referenceFileName;
795 params.dynamicRangeFileName = args.dynamicRangeFileName;
796 params.dlaCore = args.useDLACore;
797 params.writeNetworkTensors = args.writeNetworkTensors;
798 params.networkTensorsFileName = args.networkTensorsFileName;
799 validateInputParams(params);
800 return params;
801}
802
803//!
804//! \brief This function prints the help information for running this sample

Callers 1

mainFunction · 0.70

Calls 2

validateInputParamsFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected