393060741c05bce60f3c118d5093ce2ab28ac7e6
[platform/core/ml/nnfw.git] / runtime / onert / core / src / ir / pass / OperandPass.h
1 /*
2  * Copyright (c) 2018 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_GRAPH_PASS_OPERAND_PASS_H__
18 #define __ONERT_GRAPH_PASS_OPERAND_PASS_H__
19
20 #include "Pass.h"
21 #include "ir/Index.h"
22
23 namespace onert
24 {
25 namespace ir
26 {
27 class Operand;
28 } // namespace ir
29 } // namespace onert
30
31 namespace onert
32 {
33 namespace ir
34 {
35 namespace pass
36 {
37
38 class OperandPass : public Pass
39 {
40 public:
41   using Pass::Pass;
42   virtual ~OperandPass() = default;
43
44 public:
45   std::string id() override = 0;
46   void run() override final;
47   virtual void callback(const OperandIndex &i, Operand &o) = 0;
48 };
49
50 } // namespace pass
51 } // namespace ir
52 } // namespace onert
53
54 #endif // __ONERT_GRAPH_PASS_OPERAND_PASS_H__