| 270 | } |
| 271 | |
| 272 | void |
| 273 | Manager::clear() |
| 274 | { |
| 275 | if (this->mManageResources) { |
| 276 | this->mManagedTensors.erase( |
| 277 | std::remove_if(begin(this->mManagedTensors), |
| 278 | end(this->mManagedTensors), |
| 279 | [](std::weak_ptr<Tensor> t) { return t.expired(); }), |
| 280 | end(this->mManagedTensors)); |
| 281 | this->mManagedAlgorithms.erase( |
| 282 | std::remove_if( |
| 283 | begin(this->mManagedAlgorithms), |
| 284 | end(this->mManagedAlgorithms), |
| 285 | [](std::weak_ptr<Algorithm> t) { return t.expired(); }), |
| 286 | end(this->mManagedAlgorithms)); |
| 287 | this->mManagedSequences.erase( |
| 288 | std::remove_if(begin(this->mManagedSequences), |
| 289 | end(this->mManagedSequences), |
| 290 | [](std::weak_ptr<Sequence> t) { return t.expired(); }), |
| 291 | end(this->mManagedSequences)); |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | void |
| 296 | Manager::createDevice(const std::vector<uint32_t>& familyQueueIndices, |