| 172 | } |
| 173 | |
| 174 | std::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 | |
| 185 | std::shared_ptr<Tensor> Tensor::ReshapeTensor(Tensor &tensor, Shape shape, std::optional<nvcv::TensorLayout> layout) |
| 186 | { |
nothing calls this directly
no test coverage detected