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

Function elementSize

samples/common/safeCommon.h:75–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75inline uint32_t elementSize(nvinfer1::DataType t)
76{
77 switch (t)
78 {
79 case nvinfer1::DataType::kINT32:
80 case nvinfer1::DataType::kFLOAT: return 4;
81 case nvinfer1::DataType::kHALF: return 2;
82 case nvinfer1::DataType::kINT8: return 1;
83 case nvinfer1::DataType::kUINT8: return 1;
84 case nvinfer1::DataType::kBOOL: return 1;
85 case nvinfer1::DataType::kFP8: return 1;
86 }
87 return 0;
88}
89
90template <typename A, typename B>
91inline A divUp(A x, B n)

Callers 1

dumpRawBindingToFilesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected