MCPcopy Create free account
hub / github.com/KomputeProject/kompute / clear

Method clear

src/Manager.cpp:272–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272void
273Manager::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
295void
296Manager::createDevice(const std::vector<uint32_t>& familyQueueIndices,

Callers 4

TESTFunction · 0.45
TESTFunction · 0.45
destroyMethod · 0.45
~OpTensorSyncDeviceMethod · 0.45

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.36
TESTFunction · 0.36