diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-11-14 13:16:56 +0000 |
---|---|---|
committer | Isabella Gottardi <isabella.gottardi@arm.com> | 2018-11-21 09:52:04 +0000 |
commit | df3103622b7de05f4e35b22a2c94b4a46eab4efc (patch) | |
tree | 17e10253e7a069c69d10bea0882b699b99d74b86 /arm_compute/runtime/Memory.h | |
parent | c47ef20d69e8ea0f519fdc679435cd7037fc18fe (diff) | |
download | ComputeLibrary-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/Memory.h')
-rw-r--r-- | arm_compute/runtime/Memory.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/arm_compute/runtime/Memory.h b/arm_compute/runtime/Memory.h index 2dadccf254..6f5254a689 100644 --- a/arm_compute/runtime/Memory.h +++ b/arm_compute/runtime/Memory.h @@ -24,6 +24,8 @@ #ifndef __ARM_COMPUTE_MEMORY_H__ #define __ARM_COMPUTE_MEMORY_H__ +#include "arm_compute/runtime/IMemory.h" + #include "arm_compute/runtime/IMemoryRegion.h" #include <cstddef> @@ -32,7 +34,7 @@ namespace arm_compute { /** CPU implementation of memory object */ -class Memory +class Memory : public IMemory { public: /** Default Constructor */ @@ -58,24 +60,16 @@ public: Memory(Memory &&) noexcept = default; /** Allow instances of this class to be move assigned */ Memory &operator=(Memory &&) noexcept = default; - /** Region accessor - * - * @return Memory region - */ - IMemoryRegion *region(); - /** Region accessor - * - * @return Memory region - */ - IMemoryRegion *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: IMemoryRegion *_region; std::shared_ptr<IMemoryRegion> _region_owned; }; -} +} // namespace arm_compute #endif /* __ARM_COMPUTE_MEMORY_H__ */ |