diff options
Diffstat (limited to 'runtime/neurun/core/src/compiler/SubTensorAnalyzer.h')
-rw-r--r-- | runtime/neurun/core/src/compiler/SubTensorAnalyzer.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/runtime/neurun/core/src/compiler/SubTensorAnalyzer.h b/runtime/neurun/core/src/compiler/SubTensorAnalyzer.h new file mode 100644 index 000000000..54d41e460 --- /dev/null +++ b/runtime/neurun/core/src/compiler/SubTensorAnalyzer.h @@ -0,0 +1,59 @@ +/* + * 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. + */ + +/** + * @file SubTensorAnalyzer.h + * @brief This file contains SubTensorAnalyzer to analyze tensor subsumption + * using operation visitor + */ + +#ifndef __NEURUN_COMPILER_SUBTENSOR_ANALYZER_H__ +#define __NEURUN_COMPILER_SUBTENSOR_ANALYZER_H__ + +#include "ir/OperationVisitor.h" +#include "ir/Graph.h" + +namespace neurun +{ +namespace compiler +{ + +/** + * @brief Class to analyze tensor subsumption + */ +class SubTensorAnalyzer : public ir::OperationVisitor +{ +public: + /** + * @brief Construct a new SubTensorAnalyzer object + * @param[in] ctx Graph operand set + */ + SubTensorAnalyzer(ir::Graph &graph) : _graph{graph} + { + // DO NOTHING + } + +public: + void visit(const ir::operation::Concat &) override; + +private: + ir::Graph &_graph; // TODO Refactor : Do not update Operands +}; + +} // namespace compiler +} // namespace neurun + +#endif // __NEURUN_COMPILER_SUBTENSOR_ANALYZER_H__ |