NVIDIA DeepStream SDK API Reference

7.0 Release
trt_utils.h File Reference

Go to the source code of this file.

Macros

#define UNUSED(expr)   (void)(expr)
 
#define DIVUP(n, d)   ((n) + (d)-1) / (d)
 

Functions

std::string trim (std::string s)
 
float clamp (const float val, const float minVal, const float maxVal)
 
bool fileExists (const std::string fileName, bool verbose=true)
 
std::vector< float > loadWeights (const std::string weightsFilePath, const std::string &networkType)
 
std::string dimsToString (const nvinfer1::Dims d)
 
int getNumChannels (nvinfer1::ITensor *t)
 
uint64_t get3DTensorVolume (nvinfer1::Dims inputDims)
 
nvinfer1::ILayer * netAddMaxpool (int layerIdx, std::map< std::string, std::string > &block, nvinfer1::ITensor *input, nvinfer1::INetworkDefinition *network)
 
nvinfer1::ILayer * netAddConvLinear (int layerIdx, std::map< std::string, std::string > &block, std::vector< float > &weights, std::vector< nvinfer1::Weights > &trtWeights, int &weightPtr, int &inputChannels, nvinfer1::ITensor *input, nvinfer1::INetworkDefinition *network)
 
nvinfer1::ILayer * netAddConvBNLeaky (int layerIdx, std::map< std::string, std::string > &block, std::vector< float > &weights, std::vector< nvinfer1::Weights > &trtWeights, int &weightPtr, int &inputChannels, nvinfer1::ITensor *input, nvinfer1::INetworkDefinition *network)
 
nvinfer1::ILayer * netAddUpsample (int layerIdx, std::map< std::string, std::string > &block, std::vector< float > &weights, std::vector< nvinfer1::Weights > &trtWeights, int &inputChannels, nvinfer1::ITensor *input, nvinfer1::INetworkDefinition *network)
 
void printLayerInfo (std::string layerIndex, std::string layerName, std::string layerInput, std::string layerOutput, std::string weightPtr)
 

Macro Definition Documentation

◆ DIVUP

#define DIVUP (   n,
 
)    ((n) + (d)-1) / (d)

Definition at line 28 of file trt_utils.h.

◆ UNUSED

#define UNUSED (   expr)    (void)(expr)

Definition at line 27 of file trt_utils.h.

Function Documentation

◆ clamp()

float clamp ( const float  val,
const float  minVal,
const float  maxVal 
)

◆ dimsToString()

std::string dimsToString ( const nvinfer1::Dims  d)

◆ fileExists()

bool fileExists ( const std::string  fileName,
bool  verbose = true 
)

◆ get3DTensorVolume()

uint64_t get3DTensorVolume ( nvinfer1::Dims  inputDims)

◆ getNumChannels()

int getNumChannels ( nvinfer1::ITensor *  t)

◆ loadWeights()

std::vector<float> loadWeights ( const std::string  weightsFilePath,
const std::string &  networkType 
)

◆ netAddConvBNLeaky()

nvinfer1::ILayer* netAddConvBNLeaky ( int  layerIdx,
std::map< std::string, std::string > &  block,
std::vector< float > &  weights,
std::vector< nvinfer1::Weights > &  trtWeights,
int &  weightPtr,
int &  inputChannels,
nvinfer1::ITensor *  input,
nvinfer1::INetworkDefinition *  network 
)

◆ netAddConvLinear()

nvinfer1::ILayer* netAddConvLinear ( int  layerIdx,
std::map< std::string, std::string > &  block,
std::vector< float > &  weights,
std::vector< nvinfer1::Weights > &  trtWeights,
int &  weightPtr,
int &  inputChannels,
nvinfer1::ITensor *  input,
nvinfer1::INetworkDefinition *  network 
)

◆ netAddMaxpool()

nvinfer1::ILayer* netAddMaxpool ( int  layerIdx,
std::map< std::string, std::string > &  block,
nvinfer1::ITensor *  input,
nvinfer1::INetworkDefinition *  network 
)

◆ netAddUpsample()

nvinfer1::ILayer* netAddUpsample ( int  layerIdx,
std::map< std::string, std::string > &  block,
std::vector< float > &  weights,
std::vector< nvinfer1::Weights > &  trtWeights,
int &  inputChannels,
nvinfer1::ITensor *  input,
nvinfer1::INetworkDefinition *  network 
)

◆ printLayerInfo()

void printLayerInfo ( std::string  layerIndex,
std::string  layerName,
std::string  layerInput,
std::string  layerOutput,
std::string  weightPtr 
)

◆ trim()

std::string trim ( std::string  s)