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/CLTensorAllocator.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'arm_compute/runtime/CL/CLTensorAllocator.h') diff --git a/arm_compute/runtime/CL/CLTensorAllocator.h b/arm_compute/runtime/CL/CLTensorAllocator.h index a372195555..de5f482d05 100644 --- a/arm_compute/runtime/CL/CLTensorAllocator.h +++ b/arm_compute/runtime/CL/CLTensorAllocator.h @@ -103,17 +103,13 @@ public: void free() override; /** Import an existing memory as a tensor's backing memory * - * @warning If the tensor is flagged to be managed by a memory manager, - * this call will lead to an error. - * @warning Ownership of memory depends on the way the @ref CLMemory object was constructed - * @note Calling free on a tensor with imported memory will just clear - * the internal pointer value. + * @warning ownership of memory is not transferred * - * @param[in] memory Memory to import + * @param[in] buffer Buffer to import * * @return error status */ - arm_compute::Status import_memory(CLMemory memory); + arm_compute::Status import_memory(cl::Buffer buffer); /** Associates the tensor with a memory group * * @param[in] associated_memory_group Memory group to associate the tensor with @@ -129,9 +125,13 @@ protected: /** Call unmap() on the OpenCL buffer. */ void unlock() override; +private: + static const cl::Buffer _empty_buffer; + private: CLMemoryGroup *_associated_memory_group; /**< Registered memory manager */ CLMemory _memory; /**< OpenCL memory */ + uint8_t *_mapping; /**< Pointer to the CPU mapping of the OpenCL buffer. */ CLTensor *_owner; /**< Owner of the allocator */ }; } // namespace arm_compute -- cgit v1.2.1