summaryrefslogtreecommitdiff
path: root/runtimes/neurun/src/codegen/Planner.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtimes/neurun/src/codegen/Planner.h')
-rw-r--r--runtimes/neurun/src/codegen/Planner.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/runtimes/neurun/src/codegen/Planner.h b/runtimes/neurun/src/codegen/Planner.h
new file mode 100644
index 000000000..d725567b5
--- /dev/null
+++ b/runtimes/neurun/src/codegen/Planner.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __NEURUN_CODEGEN_PLANNER_H__
+#define __NEURUN_CODEGEN_PLANNER_H__
+
+#include "graph/operation/NodeVisitor.h"
+
+namespace neurun
+{
+namespace graph
+{
+namespace operand
+{
+class Set;
+} // namespace operand
+} // namespace graph
+} // namespace neurun
+
+namespace neurun
+{
+namespace codegen
+{
+
+class IPlanBuilder;
+
+class Planner : public graph::operation::NodeVisitor
+{
+public:
+ Planner(const neurun::graph::operand::Set &ctx, neurun::codegen::IPlanBuilder &builder)
+ : _ctx{ctx}, _builder{builder}
+ {
+ }
+
+public:
+ virtual void visit(const graph::operation::Conv2D::Implicit::Node &) override;
+ virtual void visit(const graph::operation::MaxPool2D::Implicit::Node &) override;
+ virtual void visit(const graph::operation::AvgPool2D::Implicit::Node &) override;
+ virtual void visit(const graph::operation::Concat::Node &) override;
+ virtual void visit(const graph::operation::Reshape::Node &) override;
+ virtual void visit(const graph::operation::FullyConnected::Node &) override;
+ virtual void visit(const graph::operation::Softmax::Node &) override;
+ virtual void visit(const graph::operation::NOP::Node &) override;
+ virtual void visit(const graph::operation::Permute::Node &) override;
+
+private:
+ const neurun::graph::operand::Set &_ctx;
+ neurun::codegen::IPlanBuilder &_builder;
+};
+
+} // namespace codegen
+} // namespace neurun
+
+#endif // __NEURUN_CODEGEN_PLANNER_H__