diff options
| author | Pjotr Prins | 2025-11-24 13:06:50 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2025-11-24 13:06:50 +0100 |
| commit | f03c82ea21acda54de8cced07ba8150cfafb3769 (patch) | |
| tree | 2432c99cbfed02f3fe9a84a5b55643aff44c1bdb /src/debug.h | |
| parent | c5a402a651d3c6393b1f758fc011c7247e4f042f (diff) | |
| download | pangemma-f03c82ea21acda54de8cced07ba8150cfafb3769.tar.gz | |
Added profiler and figured speed regression with openblas
Diffstat (limited to 'src/debug.h')
| -rw-r--r-- | src/debug.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/debug.h b/src/debug.h index 0489a81..a32bfd2 100644 --- a/src/debug.h +++ b/src/debug.h @@ -60,11 +60,22 @@ void disable_segfpe(); { auto x = m * n; \ enforce_msg(x / m == n, "multiply integer overflow"); } +#ifndef NDEBUG + void write(const double d, const char *msg = ""); void write(const char *s, const char *msg = ""); void write(const gsl_vector *v, const char *msg = ""); void write(const gsl_matrix *m, const char *msg = ""); +#else // NDEBUG + +inline void write(const double d, const char *msg = "") {}; +inline void write(const char *s, const char *msg = "") {}; +inline void write(const gsl_vector *v, const char *msg = "") {}; +inline void write(const gsl_matrix *m, const char *msg = "") {}; + +#endif // NDEBUG + 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); |
