diff options
Diffstat (limited to 'src/runtime/BlobMemoryPool.cpp')
-rw-r--r-- | src/runtime/BlobMemoryPool.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/runtime/BlobMemoryPool.cpp b/src/runtime/BlobMemoryPool.cpp index 88bb421e34..a2f63ef52b 100644 --- a/src/runtime/BlobMemoryPool.cpp +++ b/src/runtime/BlobMemoryPool.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -27,7 +27,6 @@ #include "arm_compute/runtime/IAllocator.h" #include "arm_compute/runtime/IMemoryPool.h" #include "arm_compute/runtime/Types.h" -#include "support/MemorySupport.h" #include <vector> @@ -42,14 +41,13 @@ BlobMemoryPool::BlobMemoryPool(IAllocator *allocator, std::vector<BlobInfo> blob BlobMemoryPool::~BlobMemoryPool() { - ARM_COMPUTE_ERROR_ON(!_allocator); free_blobs(); } void BlobMemoryPool::acquire(MemoryMappings &handles) { // Set memory to handlers - for(auto &handle : handles) + for (auto &handle : handles) { ARM_COMPUTE_ERROR_ON(handle.first == nullptr); handle.first->set_region(_blobs[handle.second].get()); @@ -58,7 +56,7 @@ void BlobMemoryPool::acquire(MemoryMappings &handles) void BlobMemoryPool::release(MemoryMappings &handles) { - for(auto &handle : handles) + for (auto &handle : handles) { ARM_COMPUTE_ERROR_ON(handle.first == nullptr); handle.first->set_region(nullptr); @@ -73,14 +71,14 @@ MappingType BlobMemoryPool::mapping_type() const std::unique_ptr<IMemoryPool> BlobMemoryPool::duplicate() { ARM_COMPUTE_ERROR_ON(!_allocator); - return support::cpp14::make_unique<BlobMemoryPool>(_allocator, _blob_info); + return std::make_unique<BlobMemoryPool>(_allocator, _blob_info); } void BlobMemoryPool::allocate_blobs(const std::vector<BlobInfo> &blob_info) { ARM_COMPUTE_ERROR_ON(!_allocator); - for(const auto &bi : blob_info) + for (const auto &bi : blob_info) { _blobs.push_back(_allocator->make_region(bi.size, bi.alignment)); } |