| 130 | } |
| 131 | |
| 132 | inline uint32_t getElementSize(nvinfer1::DataType t) noexcept |
| 133 | { |
| 134 | switch (t) |
| 135 | { |
| 136 | case nvinfer1::DataType::kINT32: return 4; |
| 137 | case nvinfer1::DataType::kFLOAT: return 4; |
| 138 | case nvinfer1::DataType::kHALF: return 2; |
| 139 | case nvinfer1::DataType::kBOOL: |
| 140 | case nvinfer1::DataType::kUINT8: |
| 141 | case nvinfer1::DataType::kINT8: |
| 142 | case nvinfer1::DataType::kFP8: return 1; |
| 143 | } |
| 144 | return 0; |
| 145 | } |
| 146 | |
| 147 | inline int64_t getWeightsSize(nvinfer1::Weights const& w, nvinfer1::DataType type) |
| 148 | { |
no outgoing calls
no test coverage detected