aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/CLTensorAllocator.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-09-09 19:00:57 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-09-17 11:37:02 +0000
commit26014cf4d0519aef280c8444c60ec34c4e37e3b6 (patch)
tree7f4b3cb8589c10e95288a722498c9256e8bf5e22 /src/runtime/CL/CLTensorAllocator.cpp
parentcaa7deedfe1b0d0020c6099d8f616ec92b1bd5e9 (diff)
downloadComputeLibrary-26014cf4d0519aef280c8444c60ec34c4e37e3b6.tar.gz
COMPMID-2649: Generalize MemoryGroup.
Avoids any upcasting. Change-Id: I2181c7c9df59a7fb8a78e11934fbd96058fd39c7 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-on: https://review.mlplatform.org/c/1918 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src/runtime/CL/CLTensorAllocator.cpp')
-rw-r--r--src/runtime/CL/CLTensorAllocator.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/runtime/CL/CLTensorAllocator.cpp b/src/runtime/CL/CLTensorAllocator.cpp
index 72b5854c5c..60e1ca8df6 100644
--- a/src/runtime/CL/CLTensorAllocator.cpp
+++ b/src/runtime/CL/CLTensorAllocator.cpp
@@ -25,7 +25,6 @@
#include "arm_compute/core/Error.h"
#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/runtime/CL/CLMemoryGroup.h"
#include "arm_compute/runtime/CL/CLScheduler.h"
namespace arm_compute
@@ -104,8 +103,8 @@ void populate_quantization_info(CLFloatArray &scale, CLInt32Array &offset, const
}
} // namespace
-CLTensorAllocator::CLTensorAllocator(CLTensor *owner)
- : _associated_memory_group(nullptr), _memory(), _mapping(nullptr), _owner(owner), _scale(), _offset()
+CLTensorAllocator::CLTensorAllocator(IMemoryManageable *owner)
+ : _owner(owner), _associated_memory_group(nullptr), _memory(), _mapping(nullptr), _scale(), _offset()
{
}
@@ -143,7 +142,7 @@ void CLTensorAllocator::allocate()
}
else
{
- _associated_memory_group->finalize_memory(_owner, _memory, info().total_size());
+ _associated_memory_group->finalize_memory(_owner, _memory, info().total_size(), alignment());
}
// Allocate and fill the quantization parameter arrays
@@ -178,7 +177,7 @@ Status CLTensorAllocator::import_memory(cl::Buffer buffer)
return Status{};
}
-void CLTensorAllocator::set_associated_memory_group(CLMemoryGroup *associated_memory_group)
+void CLTensorAllocator::set_associated_memory_group(IMemoryGroup *associated_memory_group)
{
ARM_COMPUTE_ERROR_ON(associated_memory_group == nullptr);
ARM_COMPUTE_ERROR_ON(_associated_memory_group != nullptr && _associated_memory_group != associated_memory_group);