Boost logo

Ublas :

Subject: [ublas] newbie question: toolchain eclipse/mingw/g++ debug checks as errors.
From: Jeremiah Rounds (jeremiahrounds_at_[hidden])
Date: 2010-03-27 16:49:31

Hi. New to ublas. I am compiling via hpp files instead of a linked library. Tool chain is windows/eclipse/mingw/g++/makefiles.
 When NDEBUG is not defined I get various bounds checks and that is great (eg Check failed in file ./boost/numeric/ublas/matrix_sparse.hpp at line 347: !preserve etc). What I would like is for these checks to create an error before they terminate the program in this tool chain. Because at the moment eclipse/ mingw/ gdb won't catch them as errors in debugging, so essentially to track down the last call before the termination message by hand. I would really like to step into this though at the time of the failed check so I can look at the call stack..Honestly, I am not sure what side of the problem I should work this on: is there a #define that will help me, is there a tweak to eclipse/gdb that will help me. Any comment in this direction would be great.
Gist: I want the program to fault instead of terminate so that eclipse/gdb will be spring into action without any more effort.

As a PS (and a far lessor issue that I would not even post for), I have notice for mapped_matrix<double> creating transposes via iterators in the most naive and straightforward fashion beats the implementation of trans(m) where m is a mapped_matrix<double> by factors of 10. Does that sound right? It just seemed weird to me. IE this is much much much faster than trans for me:
        void equal_transpose(SMatrix& m){ clear(); resize(m.size2(),m.size1()); smatrix_t::iterator1 i1 = m.begin1(); smatrix_t::iterator1 end1 = m.end1(); smatrix_t::iterator2 i2; smatrix_t::iterator2 end2; while(i1 != end1){ i2 = i1.begin(); end2 = i1.end(); while(i2 != end2){ //cout << i1.index1() << " " << i2.index2() << endl; (*this)(i2.index2(),i1.index1()) = *i2; i2++; } i1++; }

Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.