| 30 | { |
| 31 | |
| 32 | size_t getMemorySize(const nvinfer1::Dims& dims, const int32_t elem_size) |
| 33 | { |
| 34 | return std::accumulate(dims.d, dims.d + dims.nbDims, 1, std::multiplies<int64_t>()) * elem_size; |
| 35 | } |
| 36 | |
| 37 | ImageBase::ImageBase(const std::string& filename, const nvinfer1::Dims& dims) |
| 38 | : mDims(dims) |