diff options
Diffstat (limited to 'src/backends/reference/workloads/Rsqrt.hpp')
-rw-r--r-- | src/backends/reference/workloads/Rsqrt.hpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/backends/reference/workloads/Rsqrt.hpp b/src/backends/reference/workloads/Rsqrt.hpp index ffc6b18d13..47ebcf36f6 100644 --- a/src/backends/reference/workloads/Rsqrt.hpp +++ b/src/backends/reference/workloads/Rsqrt.hpp @@ -1,19 +1,22 @@ // -// Copyright © 2017 Arm Ltd. All rights reserved. +// Copyright © 2019 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // -#include "BaseIterator.hpp" -#include <armnn/Tensor.hpp> -#include <armnn/Types.hpp> +#pragma once + +#include <iostream> namespace armnn { - -/// Performs the reciprocal squareroot function elementwise -/// on the inputs to give the outputs. -void Rsqrt(Decoder<float>& in, - Encoder<float>& out, - const TensorInfo& tensorInfo); + template<typename T> +struct rsqrt : public std::unary_function<T, T> + { + T + operator () (const T& inputData) const + { + return 1 / std::sqrt(inputData); + } + }; } //namespace armnn |