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>
diff --git a/src/runtime/GLES_COMPUTE/GCTensorAllocator.cpp b/src/runtime/GLES_COMPUTE/GCTensorAllocator.cpp
index 9a5d139..cccc6a7 100644
--- a/src/runtime/GLES_COMPUTE/GCTensorAllocator.cpp
+++ b/src/runtime/GLES_COMPUTE/GCTensorAllocator.cpp
@@ -32,8 +32,8 @@
using namespace arm_compute;
-GCTensorAllocator::GCTensorAllocator(GCTensor *owner)
- : _associated_memory_group(nullptr), _memory(), _mapping(nullptr), _owner(owner)
+GCTensorAllocator::GCTensorAllocator(IMemoryManageable *owner)
+ : _owner(owner), _associated_memory_group(nullptr), _memory(), _mapping(nullptr)
{
}
@@ -50,7 +50,7 @@
}
else
{
- _associated_memory_group->finalize_memory(_owner, _memory, info().total_size());
+ _associated_memory_group->finalize_memory(_owner, _memory, info().total_size(), alignment());
}
info().set_is_resizable(false);
}
@@ -62,7 +62,7 @@
info().set_is_resizable(true);
}
-void GCTensorAllocator::set_associated_memory_group(GCMemoryGroup *associated_memory_group)
+void GCTensorAllocator::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);