Boost logo

Ublas :

Subject: Re: [ublas] [bindings][lapack] Interface design
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2008-12-04 04:45:40


Jesse Perla wrote:
> But by adding in the interfaces as proposed by Rutger, this is already
> getting into the usability game somewhat. I would love to have a fully
> implemented GLAS, etc. but it is far off. And most people see
> boost::ublas and an eventual ublas bindings in boost as the primary
> combination to make C++ a worthy replacement for matlab, and superior in
> semantics to fortran. And if there is little extra effort in generating a
> few alternatives through overloaded functions within a generation script,
> then perhaps it is worth
> considering when designing the interface at this stage.

Thanks Jesse for your comments. I think what you're suggesting would be a
nice-to-have, but would lead to a number of issues, also from a usability
point of view. I think the syntax may become misleading. If you write

vector<double > w = lapack::solve( A, b );

it could be that you assume that A and b are not destroyed, whereas many (or
almost) all LAPACK calls modify its arguments. This would mean copying A,
etc., etc..

I think what you're proposing is not lapack-specific, but addresses the
bindings in general. I think you would like to have bindings that play well
with the semantics of e.g. uBLAS?

I would like to propose that we postpone this piece, because I think what we
should do (as bindings) if we want to do this well, is not only to write
glue for uBLAS or similar, but also to dispatch calls to more than just the
LAPACK backend :-). (e.g., ATLAS also knows some LAPACK).

Cheers,

Rutger