From 21888759019a0806ade8501ba1415e498515694e Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Wed, 29 Aug 2018 11:58:43 +0900 Subject: [PATCH] [enco] Remove redundant host memory allocation (#1225) This commit removes redundant host momory allocation introduced by mistake. Signed-off-by: Jonghyun Park --- contrib/enco/core/src/CppCode.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/contrib/enco/core/src/CppCode.cpp b/contrib/enco/core/src/CppCode.cpp index 9840cf0..9678a8d 100644 --- a/contrib/enco/core/src/CppCode.cpp +++ b/contrib/enco/core/src/CppCode.cpp @@ -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(); -- 2.7.4