Boost logo

Ublas :

From: Joe Gottman (jgottman_at_[hidden])
Date: 2007-04-06 20:24:59


    I recently ran some code in debug mode and was astonished at how
long it took to run. After profiling I discovered that the bottleneck
was caused by the uBlas debug macros. Since I still needed to debug the
code but couldn't afford to spend 40 minutes on a single test run, I
manually defined all the uBlas NDEBUG macros to disable the uBlas
checking while still being able to use the debugger. This worked, but
it was extremely inconvenient and time-consuming.

    It would be nice if you allowed users to define a BOOST_UBLAS_NDEBUG
macro to disable only the uBlas debug macros. Then in
boost/numeric/ublas/detail/config.hpp, you can replace the line
        #ifdef NDEBUG
with
        #if defined(NDEBUG) || defined(BOOST_UBLAS_NDEBUG)

and the user will be able to disable the uBlas check macros and still be
able to debug.

Joe Gottman