[coco] Remove deprecated FeatureObject constructor (#2588)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Mon, 10 Dec 2018 08:02:51 +0000 (17:02 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 10 Dec 2018 08:02:51 +0000 (17:02 +0900)
This commit removes deprecated FeatureObject constructor with
FeatureShape.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/coco/core/include/coco/IR/FeatureObject.h
contrib/coco/core/src/IR/FeatureObject.cpp
contrib/coco/core/src/IR/FeatureObject.test.cpp

index 62cf42c..87ede29 100644 (file)
@@ -36,7 +36,6 @@ class FeatureObject final : public Object
 {
 public:
   FeatureObject() = default;
-  explicit FeatureObject(const FeatureShape &shape);
 
 public:
   ~FeatureObject();
index b7f2270..5c3c36a 100644 (file)
  */
 
 #include "coco/IR/FeatureObject.h"
-#include "coco/IR/FeatureLayouts.h"
-
-#include <nncc/core/ADT/feature/CHWLayout.h>
-#include <nncc/foundation/Memory.h>
 
 #include <cassert>
 
-using nncc::foundation::make_unique;
-
 namespace coco
 {
 
-FeatureObject::FeatureObject(const nncc::core::ADT::feature::Shape &shape)
-{
-  _layout = FeatureLayouts::Generic::create(shape);
-}
-
 FeatureObject::~FeatureObject()
 {
   // DO NOTHING
index f545164..f6b4fbf 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include "coco/IR/FeatureObject.h"
+#include "coco/IR/FeatureLayouts.h"
 
 #include <nncc/foundation/Memory.h>
 
@@ -31,9 +32,11 @@ namespace
 class FeatureObjectTest : public ::testing::Test
 {
 protected:
+  // TODO Deprecate this method
   coco::FeatureObject *allocate(const feature::Shape &shape)
   {
-    auto o = new coco::FeatureObject{shape};
+    auto o = new coco::FeatureObject{};
+    o->layout(coco::FeatureLayouts::Generic::create(shape));
     _allocated.emplace_back(o);
     return o;
   }