aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/CLMemory.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-11-14 13:16:56 +0000
committerIsabella Gottardi <isabella.gottardi@arm.com>2018-11-21 09:52:04 +0000
commitdf3103622b7de05f4e35b22a2c94b4a46eab4efc (patch)
tree17e10253e7a069c69d10bea0882b699b99d74b86 /arm_compute/runtime/CL/CLMemory.h
parentc47ef20d69e8ea0f519fdc679435cd7037fc18fe (diff)
downloadComputeLibrary-df3103622b7de05f4e35b22a2c94b4a46eab4efc.tar.gz
COMPMID-1088: Use IMemoryRegion in interfaces where possible
-Simplifies import memory interface -Changes the used of void** handles with appropriate interfaces. Change-Id: I5918c855c11f46352058864623336b352162a4b7
Diffstat (limited to 'arm_compute/runtime/CL/CLMemory.h')
-rw-r--r--arm_compute/runtime/CL/CLMemory.h20
1 files changed, 12 insertions, 8 deletions
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<IMemoryRegion> region) final;
private:
ICLMemoryRegion *_region;