From e90cf91feeddd43baf304f9f6678a31a09592eff Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Senior=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Thu, 19 Apr 2018 13:27:53 +0900 Subject: [PATCH] [caffegen] Add Layer-related classes (#97) 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 --- contrib/caffegen/include/Layer.h | 15 +++++++++++++++ contrib/caffegen/include/LayerAnalysisPass.h | 9 +++++++++ contrib/caffegen/include/LayerTransformPass.h | 9 +++++++++ 3 files changed, 33 insertions(+) create mode 100644 contrib/caffegen/include/Layer.h create mode 100644 contrib/caffegen/include/LayerAnalysisPass.h create mode 100644 contrib/caffegen/include/LayerTransformPass.h diff --git a/contrib/caffegen/include/Layer.h b/contrib/caffegen/include/Layer.h new file mode 100644 index 0000000..971ba38 --- /dev/null +++ b/contrib/caffegen/include/Layer.h @@ -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 index 0000000..60f9d24 --- /dev/null +++ b/contrib/caffegen/include/LayerAnalysisPass.h @@ -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 index 0000000..13f0cdc --- /dev/null +++ b/contrib/caffegen/include/LayerTransformPass.h @@ -0,0 +1,9 @@ +#ifndef __LAYER_TRANSFORM_PASS_H__ +#define __LAYER_TRANSFORM_PASS_H__ + +struct LayerTransformPass +{ + virtual ~LayerTransformPass() = default; +}; + +#endif // __LAYER_TRANSFORM_PASS_H__ -- 2.7.4