2 * Copyright (c) 2021 Samsung Electronics Co., Ltd. All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __LUCI_CIRCLE_NODE_EXECUTION_PLAN_H__
18 #define __LUCI_CIRCLE_NODE_EXECUTION_PLAN_H__
20 #include <luci/IR/CircleNode.h>
27 class CircleNodeExecutionPlan
30 CircleNodeExecutionPlan() = delete;
32 CircleNodeExecutionPlan(uint32_t order_in_plan, std::vector<uint32_t> offsets)
34 _order_in_plan = order_in_plan;
35 _offsets = std::move(offsets);
38 uint32_t order_in_plan(void) const { return _order_in_plan; }
39 void order_in_plan(const uint32_t &order_in_plan) { _order_in_plan = order_in_plan; }
41 std::vector<uint32_t> offsets(void) const { return _offsets; }
42 void offsets(const std::vector<uint32_t> &offsets) { _offsets = offsets; }
45 uint32_t _order_in_plan = 0;
46 std::vector<uint32_t> _offsets;
49 bool has_execution_plan(const luci::CircleNode *circle_node);
51 void add_execution_plan(luci::CircleNode *circle_node,
52 const luci::CircleNodeExecutionPlan &execution_plan);
54 luci::CircleNodeExecutionPlan get_execution_plan(const luci::CircleNode *circle_node);
58 #endif // __LUCI_CIRCLE_NODE_EXECUTION_PLAN_H__