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

Method WrapImage

python/mod_cvcuda/nvcv/Tensor.cpp:174–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174std::shared_ptr<Tensor> Tensor::WrapImage(Image &img)
175{
176 Tensor::Key key;
177 Cache::Instance().removeAllNotInUseMatching(key);
178
179 auto tensor = std::shared_ptr<Tensor>(new Tensor(img));
180
181 Cache::Instance().add(*tensor);
182 return tensor;
183}
184
185std::shared_ptr<Tensor> Tensor::ReshapeTensor(Tensor &tensor, Shape shape, std::optional<nvcv::TensorLayout> layout)
186{

Callers

nothing calls this directly

Calls 2

addMethod · 0.45

Tested by

no test coverage detected