ArmNN
 24.08
Maximum.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017, 2024 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 
9 
10 namespace armnn
11 {
12 template<typename T>
13 struct maximum
14 {
15  typedef T result_type;
17 
18  T operator () (const T& inputData0, const T& inputData1) const
19  {
20  return std::max(inputData0, inputData1);
21  }
22 };
23 
24 template<typename T>
25 struct floorDiv
26  {
27  typedef T result_type;
29 
30  T operator () (const T& inputData0, const T& inputData1) const
31  {
32  double result = static_cast<double>(inputData0)/static_cast<double>(inputData1);
33  return static_cast<T>(std::floor(result));
34  }
35  };
36 
37 } //namespace armnn
armnn::maximum::result_type
T result_type
Definition: Maximum.hpp:15
armnn::floorDiv
Definition: Maximum.hpp:25
armnn::maximum::first_argument_type
T first_argument_type
Definition: Maximum.hpp:16
armnn::floorDiv::result_type
T result_type
Definition: Maximum.hpp:27
armnn::maximum::operator()
T operator()(const T &inputData0, const T &inputData1) const
Definition: Maximum.hpp:18
armnn::floorDiv::operator()
T operator()(const T &inputData0, const T &inputData1) const
Definition: Maximum.hpp:30
armnn::floorDiv::first_argument_type
T first_argument_type
Definition: Maximum.hpp:28
armnn::maximum
Definition: Maximum.hpp:13
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6