diff options
Diffstat (limited to 'src/debug.h')
-rw-r--r-- | src/debug.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/debug.h b/src/debug.h index 69b0a7c..e58c1d5 100644 --- a/src/debug.h +++ b/src/debug.h @@ -25,6 +25,10 @@ bool is_quiet_mode(); bool is_issue(uint issue); bool is_legacy_mode(); +#define check_int_mult_overflow(m,n) \ + { auto x = m * n; \ + enforce_msg(x / m == n, "multiply integer overflow"); } + gsl_matrix *gsl_matrix_safe_alloc(size_t rows,size_t cols); int gsl_matrix_safe_memcpy (gsl_matrix *dest, const gsl_matrix *src); void gsl_matrix_safe_free (gsl_matrix *v); |