| 124 | |
| 125 | template<class T, size_t rows, size_t cols> |
| 126 | void SetTensorToTestVector(const uchar inputVals[rows][cols], int width, int height, nvcv::Tensor &tensor, int sample) |
| 127 | { |
| 128 | nvcv::util::TensorImageData data(tensor.exportData(), sample); |
| 129 | |
| 130 | for (int x = 0; x < width; ++x) |
| 131 | for (int y = 0; y < height; ++y) |
| 132 | for (int c = 0; c < data.numC(); ++c) *data.item<T>(x, y, c) = (T)inputVals[y][x]; |
| 133 | |
| 134 | EXPECT_NO_THROW(nvcv::util::SetTensorFromVector<T>(tensor.exportData(), data.getVector(), sample)); |
| 135 | } |
| 136 | |
| 137 | template<class T, size_t rows, size_t cols> |
| 138 | bool MatchTensorToTestVector(const uchar checkVals[rows][cols], int width, int height, nvcv::Tensor &Tensor, int sample) |
nothing calls this directly
no test coverage detected