From a1d3c6a49f35d7d3f11cc7e1b588d1d5401bdbf1 Mon Sep 17 00:00:00 2001 From: Mohamed Nour Abouelseoud Date: Thu, 27 Dec 2018 12:39:16 +0000 Subject: IVGCVSW-2371 Add Rsqrt Ref implementation *Added Unit Tests Change-Id: I6cceb8e6dcda35ce08415f8e5ca86019a64d26e3 --- src/armnn/layers/RsqrtLayer.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/armnn/layers/RsqrtLayer.hpp (limited to 'src/armnn/layers/RsqrtLayer.hpp') diff --git a/src/armnn/layers/RsqrtLayer.hpp b/src/armnn/layers/RsqrtLayer.hpp new file mode 100644 index 0000000000..47a4ccedd6 --- /dev/null +++ b/src/armnn/layers/RsqrtLayer.hpp @@ -0,0 +1,40 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include + +namespace armnn +{ + +class RsqrtLayer : public Layer +{ +public: + /// Makes a workload for the Rsqrt type. + /// @param [in] graph The graph where this layer can be found. + /// @param [in] factory The workload factory which will create the workload. + /// @return A pointer to the created workload, or nullptr if not created. + virtual std::unique_ptr CreateWorkload(const Graph& graph, + const IWorkloadFactory& factory) const override; + + /// Creates a dynamically-allocated copy of this layer. + /// @param [in] graph The graph into which this layer is being cloned. + RsqrtLayer* Clone(Graph& graph) const override; + + /// Check if the input tensor shape(s) + /// will lead to a valid configuration of @ref RsqrtLayer. + void ValidateTensorShapesFromInputs() override; + +protected: + /// Constructor to create an RsqrtLayer. + /// @param [in] name Optional name for the layer. + RsqrtLayer(const char* name); + + /// Default destructor + ~RsqrtLayer() = default; +}; + +} // namespace \ No newline at end of file -- cgit v1.2.1