Boost logo

Boost :

From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2003-05-07 06:57:29


Terje Slettebø wrote:

>>From: "Markus Werle" <numerical.simulation_at_[hidden]>
>
>> At http://daixtrose.sourceforge.net/ You can find an
>> implementation of this idea, code that may serve as a base
>> for boost::etl, if there is any interest.
>
> Have you looked at PETE (Portable Expression Template Engine)
> (http://www.acl.lanl.gov/pete/), and how it compares? Perhaps you could
> have provided a comparison.

I will try a short summary. Also consider the
Daixtrose quicktour at
http://daixtrose.sourceforge.net/quicktour.html

With regard to the core Expression Template engine one
can say that both libs use a similar approach.

IMHO Daixtrose takes these ideas a little bit further:
Daixtrose additionally offers

- a fine-grained disambiguation mechanism which gives You
  a compiler firewall against accidentical wrong combinations
  of incomaptible types, while offering a convenient way to
  express that e.g. a matrix times vector yields a vector result.

- User's choice between reference- _or_ copy-semantics
  based on traits _or_ special member typedefs.
  
- compile-time analytic differentiation

- compile-time expression simplification:
  (a - a) yields 0 at _compile_ time.

- On-the-fly attacheable run-time polymorphism:
  adding features (say member functions)
  to an arbitrary expression such that
    Matrix M1, M2;
    (M1 + M2).operator()(1, 2);
  can be implemented without paying for it in places where You do
  not need it. Also storing pointers to arbitrary expressions
  is easy through this feature.

- feature groups sectioned in namespaces, so using another
  ET lib in the same place should be possible without pain.

- extensible/adaptable pretty-print features

Daixtrose misses direct STL-like support
(now in boost::mpl::foreach etc.)
or features like

  assign(d, a + b * c);
  a += where(d < 30, b, c);

but these can of course be built using daixtrose.

Markus


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