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

Function getElementSize

samples/common/common.h:631–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629}
630
631inline uint32_t getElementSize(nvinfer1::DataType t) noexcept
632{
633 switch (t)
634 {
635 case nvinfer1::DataType::kINT32: return 4;
636 case nvinfer1::DataType::kFLOAT: return 4;
637 case nvinfer1::DataType::kHALF: return 2;
638 case nvinfer1::DataType::kBOOL:
639 case nvinfer1::DataType::kUINT8:
640 case nvinfer1::DataType::kINT8:
641 case nvinfer1::DataType::kFP8: return 1;
642 }
643 return 0;
644}
645
646inline int64_t volume(nvinfer1::Dims const& dims, int32_t start, int32_t stop)
647{

Callers 3

nbBytesMethod · 0.70
loadWeightsMethod · 0.50
addLSTMLayersMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected