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