From df3103622b7de05f4e35b22a2c94b4a46eab4efc Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 14 Nov 2018 13:16:56 +0000 Subject: COMPMID-1088: Use IMemoryRegion in interfaces where possible -Simplifies import memory interface -Changes the used of void** handles with appropriate interfaces. Change-Id: I5918c855c11f46352058864623336b352162a4b7 --- arm_compute/runtime/CL/CLMemory.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'arm_compute/runtime/CL/CLMemory.h') diff --git a/arm_compute/runtime/CL/CLMemory.h b/arm_compute/runtime/CL/CLMemory.h index edd9de8097..02d36614ae 100644 --- a/arm_compute/runtime/CL/CLMemory.h +++ b/arm_compute/runtime/CL/CLMemory.h @@ -24,6 +24,8 @@ #ifndef __ARM_COMPUTE_RUNTIME_CL_CLMEMORY_H__ #define __ARM_COMPUTE_RUNTIME_CL_CLMEMORY_H__ +#include "arm_compute/runtime/IMemory.h" + #include "arm_compute/core/CL/OpenCL.h" #include "arm_compute/runtime/CL/CLMemoryRegion.h" @@ -33,7 +35,7 @@ namespace arm_compute { /** OpenCL implementation of memory object */ -class CLMemory +class CLMemory : public IMemory { public: /** Default Constructor */ @@ -59,20 +61,22 @@ public: CLMemory(CLMemory &&) noexcept = default; /** Allow instances of this class to be move assigned */ CLMemory &operator=(CLMemory &&) noexcept = default; - /** Region accessor + /** OpenCL Region accessor * * @return Memory region */ - ICLMemoryRegion *region(); - /** Region accessor + ICLMemoryRegion *cl_region(); + /** OpenCL Region accessor * * @return Memory region */ - ICLMemoryRegion *region() const; + ICLMemoryRegion *cl_region() const; -private: - /** Creates empty region */ - void create_empty_region(); + // Inherited methods overridden: + IMemoryRegion *region() final; + IMemoryRegion *region() const final; + void set_region(IMemoryRegion *region) final; + void set_owned_region(std::unique_ptr region) final; private: ICLMemoryRegion *_region; -- cgit v1.2.1