fix build bug: eliminate dependencies from external Shape (#1164)
authorРоман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 <r.rusyaev@samsung.com>
Thu, 23 Aug 2018 16:11:45 +0000 (19:11 +0300)
committerSergey Vostokov/AI Tools Lab /SRR/Staff Engineer/삼성전자 <s.vostokov@samsung.com>
Thu, 23 Aug 2018 16:11:45 +0000 (19:11 +0300)
* remove redundant operator<<
* replace including shape headers

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
contrib/nnc/libs/core/include/nnc/core/IR/dumpers/ir_dot_node_info.h
contrib/nnc/libs/core/src/core/IR/dumpers/ir_dot_dumper.cpp
contrib/nnc/libs/core/src/core/IR/dumpers/ir_dot_node_info.cpp

index cbb7e94..49e3d72 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef NNCC_IR_NODE_DOT_BUILDER_H
 #define NNCC_IR_NODE_DOT_BUILDER_H
 
-#include "nncc/core/ADT/tensor/Shape.h"
+#include "nnc/core/linalg/Shape.h"
 #include "nnc/core/IR/model/operations/common.h"
 #include "nnc/core/IR/model/operations/pool_op.h"
 
@@ -15,7 +15,7 @@ namespace dumper
 {
 
 using namespace nncc::contrib::core::IR::model;
-using nncc::core::ADT::tensor::Shape;
+using namespace nncc::contrib::core::data;
 
 /**
  * @brief Can collect information about a NN operator, and then use it to output
index 35516d8..b9070ff 100644 (file)
@@ -1,6 +1,6 @@
 #include <iostream>
 
-#include "nncc/core/ADT/tensor/Shape.h"
+#include "nnc/core/linalg/Shape.h"
 #include "nnc/core/IR/model/graph/ir_node.h"
 
 #include "nnc/core/IR/dumpers/ir_dot_node_info.h"
@@ -15,7 +15,7 @@ namespace core
 namespace dumper
 {
 
-using nncc::core::ADT::tensor::Shape;
+using namespace nncc::contrib::core::data;
 
 static std::vector<Shape> getInputShapes(OpDescription &op)
 {
index 14fafeb..a538caa 100644 (file)
@@ -12,19 +12,6 @@ namespace core
 namespace dumper
 {
 
-std::ostream &operator<<(std::ostream &s, const Shape &shape) noexcept
-{
-  s << "[";
-  for (uint32_t d = 0; d < shape.rank(); ++d)
-  {
-    if (d != 0)
-      s << ", ";
-    s << shape.dim(d);
-  }
-  s << "]";
-  return s;
-}
-
 DotIrNodeInfo &DotIrNodeInfo::withType(const std::string &typeName, const std::string &nodeName)
 {
   this->typeName = typeName;