ArmNN
 21.02
ConstPassthroughCpuTensorHandle Class Reference

#include <CpuTensorHandle.hpp>

Inheritance diagram for ConstPassthroughCpuTensorHandle:
ConstCpuTensorHandle ITensorHandle

Public Member Functions

 ConstPassthroughCpuTensorHandle (const TensorInfo &tensorInfo, const void *mem)
 
virtual void Allocate () override
 Indicate to the memory manager that this resource is no longer active. More...
 
- Public Member Functions inherited from ConstCpuTensorHandle
template<typename T >
const T * GetConstTensor () const
 
const TensorInfoGetTensorInfo () const
 
virtual void Manage () override
 Indicate to the memory manager that this resource is active. More...
 
virtual ITensorHandleGetParent () const override
 Get the parent tensor if this is a subtensor. More...
 
virtual const void * Map (bool) const override
 Map the tensor data for access. More...
 
virtual void Unmap () const override
 Unmap the tensor data. More...
 
TensorShape GetStrides () const override
 Get the strides for each dimension ordered from largest to smallest where the smallest value is the same as the size of a single element in the tensor. More...
 
TensorShape GetShape () const override
 Get the number of elements for each dimension ordered from slowest iterating dimension to fastest iterating dimension. More...
 
template<>
const void * GetConstTensor () const
 
template<>
const void * GetConstTensor () const
 
- Public Member Functions inherited from ITensorHandle
virtual ~ITensorHandle ()
 
void * Map (bool blocking=true)
 Map the tensor data for access. More...
 
void Unmap ()
 Unmap the tensor data that was previously mapped with call to Map(). More...
 
virtual unsigned int GetImportFlags () const
 Get flags describing supported import sources. More...
 
virtual bool Import (void *memory, MemorySource source)
 Import externally allocated memory. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ConstCpuTensorHandle
 ConstCpuTensorHandle (const TensorInfo &tensorInfo)
 
void SetConstMemory (const void *mem)
 

Detailed Description

Definition at line 157 of file CpuTensorHandle.hpp.

Constructor & Destructor Documentation

◆ ConstPassthroughCpuTensorHandle()

ConstPassthroughCpuTensorHandle ( const TensorInfo tensorInfo,
const void *  mem 
)
inline

Definition at line 160 of file CpuTensorHandle.hpp.

References ITensorHandle::Allocate(), ConstCpuTensorHandle::GetConstTensor(), CpuTensorHandle::GetTensor(), and ConstCpuTensorHandle::SetConstMemory().

161  : ConstCpuTensorHandle(tensorInfo)
162  {
163  SetConstMemory(mem);
164  }
ConstCpuTensorHandle(const TensorInfo &tensorInfo)
void SetConstMemory(const void *mem)

Member Function Documentation

◆ Allocate()

void Allocate ( )
overridevirtual

Indicate to the memory manager that this resource is no longer active.

This is used to compute overlapping lifetimes of resources.

Implements ITensorHandle.

Definition at line 136 of file CpuTensorHandle.cpp.

137 {
138  throw InvalidArgumentException("ConstPassthroughCpuTensorHandle::Allocate() should never be called");
139 }

The documentation for this class was generated from the following files: