ArmNN
 24.08
sdb Namespace Reference

Classes

class  SampleDynamicAdditionWorkload
 
class  SampleDynamicLayerSupport
 
class  SampleDynamicTensorHandleFactory
 
class  SampleDynamicWorkloadFactory
 
class  SampleMemoryManager
 
class  SampleTensorHandle
 

Typedefs

using FactoryId = armnn::ITensorHandleFactory::FactoryId
 

Functions

const armnn::TensorInfoGetTensorInfo (const armnn::ITensorHandle *tensorHandle)
 
const float * GetInputTensorData (unsigned int idx, const armnn::AdditionQueueDescriptor &data)
 
float * GetOutputTensorData (unsigned int idx, const armnn::AdditionQueueDescriptor &data)
 
constexpr const char * SampleDynamicBackendId ()
 
constexpr const char * SampleDynamicTensorHandleFactoryId ()
 

Typedef Documentation

◆ FactoryId

Function Documentation

◆ GetInputTensorData()

const float* sdb::GetInputTensorData ( unsigned int  idx,
const armnn::AdditionQueueDescriptor data 
)

Definition at line 22 of file SampleDynamicAdditionWorkload.cpp.

23 {
24  const armnn::ITensorHandle* tensorHandle = data.m_Inputs[idx];
25  return reinterpret_cast<const float*>(tensorHandle->Map());
26 }

References QueueDescriptor::m_Inputs, and ITensorHandle::Map().

Referenced by SampleDynamicAdditionWorkload::Execute().

◆ GetOutputTensorData()

float* sdb::GetOutputTensorData ( unsigned int  idx,
const armnn::AdditionQueueDescriptor data 
)

Definition at line 28 of file SampleDynamicAdditionWorkload.cpp.

29 {
30  armnn::ITensorHandle* tensorHandle = data.m_Outputs[idx];
31  return reinterpret_cast<float*>(tensorHandle->Map());
32 }

References QueueDescriptor::m_Outputs, and ITensorHandle::Map().

Referenced by SampleDynamicAdditionWorkload::Execute().

◆ GetTensorInfo()

const armnn::TensorInfo& sdb::GetTensorInfo ( const armnn::ITensorHandle tensorHandle)
inline

Definition at line 14 of file SampleDynamicAdditionWorkload.cpp.

15 {
16  // We know that reference workloads use RefTensorHandles for inputs and outputs
17  const SampleTensorHandle* sampleTensorHandle =
18  static_cast<const SampleTensorHandle*>(tensorHandle);
19  return sampleTensorHandle->GetTensorInfo();
20 }

References SampleTensorHandle::GetTensorInfo().

Referenced by SampleDynamicAdditionWorkload::Execute().

◆ SampleDynamicBackendId()

constexpr const char* sdb::SampleDynamicBackendId ( )
constexpr

Definition at line 20 of file SampleDynamicBackend.cpp.

20 { return "SampleDynamic"; }

◆ SampleDynamicTensorHandleFactoryId()

constexpr const char* sdb::SampleDynamicTensorHandleFactoryId ( )
constexpr

Definition at line 15 of file SampleDynamicTensorHandleFactory.hpp.

15 { return "Arm/SampleDynamic/TensorHandleFactory"; }

Referenced by SampleDynamicTensorHandleFactory::GetIdStatic().

armnn::ITensorHandle
Definition: ITensorHandle.hpp:16
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26
armnn::ITensorHandle::Map
virtual const void * Map(bool blocking=true) const =0
Map the tensor data for access.