* [neurun] Remove NDEBUG in planTensors
Removes NDEBUG code in Linear::planTensors.
Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
* Fix format-checker failed
* limitations under the License.
*/
+#include <algorithm>
+
#include "Linear.h"
#include "graph/Graph.h"
}
}
-#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