| 45 | } |
| 46 | |
| 47 | inline nvcv::TensorShape CreateNVCVTensorShape(const Shape &shape, nvcv::TensorLayout layout = nvcv::TENSOR_NONE) |
| 48 | { |
| 49 | std::vector<int64_t> dims; |
| 50 | dims.reserve(shape.size()); |
| 51 | for (size_t i = 0; i < shape.size(); ++i) |
| 52 | { |
| 53 | dims.push_back(shape[i].cast<int64_t>()); |
| 54 | } |
| 55 | |
| 56 | return nvcv::TensorShape(dims.data(), dims.size(), layout); |
| 57 | } |
| 58 | |
| 59 | inline int64_t LengthIf1D(const Shape &shape) |
| 60 | { |
no test coverage detected