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

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
compiler/mir-tflite-importer/tflite_importer.cpp
compiler/mir-tflite-importer/tflite_importer.h
compiler/mir-tflite-importer/tflite_op_creator.cpp
compiler/mir-tflite-importer/tflite_op_creator.h
compiler/nnc/passes/tflite_frontend/tflite_importer_pass.cpp
compiler/nnc/passes/tflite_frontend/tflite_importer_pass.h

index d770909..83adf47 100644 (file)
@@ -26,7 +26,7 @@
 
 using namespace ::tflite;
 
-namespace nnc
+namespace mir_tflite
 {
 
 TfliteImporter::TfliteImporter(std::string filename) : _filename(std::move(filename))
@@ -399,4 +399,4 @@ void TfliteImporter::setIrNodeNames()
   }
 }
 
-} // namespace nnc
+} // namespace mir_tflite
index 15966a1..6b866c3 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef NNCC_TFLITE_IMPORTER_H
-#define NNCC_TFLITE_IMPORTER_H
+#ifndef MIR_TFLITE_IMPORTER_H
+#define MIR_TFLITE_IMPORTER_H
 
 #include "schema_generated.h"
 #include "mir/Graph.h"
@@ -26,7 +26,7 @@
 #include <set>
 #include <string>
 
-namespace nnc
+namespace mir_tflite
 {
 
 class TFLiteOpCreator;
@@ -102,6 +102,6 @@ private:
   mir::TensorVariant createTensor(const ::tflite::Tensor *t, const ::tflite::Buffer *b);
 };
 
-} // namespace nnc
+} // namespace mir_tflite
 
-#endif // NNCC_TFLITE_IMPORTER_H
+#endif // MIR_TFLITE_IMPORTER_H
index 7d03830..1738128 100644 (file)
@@ -48,7 +48,7 @@
 
 using namespace ::tflite;
 
-namespace nnc
+namespace mir_tflite
 {
 
 static void calculatePadding(tflite::Padding padding, const Shape &input_shape,
@@ -696,4 +696,4 @@ TFLiteOpCreator::convertShape(const ::tflite::ShapeOptions * /*opts*/,
   return {result->getOutput(0)};
 }
 
-} // namespace nnc
+} // namespace mir_tflite
index ddfab8d..0632b68 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef NNCC_TFLITE_OP_CREATOR_H
-#define NNCC_TFLITE_OP_CREATOR_H
+#ifndef MIR_TFLITE_OP_CREATOR_H
+#define MIR_TFLITE_OP_CREATOR_H
 
 #include "schema_generated.h"
 
@@ -33,7 +33,7 @@
 #include <set>
 #include <vector>
 
-namespace nnc
+namespace mir_tflite
 {
 
 namespace ops = mir::ops;
@@ -193,6 +193,6 @@ mir::Operation *TFLiteOpCreator::createOp(Types &&... args)
   return _graph->create<OpType>("", std::forward<Types>(args)...);
 }
 
-} // namespace nnc
+} // namespace mir_tflite
 
-#endif // NNCC_TFLITE_OP_CREATOR_H
+#endif // MIR_TFLITE_OP_CREATOR_H
index babefdd..fd3cb57 100644 (file)
@@ -22,7 +22,7 @@ namespace nnc
 {
 
 TfliteImporterPass::TfliteImporterPass(const std::string &filename)
-    : _pimpl(new TfliteImporter(filename))
+    : _pimpl(new mir_tflite::TfliteImporter(filename))
 {
 }
 
index 8c69848..d9fbdd6 100644 (file)
 #include <memory>
 #include <string>
 
+namespace mir_tflite
+{
+class TfliteImporter;
+} // namespace mir_tflite
+
 namespace nnc
 {
 
-class TfliteImporter;
 class TfliteImporterPass : public NNImporter
 {
 public:
@@ -38,7 +42,7 @@ public:
   ~TfliteImporterPass() override;
 
 private:
-  std::unique_ptr<TfliteImporter> _pimpl;
+  std::unique_ptr<mir_tflite::TfliteImporter> _pimpl;
   std::unique_ptr<mir::Graph> _graph;
 };