| 161 | } |
| 162 | |
| 163 | void TensorBatch::pushBackMany(std::vector<std::shared_ptr<Tensor>> &tensorList) |
| 164 | { |
| 165 | std::vector<nvcv::Tensor> nvcvTensors; |
| 166 | nvcvTensors.reserve(tensorList.size()); |
| 167 | for (auto &tensor : tensorList) |
| 168 | { |
| 169 | m_list.push_back(tensor); |
| 170 | if (tensor) |
| 171 | nvcvTensors.push_back(tensor->impl()); |
| 172 | else |
| 173 | nvcvTensors.push_back(nvcv::Tensor()); |
| 174 | } |
| 175 | m_impl.pushBack(nvcvTensors.begin(), nvcvTensors.end()); |
| 176 | } |
| 177 | |
| 178 | void TensorBatch::popBack(int tensorCount) |
| 179 | { |