Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / runtime / onert / core / include / ir / operation / BCQGather.h
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_BCQGATHER_H__
18 #define __ONERT_IR_OPERATION_BCQGATHER_H__
19
20 #include <memory>
21
22 #include "ir/Operation.h"
23 #include "ir/InternalType.h"
24
25 namespace onert
26 {
27 namespace ir
28 {
29 namespace operation
30 {
31
32 class BCQGather : public Operation
33 {
34 public:
35   enum Input
36   {
37     INPUT_SCALES = 0,
38     INPUT_BINARY,
39     INDICES,
40     INPUT_CLUSTERS,
41   };
42
43   struct Param
44   {
45     uint32_t input_hidden_size;
46     uint32_t axis;
47   };
48
49 public:
50   BCQGather(const OperandIndexSequence &inputs, const OperandIndexSequence &outputs,
51             const Param &param);
52
53   void accept(OperationVisitor &v) const override;
54   OpCode opcode() const final { return OpCode::BCQGather; }
55
56   const Param &param() const { return _param; }
57
58 private:
59   Param _param;
60 };
61
62 } // namespace operation
63 } // namespace ir
64 } // namespace onert
65
66 #endif // __ONERT_IR_OPERATION_BCQGATHER_H__