aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/CLTensorAllocator.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/CLTensorAllocator.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/CLTensorAllocator.h')
-rw-r--r--arm_compute/runtime/CL/CLTensorAllocator.h14
1 files changed, 7 insertions, 7 deletions
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
@@ -130,8 +126,12 @@ protected:
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