Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-11-30 16:14:44


nisha kannookadan schrieb:
> Hey everybody
>
> Finally I got to the ublas mailing list and I hope u guys can help me.
> Im quite new with boost and everything else than an expert.
>
> Im programming in C++ and have to translate a program from matlab
> to C++. I did it, but my program is way to slow.
>
> I got already suggestions from the boost users and developpers:
> - to do pass by refernce
> - define DNDEBUG
> - to compile with full optimization
> - to use bindings (but I dont think, I need it, since its not high level matrix stuff)
> - and that I should go to post the question here :).
>
> I did some of the changes already and it got little better, but its still bad.
>
> The program is quite huge, so I took a part out of it, which is now even runnable
> for you.
> I post here the maltab and c++ code, so u maybe can help me.
>
What type of matrix do you use? Matlab makes heavy use of sparse an
structured matrices. If you compare this with dense matrices the result
may be useless.

some further comments:
A.clear() sets the matrix to zero.
Why do you first assign zero and right after that another value? (only
the first and last row have to be cleared)

mfg
Gunter