[caffegen] Add Layer-related classes (#97)
author박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 19 Apr 2018 04:27:53 +0000 (13:27 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 19 Apr 2018 04:27:53 +0000 (13:27 +0900)
This commit adds the following Layer-related classes which will be extended later.
 - Layer (base class)
 - LayerAnalysisPass (for read-only passes)
 - LayerTransformPass (for read-write passes)

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/caffegen/include/Layer.h [new file with mode: 0644]
contrib/caffegen/include/LayerAnalysisPass.h [new file with mode: 0644]
contrib/caffegen/include/LayerTransformPass.h [new file with mode: 0644]

diff --git a/contrib/caffegen/include/Layer.h b/contrib/caffegen/include/Layer.h
new file mode 100644 (file)
index 0000000..971ba38
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef __LAYER_H__
+#define __LAYER_H__
+
+struct LayerAnalysisPass;
+struct LayerTransformPass;
+
+struct Layer
+{
+  virtual ~Layer() = default;
+
+  virtual void accept(LayerAnalysisPass &&) const = 0;
+  virtual void accept(LayerTransformPass &&) = 0;
+};
+
+#endif // __LAYER_H__
diff --git a/contrib/caffegen/include/LayerAnalysisPass.h b/contrib/caffegen/include/LayerAnalysisPass.h
new file mode 100644 (file)
index 0000000..60f9d24
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __LAYER_ANALYSIS_PASS_H__
+#define __LAYER_ANALYSIS_PASS_H__
+
+struct LayerAnalysisPass
+{
+  virtual ~LayerAnalysisPass() = default;
+};
+
+#endif // __LAYER_ANALYSIS_PASS_H__
diff --git a/contrib/caffegen/include/LayerTransformPass.h b/contrib/caffegen/include/LayerTransformPass.h
new file mode 100644 (file)
index 0000000..13f0cdc
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __LAYER_TRANSFORM_PASS_H__
+#define __LAYER_TRANSFORM_PASS_H__
+
+struct LayerTransformPass
+{
+  virtual ~LayerTransformPass() = default;
+};
+
+#endif // __LAYER_TRANSFORM_PASS_H__