[moco-tf] Inroduce WindowData annotation (#5797)
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Wed, 24 Jul 2019 01:34:18 +0000 (10:34 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 24 Jul 2019 01:34:18 +0000 (10:34 +0900)
This will introduce WindowData to annotate temporary window attribute for Pooling nodes

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
compiler/moco-tf/src/Annotations/WindowData.h [new file with mode: 0644]

diff --git a/compiler/moco-tf/src/Annotations/WindowData.h b/compiler/moco-tf/src/Annotations/WindowData.h
new file mode 100644 (file)
index 0000000..8bd9625
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd. All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MOCO_TF_WINDOW_DATA_H__
+#define __MOCO_TF_WINDOW_DATA_H__
+
+#include <loco.h>
+
+namespace moco
+{
+namespace tf
+{
+
+/**
+ * @brief WindowData holds temporary 'window' attribute of AvgPool2D, MaxPool2D
+ */
+class WindowData : public loco::NodeAnnotation
+{
+public:
+  WindowData() = default;
+
+public:
+  const loco::Window<2> *window(void) const { return &_window; }
+  loco::Window<2> *window(void) { return &_window; }
+
+private:
+  loco::Window<2> _window;
+};
+
+} // namespace tf
+} // namespace moco
+
+#endif // __MOCO_TF_WINDOW_DATA_H__