Introduce Kernel Reader interface (#122)
author박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com>
Mon, 23 Apr 2018 23:59:26 +0000 (08:59 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 23 Apr 2018 23:59:26 +0000 (08:59 +0900)
This commit introduces 'nncc::core::ADT::kernel::Reader' class which
serves as a base interface for accessing the content of kernel without
modification.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
libs/core/include/nncc/core/ADT/kernel/Reader.h [new file with mode: 0644]
libs/core/src/nncc/core/ADT/kernel/Reader.cpp [new file with mode: 0644]

diff --git a/libs/core/include/nncc/core/ADT/kernel/Reader.h b/libs/core/include/nncc/core/ADT/kernel/Reader.h
new file mode 100644 (file)
index 0000000..3fe6b0e
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef __NNCC_CORE_ADT_KERNEL_READER_H__
+#define __NNCC_CORE_ADT_KERNEL_READER_H__
+
+#include <cstdint>
+
+namespace nncc
+{
+namespace core
+{
+namespace ADT
+{
+namespace kernel
+{
+
+template <typename T> struct Reader
+{
+  virtual ~Reader() = default;
+
+  virtual T at(uint32_t nth, uint32_t ch, uint32_t row, uint32_t col) const = 0;
+};
+
+} // namespace kernel
+} // namespace ADT
+} // namespace core
+} // namespace nncc
+
+#endif // __NNCC_CORE_ADT_KERNEL_READER_H__
diff --git a/libs/core/src/nncc/core/ADT/kernel/Reader.cpp b/libs/core/src/nncc/core/ADT/kernel/Reader.cpp
new file mode 100644 (file)
index 0000000..040c1ec
--- /dev/null
@@ -0,0 +1,4 @@
+#include "nncc/core/ADT/kernel/Reader.h"
+
+// DO NOT REMOVE THIS FILE
+// This file is introduced to test the self-completeness of 'Reader.h'