blob: 6a6a79ca56c13fdb14db07483ea38e23da8f6fe1 [file] [log] [blame]
Sadik Armagan9199e582019-09-05 17:35:31 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#include "Abs.hpp"
7
8namespace armnn
9{
10
11void Abs(Decoder<float>& in,
12 Encoder<float>& out,
13 const TensorInfo& tensorInfo)
14{
15 for (unsigned int i = 0u; i < tensorInfo.GetNumElements(); ++i)
16 {
17 out[i];
18 in[i];
19 out.Set(std::abs(in.Get()));
20 }
21}
22
23} //namespace armnn