aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/workloads/Abs.cpp
blob: 6a6a79ca56c13fdb14db07483ea38e23da8f6fe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#include "Abs.hpp"

namespace armnn
{

void Abs(Decoder<float>& in,
         Encoder<float>& out,
         const TensorInfo& tensorInfo)
{
    for (unsigned int i = 0u; i < tensorInfo.GetNumElements(); ++i)
    {
        out[i];
        in[i];
        out.Set(std::abs(in.Get()));
    }
}

} //namespace armnn