From 549b9600a6eaf0727fa084465a75f173edf8f381 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 24 May 2022 11:32:07 +0100 Subject: Update 22.05 Doxygen Docs after updates to main Readme Signed-off-by: Nikhil Raj Change-Id: I56711772406a41ff81fa136a5fb6c59c9b9cf504 --- 22.05/_cast_layer_8cpp_source.xhtml | 153 ++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 22.05/_cast_layer_8cpp_source.xhtml (limited to '22.05/_cast_layer_8cpp_source.xhtml') diff --git a/22.05/_cast_layer_8cpp_source.xhtml b/22.05/_cast_layer_8cpp_source.xhtml new file mode 100644 index 0000000000..a2ebd3a3c8 --- /dev/null +++ b/22.05/_cast_layer_8cpp_source.xhtml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/layers/CastLayer.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  22.05 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
CastLayer.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #include "CastLayer.hpp"
6 
7 #include "LayerCloneBase.hpp"
8 #include <armnn/TypesUtils.hpp>
9 
12 
13 namespace armnn
14 {
15 
16 CastLayer::CastLayer(const char* name)
17  : Layer(1, 1, LayerType::Cast, name)
18 {
19 }
20 
21 std::unique_ptr<IWorkload> CastLayer::CreateWorkload(const IWorkloadFactory& factory) const
22 {
23  CastQueueDescriptor descriptor;
24  SetAdditionalInfo(descriptor);
25 
26  return factory.CreateWorkload(LayerType::Cast, descriptor, PrepInfoAndDesc(descriptor));
27 }
28 
30 {
31  return CloneBase<CastLayer>(graph, GetName());
32 }
33 
35 {
37 
38  const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape();
39 
41 
42  auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
43 
44  ARMNN_ASSERT(inferredShapes.size() == 1);
45 
46  ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "CastLayer");
47 }
48 
50 void CastLayer::Accept(ILayerVisitor& visitor) const
51 {
52  IgnoreUnused(visitor);
53  throw armnn::Exception("CastLayer VisitCastLayer is not implemented");
54 }
56 
57 } // namespace armnn
+
CastLayer(const char *name)
Constructor to create a CastLayer.
Definition: CastLayer.cpp:16
+
const TensorShape & GetShape() const
Definition: Tensor.hpp:191
+
std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override
Infer the shape of the output(s) based on the provided input shape(s)
Definition: Layer.cpp:397
+
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
+ +
CastLayer * Clone(Graph &graph) const override
Creates a dynamically-allocated copy of this layer.
Definition: CastLayer.cpp:29
+ + +
void VerifyShapeInferenceType(const TensorShape &outputShape, ShapeInferenceMethod shapeInferenceMethod)
Definition: Layer.cpp:491
+
Copyright (c) 2021 ARM Limited and Contributors.
+
void IgnoreUnused(Ts &&...)
+ +
const IOutputSlot * GetConnection() const override
Definition: Layer.hpp:204
+
ARMNN_NO_DEPRECATE_WARN_BEGIN void Accept(ILayerVisitor &visitor) const override
Definition: CastLayer.cpp:50
+
void ValidateAndCopyShape(const TensorShape &outputShape, const TensorShape &inferredShape, const ShapeInferenceMethod shapeInferenceMethod, const std::string &layerName, const unsigned int outputSlotIndex=0)
Definition: Layer.cpp:422
+
void VerifyLayerConnections(unsigned int expectedConnections, const CheckLocation &location) const
Definition: Layer.cpp:378
+
const InputSlot & GetInputSlot(unsigned int index) const override
Get a const input slot handle by slot index.
Definition: Layer.hpp:322
+ + +
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
+
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *LayerCreateWorkload.
Definition: Layer.hpp:394
+
void ValidateTensorShapesFromInputs() override
Check if the input tensor shape(s) will lead to a valid configuration of ConvertFp16ToFp32Layer.
Definition: CastLayer.cpp:34
+
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
+
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203
+
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
Makes a workload for the Cast type.
Definition: CastLayer.cpp:21
+ +
void SetAdditionalInfo(QueueDescriptor &descriptor) const
Definition: Layer.cpp:274
+
This layer represents a cast operation.
Definition: CastLayer.hpp:14
+
Base class for all ArmNN exceptions so that users can filter to just those.
Definition: Exceptions.hpp:46
+
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
Definition: Layer.hpp:324
+
virtual const TensorInfo & GetTensorInfo() const =0
+
const char * GetName() const override
Returns the name of the layer.
Definition: Layer.hpp:317
+
virtual std::unique_ptr< IWorkload > CreateWorkload(LayerType type, const QueueDescriptor &descriptor, const WorkloadInfo &info) const
+
const TensorInfo & GetTensorInfo() const override
Definition: Layer.cpp:92
+
ShapeInferenceMethod m_ShapeInferenceMethod
Definition: Layer.hpp:421
+ + + +
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below...
Definition: Types.hpp:467
+
+
+ + + + -- cgit v1.2.1