Boost logo

Ublas :

Subject: Re: [ublas] Patch/proposal for overloading operator * in ublas
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2009-09-08 02:41:01


K.M.A.Chai_at_[hidden] wrote:

> That said, it will be nice if ublas can be easily extendable. A lot of
> people has been asking about overloading * in ublas. However, currently
> ublas is pretty greedy: it tries to handle all of operator*, so that
> extending operator* in a naive way (by the end user) will lead to the
> compiler complaining. Attached are two patches to make ublas less greedy
> in this aspect.

I agree that uBLAS should be extensible -- e.g., a bit like a toolbox in
Matlab and GLAS.

For this to work, one would need to easily export and extend the domain
specific language (DSL). Perhaps it is a good time to let Boost.Proto handle
uBLAS' expression machinery -- is has the facilities we're looking for.

What would be nice is to be able to work with expression trees. In this case
I'm referring to Proto's semantic actions, or expression transformation.
E.g., rewrite an expression to make use of BLAS calls (or, some other
"backend"). Pattern matching on the expression, rewrite, and transparently
an other expression is used. All in compile time.

Cheers,

Rutger