From: 김용섭/동작제어Lab(SR)/Engineer/삼성전자 Date: Wed, 14 Nov 2018 08:21:56 +0000 (+0900) Subject: [neurun] Remove NDEBUG in planTensors (#3579) X-Git-Tag: 0.3~418 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d8b423393d19ffacfb51b9d0a2954b23c629b0d;p=platform%2Fcore%2Fml%2Fnnfw.git [neurun] Remove NDEBUG in planTensors (#3579) * [neurun] Remove NDEBUG in planTensors Removes NDEBUG code in Linear::planTensors. Signed-off-by: Yongseop Kim * Fix format-checker failed --- diff --git a/runtimes/neurun/src/linear/Linear.cc b/runtimes/neurun/src/linear/Linear.cc index 2f97731..f1cbfe6 100644 --- a/runtimes/neurun/src/linear/Linear.cc +++ b/runtimes/neurun/src/linear/Linear.cc @@ -14,6 +14,8 @@ * limitations under the License. */ +#include + #include "Linear.h" #include "graph/Graph.h" @@ -173,11 +175,9 @@ backend::TensorBuilderSet Linear::planTensors() } } -#ifndef NDEBUG // Now, model outputs should be not deallocated - for (const auto &ind : _graph.getOutputs()) - assert(uses_map[ind] > 0); -#endif + assert(std::all_of(_graph.getOutputs().begin(), _graph.getOutputs().end(), + [&uses_map](const graph::operand::Index &ind) { return uses_map[ind] > 0; })); // Set subtensor information // Todo: move this phase outside as optimization phase