24.02
|
Go to the documentation of this file.
24 virtual void Manage()
override;
33 virtual const void*
Map(
bool )
const override;
36 virtual void Unmap()
const override
64 void CopyOutTo(
void*)
const override;
65 void CopyInFrom(
const void*)
override;
67 void* GetPointer()
const;
74 std::shared_ptr<TosaRefMemoryManager> m_MemoryManager;
76 mutable void* m_UnmanagedMemory;
79 bool m_IsImportEnabled;
virtual const void * Map(bool) const override
Map the tensor data for access.
TensorShape GetStrides() const override
Get the strides for each dimension ordered from largest to smallest where the smallest value is the s...
TosaRefTensorHandle(const TensorInfo &tensorInfo, std::shared_ptr< TosaRefMemoryManager > &memoryManager)
unsigned int MemorySourceFlags
TensorShape GetUnpaddedTensorStrides(const TensorInfo &tensorInfo)
virtual void Allocate() override
Indicate to the memory manager that this resource is no longer active.
virtual bool CanBeImported(void *memory, MemorySource source) override
Implementations must determine if this memory block can be imported.
virtual bool Import(void *memory, MemorySource source) override
Import externally allocated memory.
virtual MemorySourceFlags GetImportFlags() const override
Get flags describing supported import sources.
virtual void Unmap() const override
Unmap the tensor data.
TensorShape GetShape() const override
Get the number of elements for each dimension ordered from slowest iterating dimension to fastest ite...
const TensorInfo & GetTensorInfo() const
virtual void Manage() override
Indicate to the memory manager that this resource is active.
const TensorShape & GetShape() const
MemorySource
Define the Memory Source to reduce copies.
Copyright (c) 2021 ARM Limited and Contributors.
virtual ITensorHandle * GetParent() const override
Get the parent tensor if this is a subtensor.
virtual const void * Map(bool blocking=true) const =0
Map the tensor data for access.