Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-01-04 09:36:06


Hallo,

I'd like to write an optimized axpy_prod for transposed matrices. A good
syntax would be
axpy_prod( trans(A), x, y, init );

trans(A) returns the expression matrix_unary2<M, OP> where M is the type of A
and OP is scalar_identity<M::value_type>. Thus the first guess is to write a
(partial) specialization of axpy_prod:

template < class V, class E1, class E2 >
V &
axpy_prod(const matrix_unary2< E1 >, scalar_identity<E1::value_type> > &
TA, ... );

Unfortunately, this is not more specialized than the generic axpy_prod:

template < class V, class E1, class E2 >
V &
axpy_prod(const matrix_expression< E1 > & TA, ... );

Does anyone have a good solution for this problem? Currently I replace trans()
by a function that returns a proxy object that is no matrix_expression.

mfg
Gunter