Boost logo

Boost :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2002-03-08 08:23:46


On Friday 08 March 2002 10:46, you wrote:
> --- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
> > I think you'd better do some measurements on complex array
>
> expressions
>
> > before making that statement. The whole point of Blitz++ is that the
> > library can see and analyze the entire expression before evaluating
>
> it.
>
> I have done some homework.
> Here is the code:
> http://cci.lbl.gov/~rwgk/shortcuts/cctbx/arraytbx/timing/
> File: run_timing.cpp
> Platform: Compaq Alpha EV67, 667MHz, 4GB RAM, cxx 6.2 (EDG240)
> blitz-20001213.tar.gz does unfortunately not compile with cxx 6.5
> (EDG245)
> which has a much better optimizer.
> Unfortunately our Linux machine is down at the moment.
>
> The code is timing the two most important types of
> expressions in scientific code:
> a + b
> a * b + c
>

[snip]

> Longer expressions are rare in the real-world code that I
> have seen.
I doubt that : just a snippet of my code :

local_a += factor * ( prod(trans(cdshapes),cdshapes) - ( ( 4 * PI2 * freq *
freq / ( i_sos * i_sos
) ) * outer_prod(trans(shapes),shapes) ) );

to calculate the local contribution matrix for an acoustic finite element.
And there are many more much more complex (e.g. elastics, Navier-Stokes,...)

> Given the choice of (a) having to use a GPL
> licensed library or (b) writing the few long /and/
> time-critical expressions as loops I prefer (b), but
> clearly expression-template based algebra with a a free
> license would be best. The source code or compile-time
> overhead will become less and less of an issue with time.
> Maybe one day when I have time I should try out PETE...

I'm using, as you could have notices, ublas.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk