ArmNN
 20.02
OutputHandler Class Reference

#include <OutputHandler.hpp>

Public Member Functions

void SetTensorInfo (const TensorInfo &tensorInfo)
 
  • Sets the TensorInfo used by this output handler.
More...
 
void CreateTensorHandles (const IWorkloadFactory &factory, const bool IsMemoryManaged=true)
 
  • Creates tensor handles used by the intermediate tensors.
More...
 
void CreateTensorHandles (const ITensorHandleFactory &factory, const bool IsMemoryManaged=true)
 
const TensorInfoGetTensorInfo () const
  More...
 
ITensorHandleGetData () const
 
  • Gets the allocated tensor memory.
More...
 
void CollectWorkloadOutputs (WorkloadDataCollector &dataCollector) const
 Fill the outputs for a given queue descriptor. More...
 
void SetData (std::unique_ptr< ITensorHandle > data)
 
bool IsTensorInfoSet () const
 Returns true if SetTensorInfo() has been called at least once on this. More...
 

Detailed Description

Definition at line 30 of file OutputHandler.hpp.

Member Function Documentation

◆ CollectWorkloadOutputs()

void CollectWorkloadOutputs ( WorkloadDataCollector dataCollector) const

Fill the outputs for a given queue descriptor.

Definition at line 33 of file OutputHandler.cpp.

References WorkloadDataCollector::Push().

Referenced by OutputHandler::GetData().

34 {
35  dataCollector.Push(m_TensorHandle.get(), m_TensorInfo);
36 }

◆ CreateTensorHandles() [1/2]

void CreateTensorHandles ( const IWorkloadFactory factory,
const bool  IsMemoryManaged = true 
)

  • Creates tensor handles used by the intermediate tensors.

Does not allocate memory.

Parameters
factory- Factory to be used for handler creation.

Definition at line 23 of file OutputHandler.cpp.

References IWorkloadFactory::CreateTensorHandle().

Referenced by Layer::CreateTensorHandles().

24 {
25  m_TensorHandle = factory.CreateTensorHandle(m_TensorInfo, IsMemoryManaged);
26 }

◆ CreateTensorHandles() [2/2]

void CreateTensorHandles ( const ITensorHandleFactory factory,
const bool  IsMemoryManaged = true 
)

Definition at line 28 of file OutputHandler.cpp.

References ITensorHandleFactory::CreateTensorHandle().

29 {
30  m_TensorHandle = factory.CreateTensorHandle(m_TensorInfo, IsMemoryManaged);
31 }

◆ GetData()

ITensorHandle* GetData ( ) const
inline

  • Gets the allocated tensor memory.

Returns
- Pointer to the tensor memory.

Definition at line 48 of file OutputHandler.hpp.

References OutputHandler::CollectWorkloadOutputs().

Referenced by ConcatLayer::CreateWorkload(), and SplitterLayer::CreateWorkload().

48 { return m_TensorHandle.get(); }

◆ GetTensorInfo()

const TensorInfo& GetTensorInfo ( ) const
inline

Returns
- References to the output TensorInfo.

Definition at line 44 of file OutputHandler.hpp.

Referenced by ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), PermuteAsReshapeImpl::Run(), TransposeAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), and FoldPadIntoConvolution2dImpl::Run().

44 { return m_TensorInfo; }

◆ IsTensorInfoSet()

bool IsTensorInfoSet ( ) const
inline

Returns true if SetTensorInfo() has been called at least once on this.

Definition at line 56 of file OutputHandler.hpp.

56 { return m_bTensorInfoSet; }

◆ SetData()

void SetData ( std::unique_ptr< ITensorHandle data)
inline

Definition at line 53 of file OutputHandler.hpp.

Referenced by ConcatLayer::CreateWorkload().

53 { m_TensorHandle = std::move(data); }

◆ SetTensorInfo()

void SetTensorInfo ( const TensorInfo tensorInfo)

  • Sets the TensorInfo used by this output handler.

Parameters
tensorInfo- TensorInfo for the output.

Definition at line 17 of file OutputHandler.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), InputSlot::Insert(), TransposeAsReshapeImpl::Run(), PermuteAsReshapeImpl::Run(), FoldPadIntoConvolution2dImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), MoveTransposeUpImpl::Run(), and MovePermuteUpImpl::Run().

18 {
19  m_TensorInfo = tensorInfo;
20  m_bTensorInfoSet = true;
21 }

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