20.05
|
An OriginsDescriptor for the ConcatLayer. More...
#include <Descriptors.hpp>
Public Member Functions | |
OriginsDescriptor () | |
OriginsDescriptor (uint32_t numViews, uint32_t numDimensions=4) | |
OriginsDescriptor (const OriginsDescriptor &other) | |
OriginsDescriptor (OriginsDescriptor &&other) | |
~OriginsDescriptor () | |
OriginsDescriptor & | operator= (OriginsDescriptor rhs) |
bool | operator== (const OriginsDescriptor &rhs) const |
Status | SetViewOriginCoord (uint32_t view, uint32_t coord, uint32_t value) |
Set the view origin coordinates. More... | |
uint32_t | GetNumViews () const |
Get the number of views. More... | |
uint32_t | GetNumDimensions () const |
Get the number of dimensions. More... | |
const uint32_t * | GetViewOrigin (uint32_t idx) const |
Return the view origin at the int value idx. More... | |
void | ReorderOrigins (unsigned int *newOrdering, unsigned int numNewOrdering) |
Reorders the viewOrigins in accordance with the indices presented in newOrdering array. More... | |
void | SetConcatAxis (unsigned int concatAxis) |
Set the concatenation axis value. More... | |
unsigned int | GetConcatAxis () const |
Get the concatenation axis value. More... | |
Friends | |
void | swap (OriginsDescriptor &first, OriginsDescriptor &second) |
Swap the ViewsDescriptor values first and second. More... | |
An OriginsDescriptor for the ConcatLayer.
Descriptor to configure the concatenation process. Number of views must be equal to the number of inputs, and their order must match - e.g. first view corresponds to the first input, second view to the second input, etc.
Definition at line 155 of file Descriptors.hpp.
Definition at line 76 of file Descriptors.cpp.
OriginsDescriptor | ( | uint32_t | numViews, |
uint32_t | numDimensions = 4 |
||
) |
Definition at line 83 of file Descriptors.cpp.
OriginsDescriptor | ( | const OriginsDescriptor & | other | ) |
Definition at line 95 of file Descriptors.cpp.
OriginsDescriptor | ( | OriginsDescriptor && | other | ) |
Definition at line 108 of file Descriptors.cpp.
References OriginsDescriptor::swap.
~OriginsDescriptor | ( | ) |
Definition at line 114 of file Descriptors.cpp.
unsigned int GetConcatAxis | ( | ) | const |
Get the concatenation axis value.
Definition at line 156 of file Descriptors.cpp.
Referenced by ClLayerSupport::IsConcatSupported(), NeonLayerSupport::IsConcatSupported(), OriginsDescriptor::operator==(), StringifyLayerParameters< OriginsDescriptor >::Serialize(), SerializerVisitor::VisitConcatLayer(), and SerializerVisitor::VisitSplitterLayer().
uint32_t GetNumDimensions | ( | ) | const |
Get the number of dimensions.
Definition at line 186 of file Descriptors.cpp.
Referenced by Concatenate(), ConcatLayer::CreateWorkload(), ViewsDescriptor::GetNumDimensions(), ConcatLayer::InferOutputShapes(), NeonLayerSupport::IsConcatSupported(), ClLayerSupport::IsConcatSupported(), OriginsDescriptor::operator==(), armnnUtils::ProcessConcatInputTensorInfo(), StringifyLayerParameters< OriginsDescriptor >::Serialize(), SerializerVisitor::VisitConcatLayer(), and SerializerVisitor::VisitSplitterLayer().
uint32_t GetNumViews | ( | ) | const |
Get the number of views.
Definition at line 181 of file Descriptors.cpp.
Referenced by Concatenate(), ConcatLayer::CreateWorkload(), ViewsDescriptor::GetNumViews(), ConcatLayer::InferOutputShapes(), OriginsDescriptor::operator==(), StringifyLayerParameters< OriginsDescriptor >::Serialize(), ConcatLayer::ValidateTensorShapesFromInputs(), SerializerVisitor::VisitConcatLayer(), and SerializerVisitor::VisitSplitterLayer().
const uint32_t * GetViewOrigin | ( | uint32_t | idx | ) | const |
Return the view origin at the int value idx.
Definition at line 191 of file Descriptors.cpp.
Referenced by armnnTfParser::CalculatePaddedOutputTensorInfo(), Concatenate(), ConcatLayer::CreateWorkload(), ViewsDescriptor::GetViewOrigin(), ConcatLayer::InferOutputShapes(), OriginsDescriptor::operator==(), StringifyLayerParameters< OriginsDescriptor >::Serialize(), and SerializerVisitor::VisitConcatLayer().
OriginsDescriptor & operator= | ( | OriginsDescriptor | rhs | ) |
Definition at line 123 of file Descriptors.cpp.
References OriginsDescriptor::swap.
bool operator== | ( | const OriginsDescriptor & | rhs | ) | const |
Definition at line 129 of file Descriptors.cpp.
References OriginsDescriptor::GetConcatAxis(), OriginsDescriptor::GetNumDimensions(), OriginsDescriptor::GetNumViews(), and OriginsDescriptor::GetViewOrigin().
void ReorderOrigins | ( | unsigned int * | newOrdering, |
unsigned int | numNewOrdering | ||
) |
Reorders the viewOrigins in accordance with the indices presented in newOrdering array.
The number of views must match number of elements in the new ordering array.
Definition at line 198 of file Descriptors.cpp.
References ARMNN_ASSERT_MSG.
void SetConcatAxis | ( | unsigned int | concatAxis | ) |
Set the concatenation axis value.
Definition at line 152 of file Descriptors.cpp.
Referenced by armnnTfParser::CalculatePaddedOutputTensorInfo(), armnn::CreateDescriptorForConcatenation(), and TfLiteParser::OutputShapeOfReshape().
Status SetViewOriginCoord | ( | uint32_t | view, |
uint32_t | coord, | ||
uint32_t | value | ||
) |
Set the view origin coordinates.
The arguments are: view, dimension, value. If the view is greater than or equal to GetNumViews(), then the view argument is out of range. If the coord is greater than or equal to GetNumDimensions(), then the coord argument is out of range.
Definition at line 161 of file Descriptors.cpp.
References ARMNN_LOG, armnn::error, armnn::Failure, and armnn::Success.
Referenced by CaffeParserBase::AddConvLayerWithSplits(), armnnTfParser::CalculatePaddedOutputTensorInfo(), armnn::CreateDescriptorForConcatenation(), CaffeParserBase::ParseConcatLayer(), armnnUtils::ProcessConcatInputTensorInfo(), and ViewsDescriptor::SetViewOriginCoord().
|
friend |
Swap the ViewsDescriptor values first and second.
Definition at line 344 of file Descriptors.cpp.
Referenced by OriginsDescriptor::operator=(), and OriginsDescriptor::OriginsDescriptor().