Mohamed Nour Abouelseoud | a1d3c6a | 2018-12-27 12:39:16 +0000 | [diff] [blame] | 1 | // |
2 | // Copyright © 2017 Arm Ltd. All rights reserved. | ||||
3 | // SPDX-License-Identifier: MIT | ||||
4 | // | ||||
5 | |||||
6 | #include "Rsqrt.hpp" | ||||
7 | |||||
8 | #include <cmath> | ||||
9 | |||||
10 | namespace armnn | ||||
11 | { | ||||
12 | |||||
13 | void 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 |