xref: /aosp_15_r20/external/armnn/src/backends/reference/workloads/Log.hpp (revision 89c4ff92f2867872bb9e2354d150bf0c8c502810)
1 //
2 // Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <iostream>
9 
10 namespace armnn
11 {
12 template<typename T>
13 struct log
14     {
15         typedef T result_type;
16         typedef T argument_type;
17 
18         T
operator ()armnn::log19         operator () (const T&  inputData) const
20         {
21             // computes natural logarithm of inputData
22             return std::log(inputData);
23         }
24     };
25 
26 } //namespace armnn
27