ArmNN
 24.08
FillLayer.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 
9 namespace armnn
10 {
11 
12 /// This layer represents a fill operation.
13 class FillLayer : public LayerWithParameters<FillDescriptor>
14 {
15 public:
16  /// Makes a workload for the Fill layer.
17  /// @param [in] factory The workload factory which will create the workload.
18  /// @return A pointer to the created workload, or nullptr if not created.
19  virtual std::unique_ptr<IWorkload> CreateWorkload(const IWorkloadFactory& factory) const override;
20 
21  /// Creates a dynamically-allocated copy of this layer.
22  /// @param [in] graph The graph into which this layer is being cloned.
23  FillLayer* Clone(Graph& graph) const override;
24 
25  /// Check if the input tensor shape(s)
26  /// will lead to a valid configuration of @ref FillLayer.
27  /// @param [in] shapeInferenceMethod Indicates if output shape shall be overwritten or just validate.
28  void ValidateTensorShapesFromInputs() override;
29 
30  void ExecuteStrategy(IStrategy& strategy) const override;
31 
32 protected:
33  /// Constructor to create a FillLayer.
34  /// @param [in] descriptor to configure the fill operation.
35  /// @param [in] name Optional name for the layer.
36  FillLayer(const FillDescriptor& descriptor, const char* name);
37 
38  /// Default destructor
39  ~FillLayer() = default;
40 };
41 
42 } // namespace
armnn::FillLayer::CreateWorkload
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
Makes a workload for the Fill layer.
Definition: FillLayer.cpp:21
armnn::IStrategy
Definition: IStrategy.hpp:16
armnn::LayerWithParameters
Definition: LayerWithParameters.hpp:14
armnn::FillLayer::FillLayer
FillLayer(const FillDescriptor &descriptor, const char *name)
Constructor to create a FillLayer.
Definition: FillLayer.cpp:16
armnn::IWorkloadFactory
Definition: WorkloadFactory.hpp:22
armnn::FillLayer
This layer represents a fill operation.
Definition: FillLayer.hpp:13
LayerWithParameters.hpp
armnn::FillDescriptor
A FillDescriptor for the FillLayer.
Definition: Descriptors.hpp:925
armnn::FillLayer::Clone
FillLayer * Clone(Graph &graph) const override
Creates a dynamically-allocated copy of this layer.
Definition: FillLayer.cpp:29
armnn::FillLayer::~FillLayer
~FillLayer()=default
Default destructor.
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::FillLayer::ValidateTensorShapesFromInputs
void ValidateTensorShapesFromInputs() override
Check if the input tensor shape(s) will lead to a valid configuration of FillLayer.
Definition: FillLayer.cpp:34
armnn::FillLayer::ExecuteStrategy
void ExecuteStrategy(IStrategy &strategy) const override
Apply a visitor to this layer.
Definition: FillLayer.cpp:59
armnn::Graph
Definition: Graph.hpp:30