[enco] Remove redundant host memory allocation (#1225)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 29 Aug 2018 02:58:43 +0000 (11:58 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 29 Aug 2018 02:58:43 +0000 (11:58 +0900)
This commit removes redundant host momory allocation introduced by
mistake.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/enco/core/src/CppCode.cpp

index 9840cf0..9678a8d 100644 (file)
@@ -150,23 +150,6 @@ void CppCode::dump(std::ostream &os) const
   }
 
   // Set dedicated memory reigion for intermediate buffer(s)
-  for (uint32_t n = 0; n < m->entity()->bag()->size(); ++n)
-  {
-    auto bag = m->entity()->bag()->at(n);
-
-    if (!bag->isInput() && !bag->isOutput())
-    {
-      auto name = invoke.local();
-
-      invoke.head.append("auto ", name, " = new uint8_t[", bag->size() * sizeof(float), "];");
-      invoke.tail.append("delete[] ", name, ";");
-
-      mem.base(bag, name);
-      mem.size(bag, pp::fmt(bag->size() * sizeof(float)));
-    }
-  }
-
-  // Set dedicated memory reigion for intermediate buffer(s)
   for (const auto &bag : intermediates(_code))
   {
     auto name = invoke.local();