diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-09-19 15:03:20 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | d9e5b19c87906390ed87efdada3b096a62888bf4 (patch) | |
tree | 6714eaa27629ddd4cd11ec5e00cb9be781e8bef0 /src/runtime/BlobLifetimeManager.cpp | |
parent | 5701e2a41ddf0a12042ac648993fc39701961f66 (diff) | |
download | ComputeLibrary-d9e5b19c87906390ed87efdada3b096a62888bf4.tar.gz |
COMPMID-417: Fix in BlobMemoryPool and BlobLifetimeManager
-Removes invalid error check as multiple handles can be applied to the
same blob.
-Calculate group mappings and update blobs using the active_elements
instead of the finalized group to allow reusability of blobs of
non-overlapping subgroups of the same group.
Change-Id: I21eee7a47829f751280a7b8dc1e831fff1b0ef41
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88279
Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'src/runtime/BlobLifetimeManager.cpp')
-rw-r--r-- | src/runtime/BlobLifetimeManager.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/runtime/BlobLifetimeManager.cpp b/src/runtime/BlobLifetimeManager.cpp index c60d8c14ef..69292b9319 100644 --- a/src/runtime/BlobLifetimeManager.cpp +++ b/src/runtime/BlobLifetimeManager.cpp @@ -118,14 +118,13 @@ void BlobLifetimeManager::update_blobs_and_mappings() ARM_COMPUTE_ERROR_ON(!are_all_finalized()); ARM_COMPUTE_ERROR_ON(_active_group == nullptr); - // Sort finalized group requirements in descending order - auto group = _finalized_groups[_active_group]; - std::sort(std::begin(group), std::end(group), [](const Element & a, const Element & b) + // Sort active group requirements in descending order + std::sort(std::begin(_active_elements), std::end(_active_elements), [](const Element & a, const Element & b) { return a.size > b.size; }); std::vector<size_t> group_sizes; - std::transform(std::begin(group), std::end(group), std::back_inserter(group_sizes), [](const Element & e) + std::transform(std::begin(_active_elements), std::end(_active_elements), std::back_inserter(group_sizes), [](const Element & e) { return e.size; }); @@ -142,7 +141,7 @@ void BlobLifetimeManager::update_blobs_and_mappings() // Calculate group mappings auto &group_mappings = _active_group->mappings(); int blob_idx = 0; - for(auto &e : group) + for(auto &e : _active_elements) { group_mappings[e.handle] = blob_idx++; } |