Boost logo

Boost :

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


Hi!

While writing (and reading) code which uses the Expression
Template technology I encountered a lot of code repetition.
The task of providing a code base for the representation of
expressions by nested types has to be done over and over again.

E.g. POOMA has a representation for a binary operation,
boost::spirit::phoenix has a representation for this, too,
but prefers to call it binary_operator,
boost::lambda calls it detail::binary_rt,
boost::ublas has vector_binary etc. and
others have similar stuff, too.

Of course all these are incompatible.

The good news is: this code repetition can be avoided.
The code base needed for representing expressions by nested
types can be written once for all times.
This allows one to concentrate on code features
while not having to repeat the tedious task of reinventing
the ET framework over and over again.

Questions like whether copy or reference semantics
are appropriate or how to achieve expression simplification
at compile time can be solved such that these features
are truly reusable.

I call this Second Generation Expression Templates.
The core idea is to completely separate the
parsing of an expression (and its storage in a
corresponding type) from the lazy resp. delayed execution.

The former is what can go into boost::etl, the latter is
what is left to library writers who build code upon this
new lib.

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.

When I wrote that lib I was unaware of the boost naming convention,
but since it will take only a few days to convert the code
I do not care too much about this.
I am also open to some redesign or name changes in general.

Currently Daixtrose is under an extended LGPL which allows
using it even in commercial projects without being forced to
publish the own source code. I can think of a
a boost-compliant change regarding the license.

Please tell me whether You think that such a lib is useful
for boost and what You think about the way I tried to solve
Expression Template programming once for all times.

best regards,

Markus


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