From: 박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 Date: Thu, 19 Jul 2018 10:11:25 +0000 (+0900) Subject: [coco] Add 'Module' class template (#721) X-Git-Tag: nncc_backup~2376 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3b4fb037955c2e71deec1ec3ad82be3fafdbf80;p=platform%2Fcore%2Fml%2Fnnfw.git [coco] Add 'Module' class template (#721) This commit adds 'Module' class which serves as an entry point for coco IR. Note that this commit justs adds a template (or placeholder) for 'Module' implementation. Signed-off-by: Jonghyun Park --- diff --git a/contrib/coco/core/include/coco/IR/Module.h b/contrib/coco/core/include/coco/IR/Module.h new file mode 100644 index 0000000..3a511ab --- /dev/null +++ b/contrib/coco/core/include/coco/IR/Module.h @@ -0,0 +1,22 @@ +#ifndef __COCO_IR_MODULE_H__ +#define __COCO_IR_MODULE_H__ + +namespace coco +{ + +/** + * @breif Top-level element of coco IR which represents a neural network + */ +class Module final +{ +public: + Module() = default; + +public: + Module(const Module &) = delete; + Module(Module &&) = delete; +}; + +} // namespace coco + +#endif // __COCO_IR_MODULE_H__ diff --git a/contrib/coco/core/src/IR/Module.cpp b/contrib/coco/core/src/IR/Module.cpp new file mode 100644 index 0000000..fc32d05 --- /dev/null +++ b/contrib/coco/core/src/IR/Module.cpp @@ -0,0 +1,3 @@ +#include "coco/IR/Module.h" + +// NOTE Do NOT delete this file; this file checks the completeness of 'Module.h' diff --git a/contrib/coco/core/src/IR/Module.test.cpp b/contrib/coco/core/src/IR/Module.test.cpp new file mode 100644 index 0000000..e4aa140 --- /dev/null +++ b/contrib/coco/core/src/IR/Module.test.cpp @@ -0,0 +1,13 @@ +#include "coco/IR/Module.h" + +#include + +TEST(IR_MODULE, default_constructable) +{ + // coco::Module should be default constructable. + auto m = new coco::Module{}; + + ASSERT_NE(m, nullptr); + + delete m; +}