Classes | |
struct | Args |
/brief Struct to maintain command-line arguments. More... | |
struct | BBox |
class | BufferManager |
The BufferManager class handles host and device buffer allocation and deallocation. More... | |
struct | CaffeSampleParams |
The CaffeSampleParams structure groups the additional parameters required by networks that use caffe. More... | |
class | CpuTimer |
class | DeviceAllocator |
class | DeviceFree |
class | GenericBuffer |
The GenericBuffer class is a templated class for buffers. More... | |
class | GpuTimer |
class | HostAllocator |
class | HostFree |
class | HostMemory |
struct | InferDeleter |
class | ManagedBuffer |
The ManagedBuffer class groups together a pair of corresponding device and host buffers. More... | |
struct | OnnxSampleParams |
The OnnxSampleParams structure groups the additional parameters required by networks that use ONNX. More... | |
struct | PPM |
struct | SampleParams |
The SampleParams structure groups the basic parameters required by all sample networks. More... | |
class | TimerBase |
class | TypedHostMemory |
struct | UffSampleParams |
The UffSampleParams structure groups the additional parameters required by networks that use Uff. More... | |
struct | vPPM |
Typedefs | |
using | DeviceBuffer = GenericBuffer< DeviceAllocator, DeviceFree > |
using | HostBuffer = GenericBuffer< HostAllocator, HostFree > |
using | FloatMemory = TypedHostMemory< float, DataType::kFLOAT > |
using | HalfMemory = TypedHostMemory< uint16_t, DataType::kHALF > |
using | ByteMemory = TypedHostMemory< uint8_t, DataType::kINT8 > |
using | PreciseCpuTimer = CpuTimer< std::chrono::high_resolution_clock > |
Functions | |
bool | parseArgs (Args &args, int32_t argc, char *argv[]) |
Populates the Args struct with the provided command-line parameters. More... | |
template<typename T , typename std::enable_if< std::is_integral< T >::value, int >::type = 0> | |
T | swapEndianness (const T &value) |
void * | safeCudaMalloc (size_t memSize) |
bool | isDebug () |
template<typename T > | |
std::shared_ptr< T > | infer_object (T *obj) |
template<class Iter > | |
std::vector< size_t > | argMagnitudeSort (Iter begin, Iter end) |
Return vector of indices that puts magnitudes of sequence in descending order. More... | |
bool | readReferenceFile (const std::string &fileName, std::vector< std::string > &refVector) |
template<typename T > | |
std::vector< std::string > | classify (const std::vector< std::string > &refVector, const std::vector< T > &output, const size_t topK) |
template<typename T > | |
std::vector< size_t > | topKMagnitudes (const std::vector< T > &v, const size_t k) |
template<typename T > | |
bool | readASCIIFile (const std::string &fileName, const size_t size, std::vector< T > &out) |
template<typename T > | |
bool | writeASCIIFile (const std::string &fileName, const std::vector< T > &in) |
void | print_version () |
std::string | getFileType (const std::string &filepath) |
std::string | toLower (const std::string &inp) |
float | getMaxValue (const float *buffer, int64_t size) |
void | setAllTensorScales (INetworkDefinition *network, float inScales=2.0f, float outScales=4.0f) |
void | setDummyInt8Scales (const IBuilderConfig *c, INetworkDefinition *n) |
void | enableDLA (IBuilder *builder, IBuilderConfig *config, int useDLACore, bool allowGPUFallback=true) |
int | parseDLA (int argc, char **argv) |
unsigned int | getElementSize (nvinfer1::DataType t) |
int64_t | volume (const nvinfer1::Dims &d) |
unsigned int | elementSize (DataType t) |
template<typename A , typename B > | |
A | divUp (A x, B n) |
template<int C, int H, int W> | |
void | readPPMFile (const std::string &filename, samplesCommon::PPM< C, H, W > &ppm) |
void | readPPMFile (const std::string &filename, vPPM &ppm, std::vector< std::string > &input_dir) |
template<int C, int H, int W> | |
void | writePPMFileWithBBox (const std::string &filename, PPM< C, H, W > &ppm, const BBox &bbox) |
void | writePPMFileWithBBox (const std::string &filename, vPPM ppm, std::vector< BBox > &dets) |
std::vector< std::string > | splitString (std::string str, char delimiter=',') |
int | roundUp (int m, int n) |
int | getC (const Dims &d) |
int | getH (const Dims &d) |
int | getW (const Dims &d) |
void | loadLibrary (const std::string &path) |
using samplesCommon::DeviceBuffer = typedef GenericBuffer<DeviceAllocator, DeviceFree> |
using samplesCommon::HostBuffer = typedef GenericBuffer<HostAllocator, HostFree> |
using samplesCommon::FloatMemory = typedef TypedHostMemory<float, DataType::kFLOAT> |
using samplesCommon::HalfMemory = typedef TypedHostMemory<uint16_t, DataType::kHALF> |
using samplesCommon::ByteMemory = typedef TypedHostMemory<uint8_t, DataType::kINT8> |
using samplesCommon::PreciseCpuTimer = typedef CpuTimer<std::chrono::high_resolution_clock> |
|
inline |
Populates the Args struct with the provided command-line parameters.
invalid_argument | if any of the arguments are not valid |
|
inline |
|
inline |
|
inline |
std::shared_ptr<T> samplesCommon::infer_object | ( | T * | obj | ) |
std::vector<size_t> samplesCommon::argMagnitudeSort | ( | Iter | begin, |
Iter | end | ||
) |
Return vector of indices that puts magnitudes of sequence in descending order.
|
inline |
std::vector<std::string> samplesCommon::classify | ( | const std::vector< std::string > & | refVector, |
const std::vector< T > & | output, | ||
const size_t | topK | ||
) |
std::vector<size_t> samplesCommon::topKMagnitudes | ( | const std::vector< T > & | v, |
const size_t | k | ||
) |
bool samplesCommon::readASCIIFile | ( | const std::string & | fileName, |
const size_t | size, | ||
std::vector< T > & | out | ||
) |
bool samplesCommon::writeASCIIFile | ( | const std::string & | fileName, |
const std::vector< T > & | in | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void samplesCommon::readPPMFile | ( | const std::string & | filename, |
samplesCommon::PPM< C, H, W > & | ppm | ||
) |
|
inline |
void samplesCommon::writePPMFileWithBBox | ( | const std::string & | filename, |
PPM< C, H, W > & | ppm, | ||
const BBox & | bbox | ||
) |
|
inline |
|
inline |
|
inline |