aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h
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 /arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h
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 'arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h')
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h b/arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h
index b7067664fc..2cd842942e 100644
--- a/arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h
+++ b/arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -28,23 +28,20 @@
#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h"
#include "arm_compute/runtime/GLES_COMPUTE/GCMemory.h"
#include "arm_compute/runtime/ITensorAllocator.h"
-#include "arm_compute/runtime/MemoryGroupBase.h"
+#include "arm_compute/runtime/MemoryGroup.h"
#include <memory>
namespace arm_compute
{
class GCTensor;
-template <typename>
-class MemoryGroupBase;
-using GCMemoryGroup = MemoryGroupBase<GCTensor>;
/** Basic implementation of a GLES memory tensor allocator. */
class GCTensorAllocator : public ITensorAllocator
{
public:
/** Default constructor. */
- GCTensorAllocator(GCTensor *owner = nullptr);
+ GCTensorAllocator(IMemoryManageable *owner = nullptr);
/** Prevent instances of this class from being copied (As this class contains pointers) */
GCTensorAllocator(const GCTensorAllocator &) = delete;
@@ -109,7 +106,7 @@ public:
*
* @param[in] associated_memory_group Memory group to associate the tensor with
*/
- void set_associated_memory_group(GCMemoryGroup *associated_memory_group);
+ void set_associated_memory_group(IMemoryGroup *associated_memory_group);
protected:
/** Call map() on the SSBO.
@@ -122,10 +119,10 @@ protected:
void unlock() override;
private:
- GCMemoryGroup *_associated_memory_group; /**< Registered memory group */
- GCMemory _memory; /**< OpenGL ES memory */
- uint8_t *_mapping; /**< Pointer to the CPU mapping of the OpenGL ES buffer. */
- GCTensor *_owner; /**< Owner of the allocator */
+ IMemoryManageable *_owner; /**< Owner of the allocator */
+ IMemoryGroup *_associated_memory_group; /**< Registered memory group */
+ GCMemory _memory; /**< OpenGL ES memory */
+ uint8_t *_mapping; /**< Pointer to the CPU mapping of the OpenGL ES buffer. */
};
} // namespace arm_compute
#endif /* __ARM_COMPUTE_GCTENSORALLOCATOR_H__ */