aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/BufferManager.hpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-11-05 11:47:40 +0000
committerJim Flynn Arm <jim.flynn@arm.com>2019-11-05 14:27:39 +0000
commit2ffcc4179648bbd6fb08342969391a2bcd027221 (patch)
treef5d06780073bf8354a6b0195dca9961dc1f03ed5 /src/profiling/BufferManager.hpp
parentb67f95796b03c1a5d3b3fa6a40f6baf85bdd09cb (diff)
downloadarmnn-2ffcc4179648bbd6fb08342969391a2bcd027221.tar.gz
IVGCVSW-4065 Refactor the IPacketBuffer smart pointers
* Added convenience "using" statement for the unique pointers to IPacketBuffer * Replaced all the occurrencies in the code Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Iffec3a425ffbc1ecb23012971563a48139eb32eb
Diffstat (limited to 'src/profiling/BufferManager.hpp')
-rw-r--r--src/profiling/BufferManager.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/profiling/BufferManager.hpp b/src/profiling/BufferManager.hpp
index 04a1507512..afa4240f14 100644
--- a/src/profiling/BufferManager.hpp
+++ b/src/profiling/BufferManager.hpp
@@ -24,25 +24,25 @@ public:
~BufferManager() {}
- std::unique_ptr<IPacketBuffer> Reserve(unsigned int requestedSize, unsigned int& reservedSize) override;
+ IPacketBufferPtr Reserve(unsigned int requestedSize, unsigned int& reservedSize) override;
- void Commit(std::unique_ptr<IPacketBuffer>& packetBuffer, unsigned int size) override;
+ void Commit(IPacketBufferPtr& packetBuffer, unsigned int size) override;
- void Release(std::unique_ptr<IPacketBuffer>& packetBuffer) override;
+ void Release(IPacketBufferPtr& packetBuffer) override;
- std::unique_ptr<IPacketBuffer> GetReadableBuffer() override;
+ IPacketBufferPtr GetReadableBuffer() override;
- void MarkRead(std::unique_ptr<IPacketBuffer>& packetBuffer) override;
+ void MarkRead(IPacketBufferPtr& packetBuffer) override;
private:
// Maximum buffer size
unsigned int m_MaxBufferSize;
// List of available packet buffers
- std::vector<std::unique_ptr<IPacketBuffer>> m_AvailableList;
+ std::vector<IPacketBufferPtr> m_AvailableList;
// List of readable packet buffers
- std::vector<std::unique_ptr<IPacketBuffer>> m_ReadableList;
+ std::vector<IPacketBufferPtr> m_ReadableList;
// Mutex for available packet buffer list
std::mutex m_AvailableMutex;