From 1dc83febfb76d6a770bdf3ba16c4034a970c2320 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Thu, 16 May 2024 09:47:51 +0100 Subject: IVGCVSW-8260 Update Doxgen Docu for 24.05 Signed-off-by: Nikhil Raj Change-Id: If4bc983bf2793a27ded8e26ac2b29523fc1e4711 --- latest/_permute_layer_8cpp_source.html | 85 +++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 37 deletions(-) (limited to 'latest/_permute_layer_8cpp_source.html') diff --git a/latest/_permute_layer_8cpp_source.html b/latest/_permute_layer_8cpp_source.html index fd6dca7ed8..27ecd54c53 100644 --- a/latest/_permute_layer_8cpp_source.html +++ b/latest/_permute_layer_8cpp_source.html @@ -36,7 +36,7 @@ ArmNN
-  24.02 +  24.05
@@ -97,7 +97,7 @@ $(document).ready(function(){initNavTree('_permute_layer_8cpp_source.html','');
Go to the documentation of this file.
1 //
-
2 // Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
+
2 // Copyright © 2017-2024 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
@@ -135,43 +135,52 @@ $(document).ready(function(){initNavTree('_permute_layer_8cpp_source.html','');
37 
38 std::vector<TensorShape> PermuteLayer::InferOutputShapes(const std::vector<TensorShape>& inputShapes) const
39 {
-
40  ARMNN_ASSERT(inputShapes.size() == 1);
-
41  const TensorShape& inShape = inputShapes[0];
-
42  return std::vector<TensorShape> ({armnnUtils::Permuted(inShape, m_Param.m_DimMappings)});
-
43 }
-
44 
- -
46 {
- -
48 
-
49  const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape();
-
50 
- -
52 
-
53  auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
-
54 
-
55  ARMNN_ASSERT(inferredShapes.size() == 1);
-
56 
-
57  ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "PermuteLayer");
-
58 }
+
40  if (inputShapes.size() != 1)
+
41  {
+
42  throw armnn::Exception("inputShapes' size is \"" + std::to_string(inputShapes.size()) +
+
43  "\" - should be \"1\".");
+
44  }
+
45 
+
46  const TensorShape& inShape = inputShapes[0];
+
47  return std::vector<TensorShape> ({armnnUtils::Permuted(inShape, m_Param.m_DimMappings)});
+
48 }
+
49 
+ +
51 {
+ +
53 
+
54  const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape();
+
55 
+ +
57 
+
58  auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
59 
- -
61 {
-
62  strategy.ExecuteStrategy(this, GetParameters(), {}, GetName());
-
63 }
-
64 
-
65 } // namespace armnn
+
60  if (inferredShapes.size() != 1)
+
61  {
+
62  throw armnn::LayerValidationException("inferredShapes has "
+
63  + std::to_string(inferredShapes.size()) +
+
64  " elements - should only have 1.");
+
65  }
+
66 
+
67  ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "PermuteLayer");
+
68 }
+
69 
+ +
71 {
+
72  strategy.ExecuteStrategy(this, GetParameters(), {}, GetName());
+
73 }
+
74 
+
75 } // namespace armnn
-
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
PermuteLayer(const PermuteDescriptor &param, const char *name)
Constructor to create a PermuteLayer.
-
const TensorInfo & GetTensorInfo() const override
Definition: Layer.cpp:92
+
const TensorInfo & GetTensorInfo() const override
Definition: Layer.cpp:100
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203
-
void ValidateAndCopyShape(const TensorShape &outputShape, const TensorShape &inferredShape, const ShapeInferenceMethod shapeInferenceMethod, const std::string &layerName, const unsigned int outputSlotIndex=0)
Definition: Layer.cpp:435
-
void ExecuteStrategy(IStrategy &strategy) const override
Apply a visitor to this layer.
+
void ValidateAndCopyShape(const TensorShape &outputShape, const TensorShape &inferredShape, const ShapeInferenceMethod shapeInferenceMethod, const std::string &layerName, const unsigned int outputSlotIndex=0)
Definition: Layer.cpp:457
+
void ExecuteStrategy(IStrategy &strategy) const override
Apply a visitor to this layer.
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
Definition: Layer.hpp:339
void Permute(const armnn::TensorShape &dstShape, const armnn::PermutationVector &mappings, const void *src, void *dst, size_t dataTypeSize)
Definition: Permute.cpp:164
armnn::TensorShape Permuted(const armnn::TensorShape &srcShape, const armnn::PermutationVector &mappings)
Definition: Permute.cpp:125
@@ -183,22 +192,24 @@ $(document).ready(function(){initNavTree('_permute_layer_8cpp_source.html','');
const char * GetName() const override
Returns the name of the layer.
Definition: Layer.hpp:332
PermuteLayer * Clone(Graph &graph) const override
Creates a dynamically-allocated copy of this layer.
-
const TensorInfo & GetTensorInfo() const override
Gets the TensorInfo for this InputSlot.
Definition: Layer.cpp:592
+
const TensorInfo & GetTensorInfo() const override
Gets the TensorInfo for this InputSlot.
Definition: Layer.cpp:614
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
Makes a workload for the Permute type.
PermuteDescriptor m_Param
The parameters for the layer (not including tensor-valued weights etc.).
-
void ValidateTensorShapesFromInputs() override
Check if the input tensor shape(s) will lead to a valid configuration of PermuteLayer.
+
void ValidateTensorShapesFromInputs() override
Check if the input tensor shape(s) will lead to a valid configuration of PermuteLayer.
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *Layer::CreateWorkload.
+
std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override
By default returns inputShapes if the number of inputs are equal to number of outputs,...
-
void VerifyShapeInferenceType(const TensorShape &outputShape, ShapeInferenceMethod shapeInferenceMethod)
Definition: Layer.cpp:504
+
void VerifyShapeInferenceType(const TensorShape &outputShape, ShapeInferenceMethod shapeInferenceMethod)
Definition: Layer.cpp:526
A PermuteDescriptor for the PermuteLayer.
-
void SetAdditionalInfo(QueueDescriptor &descriptor) const
Definition: Layer.cpp:287
+
void SetAdditionalInfo(QueueDescriptor &descriptor) const
Definition: Layer.cpp:303
+
Base class for all ArmNN exceptions so that users can filter to just those.
Definition: Exceptions.hpp:46
PermutationVector m_DimMappings
Indicates how to translate tensor elements from a given source into the target destination,...
const TensorShape & GetShape() const
Definition: Tensor.hpp:193
Copyright (c) 2021 ARM Limited and Contributors.
-
void VerifyLayerConnections(unsigned int expectedConnections, const CheckLocation &location) const
Definition: Layer.cpp:391
+
void VerifyLayerConnections(unsigned int expectedConnections, const CheckLocation &location) const
Definition: Layer.cpp:410
This layer represents a permutation operation.
ShapeInferenceMethod m_ShapeInferenceMethod
Definition: Layer.hpp:441
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
Definition: Types.hpp:491
@@ -211,7 +222,7 @@ $(document).ready(function(){initNavTree('_permute_layer_8cpp_source.html','');