From 0c27334683bcc222d14a0189d936b64a2c1f8769 Mon Sep 17 00:00:00 2001 From: Sergei Barannikov/AI Tools Lab /SRR/Engineer/Samsung Electronics Date: Mon, 25 Nov 2019 14:35:05 +0300 Subject: [PATCH] [neurun] Remove unused variable (#9160) Remove unused private variable `_elements` in `LinearExecutor`. Signed-off-by: Sergei Barannikov --- runtime/neurun/core/src/compiler/ExecutorFactory.cc | 6 +++--- runtime/neurun/core/src/compiler/Linear.h | 2 -- runtime/neurun/core/src/exec/LinearExecutor.h | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/runtime/neurun/core/src/compiler/ExecutorFactory.cc b/runtime/neurun/core/src/compiler/ExecutorFactory.cc index 9b54ee3..8a4e78f 100644 --- a/runtime/neurun/core/src/compiler/ExecutorFactory.cc +++ b/runtime/neurun/core/src/compiler/ExecutorFactory.cc @@ -194,9 +194,9 @@ exec::IExecutor *ExecutorFactory::createLinearExecutor(graph::Graph &graph) tensor_mgrs->insert(tensor_builder->releaseTensorManager()); } - return new exec::LinearExecutor{ - graph.shareModel(), graph.releaseSubgraphs(), operand_context, graph.releaseLowerInfo(), - std::move(tensor_mgrs), linear->releaseElements(), function_sequence}; + return new exec::LinearExecutor{graph.shareModel(), graph.releaseSubgraphs(), + operand_context, graph.releaseLowerInfo(), + std::move(tensor_mgrs), function_sequence}; } exec::IExecutor *ExecutorFactory::createDataflowExecutor(graph::Graph &graph, bool parallel) diff --git a/runtime/neurun/core/src/compiler/Linear.h b/runtime/neurun/core/src/compiler/Linear.h index eb2ca2c..2c3e470 100644 --- a/runtime/neurun/core/src/compiler/Linear.h +++ b/runtime/neurun/core/src/compiler/Linear.h @@ -72,8 +72,6 @@ public: void generateConstantInitializers(void) const; - std::vector &&releaseElements() { return std::move(_elements); } - private: graph::Graph &_graph; std::vector _elements; diff --git a/runtime/neurun/core/src/exec/LinearExecutor.h b/runtime/neurun/core/src/exec/LinearExecutor.h index 58c1ea9..1369470 100644 --- a/runtime/neurun/core/src/exec/LinearExecutor.h +++ b/runtime/neurun/core/src/exec/LinearExecutor.h @@ -47,11 +47,10 @@ public: const std::shared_ptr &operand_context, std::unique_ptr lower_info, std::unique_ptr tensor_mgrs, - std::vector &&elements, const std::shared_ptr &fn_seq) : ExecutorBase{model, std::move(subgraphs), operand_context, std::move(lower_info), std::move(tensor_mgrs)}, - _fn_seq{fn_seq}, _elements{std::move(elements)} + _fn_seq{fn_seq} { } @@ -60,7 +59,6 @@ public: private: std::shared_ptr _fn_seq; - std::vector _elements; }; } // namespace exec -- 2.7.4