ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Reduce.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef __ONERT_IR_OPERATION_REDUCE_H__
18#define __ONERT_IR_OPERATION_REDUCE_H__
19
20#include <memory>
21
22#include "ir/Operation.h"
23
24namespace onert
25{
26namespace ir
27{
28namespace operation
29{
30
31class Reduce : public Operation
32{
33public:
34 enum Input
35 {
36 INPUT = 0,
37 AXES = 1
38 };
39
40 enum class ReduceType
41 {
42 ALL,
43 ANY,
44 MAX,
45 MEAN,
46 MIN,
47 PROD,
48 SUM
49 };
50
51 struct Param
52 {
55 };
56
57public:
58 Reduce(const OperandIndexSequence &inputs, const OperandIndexSequence &outputs,
59 const Param &param);
60
61public:
62 void accept(OperationVisitor &v) const override;
63 std::string name() const override;
64 OpCode opcode() const final { return OpCode::Reduce; }
65
66public:
67 const Param &param() const { return _param; }
68
69private:
70 Param _param;
71};
72
73} // namespace operation
74} // namespace ir
75} // namespace onert
76
77#endif // __ONERT_IR_OPERATION_REDUCE_ALL_H__
OpCode opcode() const final
Definition Reduce.h:64
std::string name() const override
Definition Reduce.cc:37
const Param & param() const
Definition Reduce.h:67
void accept(OperationVisitor &v) const override
Definition Reduce.cc:29