1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
#include "BaseIterator.hpp"
#include <armnn/Tensor.hpp>
namespace armnn
{
template <typename Functor>
struct ElementwiseBinaryFunction
{
using OutType = typename Functor::result_type;
using InType = typename Functor::first_argument_type;
ElementwiseBinaryFunction(const TensorShape& inShape0,
const TensorShape& inShape1,
const TensorShape& outShape,
Decoder<InType>& inData0,
Decoder<InType>& inData1,
Encoder<OutType>& outData);
};
template <typename Functor>
struct ElementwiseUnaryFunction
{
using OutType = typename Functor::result_type;
using InType = typename Functor::argument_type;
ElementwiseUnaryFunction(const TensorShape& inShape,
const TensorShape& outShape,
Decoder<InType>& inData,
Encoder<OutType>& outData);
};
template <typename Functor>
struct LogicalBinaryFunction
{
using OutType = bool;
using InType = bool;
LogicalBinaryFunction(const TensorShape& inShape0,
const TensorShape& inShape1,
const TensorShape& outShape,
Decoder<InType>& inData0,
Decoder<InType>& inData1,
Encoder<OutType>& outData);
};
template <typename Functor>
struct LogicalUnaryFunction
{
using OutType = bool;
using InType = bool;
LogicalUnaryFunction(const TensorShape& inShape,
const TensorShape& outShape,
Decoder<InType>& inData,
Encoder<OutType>& outData);
};
} //namespace armnn
|