MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / register_pool

Method register_pool

src/runtime/PoolManager.cpp:61–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void PoolManager::register_pool(std::unique_ptr<IMemoryPool> pool)
62{
63 arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
64 ARM_COMPUTE_ERROR_ON_MSG(!_occupied_pools.empty(), "All pools should be free in order to register a new one!");
65
66 // Set pool
67 _free_pools.push_front(std::move(pool));
68
69 // Update semaphore
70 _sem = std::make_unique<arm_compute::Semaphore>(_free_pools.size());
71}
72
73std::unique_ptr<IMemoryPool> PoolManager::release_pool()
74{

Callers 1

populateMethod · 0.80

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected