blob: cee38fc1f16565f2dff04cb2a210adf5852fea3d [file] [log] [blame]
Mohamed Nour Abouelseouda1d3c6a2018-12-27 12:39:16 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#include "Rsqrt.hpp"
7
8#include <cmath>
9
10namespace armnn
11{
12
13void Rsqrt(const float* in,
14 float* out,
15 const TensorInfo& tensorInfo)
16{
17 for (size_t i = 0; i < tensorInfo.GetNumElements(); i++)
18 {
19 out[i] = 1.f / sqrtf(in[i]);
20 }
21}
22
23} //namespace armnn