MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / SetTensorToTestVector

Function SetTensorToTestVector

tests/cvcuda/system/TestOpMorphology.cpp:126–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124
125template<class T, size_t rows, size_t cols>
126void 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
137template<class T, size_t rows, size_t cols>
138bool MatchTensorToTestVector(const uchar checkVals[rows][cols], int width, int height, nvcv::Tensor &Tensor, int sample)

Callers

nothing calls this directly

Calls 2

numCMethod · 0.80
exportDataMethod · 0.45

Tested by

no test coverage detected