21 std::shared_ptr<SampleMemoryManager> &memoryManager,
26 virtual void Manage()
override;
35 virtual const void*
Map(
bool )
const override;
38 virtual void Unmap()
const override 64 void* GetPointer()
const;
71 std::shared_ptr<SampleMemoryManager> m_MemoryManager;
73 mutable void *m_UnmanagedMemory;
virtual ITensorHandle * GetParent() const override
Get the parent tensor if this is a subtensor.
virtual const void * Map(bool) const override
Map the tensor data for access.
const TensorShape & GetShape() const
TensorShape GetStrides() const override
Get the strides for each dimension ordered from largest to smallest where the smallest value is the s...
SampleTensorHandle(const TensorInfo &tensorInfo, std::shared_ptr< SampleMemoryManager > &memoryManager)
virtual MemorySourceFlags GetImportFlags() const override
Get flags describing supported import sources.
unsigned int MemorySourceFlags
TensorShape GetShape() const override
Get the number of elements for each dimension ordered from slowest iterating dimension to fastest ite...
const TensorInfo & GetTensorInfo() const
Copyright (c) 2020 ARM Limited.
virtual void Allocate() override
Indicate to the memory manager that this resource is no longer active.
virtual void Manage() override
Indicate to the memory manager that this resource is active.
virtual void Unmap() const override
Unmap the tensor data.
TensorShape GetUnpaddedTensorStrides(const TensorInfo &tensorInfo)
virtual const void * Map(bool blocking=true) const =0
Map the tensor data for access.
virtual bool Import(void *memory, MemorySource source) override
Import externally allocated memory.