Skip to content

Commit

Permalink
Merge pull request #43 from JDAI-CV/bnn_assert
Browse files Browse the repository at this point in the history
Replace assert by BNN_ASSERT (solves #42)
  • Loading branch information
daquexian committed Jul 29, 2019
2 parents 4f87b02 + c470b49 commit d6dd406
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dabnn/bitpack.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ 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 *>(float_mat.data), binary_mat.data,
float_mat.total());
}

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 *>(float_mat.data), binary_mat.data,
float_mat.total());
Expand Down

0 comments on commit d6dd406

Please sign in to comment.