24.02.1
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_CLTENSORALLOCATOR_H
25 #define ARM_COMPUTE_CLTENSORALLOCATOR_H
40 class CLRuntimeContext;
69 const cl::Buffer &
cl_data()
const;
85 uint8_t *
map(cl::CommandQueue &q,
bool blocking);
94 void unmap(cl::CommandQueue &q, uint8_t *mapping);
108 void free()
override;
142 uint8_t *lock()
override;
144 void unlock()
override;
147 static const cl::Buffer _empty_buffer;
uint8_t * data()
Interface to be implemented by the child class to return the pointer to the mapped data.
Interface of an object than can be memory managed.
void set_associated_memory_group(IMemoryGroup *associated_memory_group)
Associates the tensor with a memory group.
CLTensorAllocator & operator=(const CLTensorAllocator &)=delete
Prevent instances of this class from being copy assigned (As this class contains pointers)
CLQuantization quantization() const
Wrapped quantization info data accessor.
const cl::Buffer & cl_data() const
Interface to be implemented by the child class to return the pointer to the CL data.
CLTensorAllocator(IMemoryManageable *owner=nullptr, CLRuntimeContext *ctx=nullptr)
Default constructor.
Status import_memory(cl::Buffer buffer)
Import an existing memory as a tensor's backing memory.
OpenCL quantization data.
void unmap(cl::CommandQueue &q, uint8_t *mapping)
Enqueue an unmap operation of the allocated buffer on the given queue.
Wrapper to configure the Khronos OpenCL C++ header.
OpenCL implementation of memory object.
void allocate() override
Allocate size specified by TensorInfo of OpenCL memory.
static void set_global_allocator(IAllocator *allocator)
Sets global allocator that will be used by all CLTensor objects.
Basic implementation of a CL memory tensor allocator.
void free() override
Free allocated OpenCL memory.
Copyright (c) 2017-2024 Arm Limited.
Interface to allocate tensors.
uint8_t * map(cl::CommandQueue &q, bool blocking)
Enqueue a map operation of the allocated buffer on the given queue.
input allocator() -> allocate()