ArmNN
 21.02
armnnTfLiteParser Namespace Reference

Classes

class  ITfLiteParser
 
class  TfLiteParserImpl
 

Typedefs

using BindingPointInfo = armnn::BindingPointInfo
 
using ITfLiteParserPtr = std::unique_ptr< ITfLiteParser, void(*)(ITfLiteParser *parser)>
 

Functions

unsigned int ComputeWrappedIndex (int idx, unsigned int numDimsIn)
 

Typedef Documentation

◆ BindingPointInfo

Definition at line 20 of file ITfLiteParser.hpp.

◆ ITfLiteParserPtr

using ITfLiteParserPtr = std::unique_ptr<ITfLiteParser, void(*)(ITfLiteParser* parser)>

Definition at line 24 of file ITfLiteParser.hpp.

Function Documentation

◆ ComputeWrappedIndex()

unsigned int armnnTfLiteParser::ComputeWrappedIndex ( int  idx,
unsigned int  numDimsIn 
)

Definition at line 2786 of file TfLiteParser.cpp.

References ARMNN_ASSERT, CHECK_LOCATION, CHECK_MODEL, CHECK_VALID_SIZE, CHECKED_NON_NEGATIVE, IOutputSlot::Connect(), TfLiteParserImpl::GetBuffer(), TfLiteParserImpl::GetInputs(), IConnectableLayer::GetInputSlot(), TfLiteParserImpl::GetInputTensorIds(), IConnectableLayer::GetName(), TensorInfo::GetNumBytes(), TensorInfo::GetNumDimensions(), TensorInfo::GetNumElements(), IConnectableLayer::GetNumOutputSlots(), TfLiteParserImpl::GetOutputs(), IConnectableLayer::GetOutputSlot(), TfLiteParserImpl::GetOutputTensorIds(), TensorInfo::GetShape(), ActivationDescriptor::m_A, ArgMinMaxDescriptor::m_Axis, GatherDescriptor::m_Axis, ActivationDescriptor::m_B, ActivationDescriptor::m_Function, ArgMinMaxDescriptor::m_Function, ReduceDescriptor::m_KeepDims, ArgMinMaxDescriptor::m_Output_Type, ReduceDescriptor::m_ReduceOperation, ReduceDescriptor::m_vAxis, armnn::Max, armnn::MaxNumOfTensorDimensions, armnn::Min, armnn::numeric_cast(), IOutputSlot::SetTensorInfo(), armnn::Signed32, armnn::Signed64, armnn::Sum, and armnnDeserializer::ToTensorInfo().

2787 {
2788  int numDims = armnn::numeric_cast<int>(numDimsIn);
2789  int v = idx < 0 ? numDims + idx : idx;
2790  ARMNN_ASSERT(v >= 0);
2791  ARMNN_ASSERT(v < numDims);
2792 
2793  return static_cast<unsigned int>(v);
2794 }
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
Definition: NumericCast.hpp:35