24 #ifndef ARM_COMPUTE_TENSORALLOCATOR_H 25 #define ARM_COMPUTE_TENSORALLOCATOR_H 79 uint8_t *
data()
const;
119 uint8_t *lock()
override;
122 void unlock()
override;
CPU implementation of memory object.
Basic implementation of a CPU memory tensor allocator.
void init(const TensorAllocator &allocator, const Coordinates &coords, TensorInfo &sub_info)
Shares the same backing memory with another tensor allocator, while the tensor info might be differen...
uint8_t * data() const
Returns the pointer to the allocated data.
void init(const TensorInfo &input, size_t alignment=0)
Initialize a tensor based on the passed TensorInfo.
Copyright (c) 2017-2021 Arm Limited.
~TensorAllocator()
Default destructor.
void allocate() override
Allocate size specified by TensorInfo of CPU memory.
void free() override
Free allocated CPU memory.
input allocator() -> allocate()
TensorAllocator(IMemoryManageable *owner)
Default constructor.
Interface of an object than can be memory managed.
Status import_memory(void *memory)
Import an existing memory as a tensor's backing memory.
Store the tensor's metadata.
void set_associated_memory_group(IMemoryGroup *associated_memory_group)
Associates the tensor with a memory group.
Interface to allocate tensors.
TensorAllocator & operator=(const TensorAllocator &)=delete
Prevent instances of this class from being copy assigned (As this class contains pointers) ...