COMPMID-1002: Expose number of pools in PoolManager
Change-Id: I3b14bd87d0650dc4378dc3ccbd14274b9c019657
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124428
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/runtime/PoolManager.h b/arm_compute/runtime/PoolManager.h
index 6549350..5090805 100644
--- a/arm_compute/runtime/PoolManager.h
+++ b/arm_compute/runtime/PoolManager.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -56,12 +56,13 @@
IMemoryPool *lock_pool() override;
void unlock_pool(IMemoryPool *pool) override;
void register_pool(std::unique_ptr<IMemoryPool> pool) override;
+ size_t num_pools() const override;
private:
std::list<std::unique_ptr<IMemoryPool>> _free_pools; /**< List of free pools */
std::list<std::unique_ptr<IMemoryPool>> _occupied_pools; /**< List of occupied pools */
std::unique_ptr<arm_compute::Semaphore> _sem; /**< Semaphore to control the queues */
- arm_compute::Mutex _mtx; /**< Mutex to control access to the queues */
+ mutable arm_compute::Mutex _mtx; /**< Mutex to control access to the queues */
};
} // arm_compute
#endif /*__ARM_COMPUTE_POOLMANAGER_H__ */