ArmNN
 22.11
TosaRefTensorHandleFactory Class Reference

#include <TosaRefTensorHandleFactory.hpp>

Inheritance diagram for TosaRefTensorHandleFactory:
ITensorHandleFactory

Public Member Functions

 TosaRefTensorHandleFactory (std::shared_ptr< TosaRefMemoryManager > mgr)
 
std::unique_ptr< ITensorHandleCreateSubTensorHandle (ITensorHandle &parent, TensorShape const &subTensorShape, unsigned int const *subTensorOrigin) const override
 
std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo) const override
 
std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo, DataLayout dataLayout) const override
 
std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo, const bool IsMemoryManaged) const override
 Utility Functions for backends which require TensorHandles to have unmanaged memory. More...
 
std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo, DataLayout dataLayout, const bool IsMemoryManaged) const override
 
const FactoryIdGetId () const override
 
bool SupportsSubTensors () const override
 
MemorySourceFlags GetExportFlags () const override
 
MemorySourceFlags GetImportFlags () const override
 
- Public Member Functions inherited from ITensorHandleFactory
virtual ~ITensorHandleFactory ()
 Some TensorHandleFactory decisions are deferred to run-time. More...
 
virtual bool SupportsInPlaceComputation () const
 
virtual bool SupportsMapUnmap () const
 
virtual std::vector< CapabilityGetCapabilities (const IConnectableLayer *layer, const IConnectableLayer *connectedLayer, CapabilityClass capabilityClass)
 

Static Public Member Functions

static const FactoryIdGetIdStatic ()
 

Additional Inherited Members

- Public Types inherited from ITensorHandleFactory
using FactoryId = std::string
 
- Static Public Attributes inherited from ITensorHandleFactory
static const FactoryId LegacyFactoryId = "armnn_legacy_factory"
 
static const FactoryId DeferredFactoryId = "armnn_deferred_factory"
 Use the workload factory to create the tensor handle. More...
 

Detailed Description

Definition at line 17 of file TosaRefTensorHandleFactory.hpp.

Constructor & Destructor Documentation

◆ TosaRefTensorHandleFactory()

Member Function Documentation

◆ CreateSubTensorHandle()

std::unique_ptr< ITensorHandle > CreateSubTensorHandle ( ITensorHandle parent,
TensorShape const &  subTensorShape,
unsigned int const *  subTensorOrigin 
) const
overridevirtual

Implements ITensorHandleFactory.

Definition at line 22 of file TosaRefTensorHandleFactory.cpp.

References armnn::IgnoreUnused().

Referenced by TosaRefTensorHandleFactory::TosaRefTensorHandleFactory().

26 {
27  IgnoreUnused(parent, subTensorShape, subTensorOrigin);
28  return nullptr;
29 }
void IgnoreUnused(Ts &&...)

◆ CreateTensorHandle() [1/4]

std::unique_ptr< ITensorHandle > CreateTensorHandle ( const TensorInfo tensorInfo) const
overridevirtual

Implements ITensorHandleFactory.

Definition at line 31 of file TosaRefTensorHandleFactory.cpp.

Referenced by TosaRefTensorHandleFactory::TosaRefTensorHandleFactory().

32 {
33  return std::make_unique<TosaRefTensorHandle>(tensorInfo, m_MemoryManager);
34 }

◆ CreateTensorHandle() [2/4]

std::unique_ptr< ITensorHandle > CreateTensorHandle ( const TensorInfo tensorInfo,
DataLayout  dataLayout 
) const
overridevirtual

Implements ITensorHandleFactory.

Definition at line 36 of file TosaRefTensorHandleFactory.cpp.

References armnn::IgnoreUnused().

38 {
39  IgnoreUnused(dataLayout);
40  return std::make_unique<TosaRefTensorHandle>(tensorInfo, m_MemoryManager);
41 }
void IgnoreUnused(Ts &&...)

◆ CreateTensorHandle() [3/4]

std::unique_ptr< ITensorHandle > CreateTensorHandle ( const TensorInfo tensorInfo,
const bool  IsMemoryManaged 
) const
overridevirtual

Utility Functions for backends which require TensorHandles to have unmanaged memory.

These should be overloaded if required to facilitate direct import of input tensors and direct export of output tensors.

Reimplemented from ITensorHandleFactory.

Definition at line 43 of file TosaRefTensorHandleFactory.cpp.

45 {
46  if (IsMemoryManaged)
47  {
48  return std::make_unique<TosaRefTensorHandle>(tensorInfo, m_MemoryManager);
49  }
50  else
51  {
52  return std::make_unique<TosaRefTensorHandle>(tensorInfo, m_ImportFlags);
53  }
54 }

◆ CreateTensorHandle() [4/4]

std::unique_ptr< ITensorHandle > CreateTensorHandle ( const TensorInfo tensorInfo,
DataLayout  dataLayout,
const bool  IsMemoryManaged 
) const
overridevirtual

Reimplemented from ITensorHandleFactory.

Definition at line 56 of file TosaRefTensorHandleFactory.cpp.

References armnn::IgnoreUnused().

59 {
60  IgnoreUnused(dataLayout);
61  if (IsMemoryManaged)
62  {
63  return std::make_unique<TosaRefTensorHandle>(tensorInfo, m_MemoryManager);
64  }
65  else
66  {
67  return std::make_unique<TosaRefTensorHandle>(tensorInfo, m_ImportFlags);
68  }
69 }
void IgnoreUnused(Ts &&...)

◆ GetExportFlags()

MemorySourceFlags GetExportFlags ( ) const
overridevirtual

Reimplemented from ITensorHandleFactory.

Definition at line 81 of file TosaRefTensorHandleFactory.cpp.

Referenced by TosaRefTensorHandleFactory::TosaRefTensorHandleFactory().

82 {
83  return m_ExportFlags;
84 }

◆ GetId()

const FactoryId & GetId ( ) const
overridevirtual

◆ GetIdStatic()

const FactoryId & GetIdStatic ( )
static

◆ GetImportFlags()

MemorySourceFlags GetImportFlags ( ) const
overridevirtual

Reimplemented from ITensorHandleFactory.

Definition at line 86 of file TosaRefTensorHandleFactory.cpp.

Referenced by TosaRefTensorHandleFactory::TosaRefTensorHandleFactory().

87 {
88  return m_ImportFlags;
89 }

◆ SupportsSubTensors()

bool SupportsSubTensors ( ) const
overridevirtual

Implements ITensorHandleFactory.

Definition at line 76 of file TosaRefTensorHandleFactory.cpp.

Referenced by TosaRefTensorHandleFactory::TosaRefTensorHandleFactory().

77 {
78  return false;
79 }

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