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

Function getAndDelOption

samples/common/sampleOptions.cpp:242–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240//! If it does not: return false.
241template <typename T>
242bool getAndDelOption(Arguments& arguments, const std::string& option, T& value)
243{
244 const auto match = arguments.find(option);
245 if (match != arguments.end())
246 {
247 value = stringToValue<T>(match->second);
248 arguments.erase(match);
249 return true;
250 }
251
252 return false;
253}
254
255//! Check if input option exists in input arguments.
256//! If it does: return false in value, erase the argument and return true.

Callers 9

getAndDelNegOptionFunction · 0.85
getLayerPrecisionsFunction · 0.85
getLayerOutputTypesFunction · 0.85
getLayerDeviceTypesFunction · 0.85
getShapesBuildFunction · 0.85
getShapesInferenceFunction · 0.85
parseMethod · 0.85
getTempfileControlsFunction · 0.85
parseHelpFunction · 0.85

Calls 1

findMethod · 0.45

Tested by

no test coverage detected