[nnc] Impement node replacement facility in Graph class (#1951)
authorVladimir Plazun/AI Tools Lab /SRR/Engineer/삼성전자 <v.plazun@partner.samsung.com>
Thu, 25 Oct 2018 17:51:17 +0000 (20:51 +0300)
committerРоман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 <r.rusyaev@samsung.com>
Thu, 25 Oct 2018 17:51:17 +0000 (20:51 +0300)
commit18757d179d0925bc0abb276f4aec2d818cdd9a4f
tree63b8f719bcef12aeecf59dfd66cf7cfd7f485d65
parent3227801b5acabc62527d9623b16ee77d082231f3
[nnc] Impement node replacement facility in Graph class (#1951)

Provides replaceNode which is used to replace a node in graph preserving all edges
Provides replaceNodeWithInput and replaceInputNodes methods, used to replace any node with input node
Provides replaceOutputNodes,  used to replace graph output nodes with new list

Adds unit tests for all implementations

Signed-off-by: Vladimir Plazun <v.plazun@partner.samsung.com>
contrib/nnc/core/modelIR/graph.cpp
contrib/nnc/core/modelIR/ir_node.cpp
contrib/nnc/include/core/modelIR/graph.h
contrib/nnc/include/core/modelIR/ir_node.h
contrib/nnc/unittests/core/CMakeLists.txt
contrib/nnc/unittests/core/Graph.cpp [new file with mode: 0644]
contrib/nnc/unittests/core/NodeReplacer.cpp [new file with mode: 0644]