| 73 | } |
| 74 | |
| 75 | inline 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 | |
| 90 | template <typename A, typename B> |
| 91 | inline A divUp(A x, B n) |
no outgoing calls
no test coverage detected