[mir_caffe] Rename namespace nnc to mir_caffe in Caffe importer (#6239)
authorСергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 <s.barannikov@samsung.com>
Mon, 5 Aug 2019 16:45:07 +0000 (19:45 +0300)
committerEfimov Alexander/AI Tools Lab/./Samsung Electronics <a.efimov@samsung.com>
Mon, 5 Aug 2019 16:45:07 +0000 (19:45 +0300)
* Rename namespace and include guards in Caffe importer
* Fix usages of the namespace in `nnc`

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
compiler/mir-caffe-importer/caffe_importer.cpp
compiler/mir-caffe-importer/caffe_importer.h
compiler/mir-caffe-importer/caffe_op_creator.cpp
compiler/mir-caffe-importer/caffe_op_creator.h
compiler/mir-caffe-importer/caffe_op_types.h
compiler/nnc/passes/caffe_frontend/caffe_importer_pass.cpp
compiler/nnc/passes/caffe_frontend/caffe_importer_pass.h

index 97bd011..359a97d 100644 (file)
@@ -33,7 +33,7 @@
 #include <utility>
 #include <vector>
 
-namespace nnc
+namespace mir_caffe
 {
 
 using namespace ::caffe;
@@ -324,4 +324,4 @@ const std::map<std::string, CaffeOpType> CaffeImporter::_operatorTypes = {
     {"Tile", CaffeOpType::tile},
     {"WindowData", CaffeOpType::windowData}};
 
-} // namespace nnc
+} // namespace mir_caffe
index 6f5f535..4726c7b 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef NNCC_CAFFE_IMPORTER_H
-#define NNCC_CAFFE_IMPORTER_H
+#ifndef MIR_CAFFE_IMPORTER_H
+#define MIR_CAFFE_IMPORTER_H
 
 #include <set>
 #include <string>
@@ -25,7 +25,7 @@
 #include "caffe_op_creator.h"
 #include "caffe_op_types.h"
 
-namespace nnc
+namespace mir_caffe
 {
 
 class CaffeImporter
@@ -83,6 +83,6 @@ private:
   void processDeprecatedInput();
 };
 
-} // namespace nnc
+} // namespace mir_caffe
 
-#endif // NNCC_CAFFE_IMPORTER_H
+#endif // MIR_CAFFE_IMPORTER_H
index b1a07bb..4e13681 100644 (file)
@@ -48,7 +48,7 @@
 #include <iostream>
 #include <set>
 
-namespace nnc
+namespace mir_caffe
 {
 
 static TensorVariant fixGroupedKernel(int groups, const TensorVariant &folded_kernel)
@@ -925,4 +925,4 @@ CaffeOpCreator::convertLSTM(const caffe::LayerParameter &layer,
   return {createOp<ops::ConcatOp>("", h_slices, 0)->getOutput(0)};
 }
 
-} // namespace nnc
+} // namespace mir_caffe
index 02ea9c2..b57d098 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef NNCC_CAFFE_OP_CREATOR_H
-#define NNCC_CAFFE_OP_CREATOR_H
+#ifndef MIR_CAFFE_OP_CREATOR_H
+#define MIR_CAFFE_OP_CREATOR_H
 
 #include <set>
 #include <map>
@@ -29,7 +29,7 @@
 
 #include "caffe/proto/caffe.pb.h"
 
-namespace nnc
+namespace mir_caffe
 {
 
 using mir::TensorVariant;
@@ -153,6 +153,6 @@ mir::Operation *CaffeOpCreator::createOp(const std::string &name, Types &&... ar
   return _graph->create<OpType>(name, std::forward<Types>(args)...);
 }
 
-} // namespace nnc
+} // namespace mir_caffe
 
-#endif // NNCC_CAFFE_OP_CREATOR_H
+#endif // MIR_CAFFE_OP_CREATOR_H
index 44ef2e6..30fce7d 100644 (file)
  * limitations under the License.
  */
 
-#ifndef NNCC_CAFFE_OP_TYPES_H
-#define NNCC_CAFFE_OP_TYPES_H
+#ifndef MIR_CAFFE_OP_TYPES_H
+#define MIR_CAFFE_OP_TYPES_H
 
-namespace nnc
+namespace mir_caffe
 {
 
 enum class CaffeOpType
@@ -84,6 +84,6 @@ enum class CaffeOpType
   windowData
 };
 
-} // namespace nnc
+} // namespace mir_caffe
 
-#endif // NNCC_CAFFE_OP_TYPES_H
+#endif // MIR_CAFFE_OP_TYPES_H
index 3633d62..48db819 100644 (file)
@@ -22,7 +22,7 @@ namespace nnc
 {
 
 CaffeImporterPass::CaffeImporterPass(const std::string &filename)
-    : _pimpl(new CaffeImporter(filename))
+    : _pimpl(new mir_caffe::CaffeImporter(filename))
 {
 }
 
index 4f53dea..3baa46f 100644 (file)
 #include <memory>
 #include <string>
 
-namespace nnc
+namespace mir_caffe
 {
 class CaffeImporter;
+} // namespace mir_caffe
+
+namespace nnc
+{
 
 class CaffeImporterPass : public NNImporter
 {
@@ -38,7 +42,7 @@ public:
   ~CaffeImporterPass() override;
 
 private:
-  std::unique_ptr<CaffeImporter> _pimpl;
+  std::unique_ptr<mir_caffe::CaffeImporter> _pimpl;
   std::unique_ptr<mir::Graph> _graph;
 };