This commit implements 'InputManager' class which serves as a Input
(IR entity) factory.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
--- /dev/null
+#ifndef __COCO_IR_INPUT_MANAGER_H__
+#define __COCO_IR_INPUT_MANAGER_H__
+
+#include "coco/IR/Input.h"
+
+#include "coco/ADT/PtrManager.h"
+
+namespace coco
+{
+
+struct InputManager final : public PtrManager<Input>
+{
+ Input *make(const nncc::core::ADT::tensor::Shape &);
+};
+
+} // namespace coco
+
+#endif // __COCO_IR_INPUT_MANAGER_H__
--- /dev/null
+#include "coco/IR/InputManager.h"
+
+#include <nncc/foundation/Memory.h>
+
+namespace coco
+{
+
+Input *InputManager::make(const nncc::core::ADT::tensor::Shape &shape)
+{
+ return take(nncc::foundation::make_unique<Input>(shape));
+}
+
+} // namespace coco
--- /dev/null
+#include "coco/IR/InputManager.h"
+
+#include <gtest/gtest.h>
+
+TEST(IR_INPUT_MANAGER, make)
+{
+ const nncc::core::ADT::tensor::Shape shape{1, 3, 3, 1};
+
+ coco::InputManager mgr;
+
+ auto input = mgr.make(shape);
+
+ ASSERT_EQ(input->shape(), shape);
+}