From c470b49887014f59afbac368692da539f35a7c41 Mon Sep 17 00:00:00 2001 From: daquexian Date: Mon, 29 Jul 2019 14:57:56 +0800 Subject: [PATCH] Replace assert by BNN_ASSERT (solves #42) --- dabnn/bitpack.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dabnn/bitpack.h b/dabnn/bitpack.h index 36f6822..f50024b 100644 --- a/dabnn/bitpack.h +++ b/dabnn/bitpack.h @@ -214,7 +214,7 @@ inline void pack_128_baseline(const float *float_ptr, void *binary_ptr, } inline void pack_mat_128_opt(const bnn::Mat &float_mat, bnn::Mat &binary_mat) { - assert(!binary_mat.empty()); + BNN_ASSERT(!binary_mat.empty(), "binary_mat must not be empty"); pack_128_opt(static_cast(float_mat.data), binary_mat.data, float_mat.total()); @@ -222,7 +222,7 @@ inline void pack_mat_128_opt(const bnn::Mat &float_mat, bnn::Mat &binary_mat) { inline void pack_mat_128_baseline(const bnn::Mat &float_mat, bnn::Mat &binary_mat) { - assert(!binary_mat.empty()); + BNN_ASSERT(!binary_mat.empty(), "binary_mat must not be empty"); pack_128_baseline(static_cast(float_mat.data), binary_mat.data, float_mat.total());