Boost logo

Boost Users :

From: jhr.walter_at_[hidden]
Date: 2003-03-22 06:04:33


----- Original Message -----
From: stuart macgregor
To: boost-users_at_[hidden]
Sent: Friday, March 21, 2003 2:26 PM
Subject: [Boost-Users] ublas: questions from a newcomer

> I am interested in ublas for linear algebra. In addition to the simple
> operations supported by ublas I will need comprehensive access to lapack
> for the real work.
>
> I see in the wiki that some work has been done in this area. Is this
> numeric/binding stuff working,

I believe, Toon and Kresimir have working code using the bindings.

> and can it be readily extended to the full
> set of lapack routines?

Are you kidding? One can easily call the original LAPACK routines using the
ublas accessors to internal data structures. But then one has to cope with
the fortran signatures and there would be some 'impedance mismatch'. But I
believe we're exactly talking about wrapping this (for some 1200 functions
IIRC)?

> Some kind of meta program to generate lapack interfaces from a parameter
> spec would be nice (ruby/perl? or just a description of what needs to be
> done) Then I could happily bring up the interfaces I need.

Interesting idea. I'll have to think about it.

> Is there any way to generate vectore and matrices which do not own the
data
> buffer which they provide access to - 'view' or 'sub' objects in other lin
> alg packages? This would be very valuable to me for interfacing existing
> code, without duplicating storage and doing unnecessary copies. I found
it
> difficult to determine from the current documentation.

ublas has an undocumented (reference counted) storage container
array_adaptor<> for this.purpose. It is a bit dangerous as it changes the
usual assignment semantics in certain cases. I needed it to adapt ublas for
use in CLAPACK.

> I have one worry: Ublas, and most of the boost modules, seems to me not
for
> the faint hearted. They are clearly powerful, but seem to expect a lot
> from a potential user.

Pretty unsure. But compiler diagnostics clearly are a pain sometimes.

> Are these facilities aimed at library writers rather than users whoes
skill
> focus may lie in other domains?

I believe they are made for C++ programmers which like to use the standard
library ;-)

> I am thinking of apl (and related J++ (not java)) which is very powerful,
> but has only minority appeal because it is too alien and unnatural for
> ordinary mortals. The advocates take great pride in how powerful a small
> and almost incomprehensible line of code can be (FFT in one short line
> etc.), and implicitly how clever they are to generate and understand it.
>
> I expect that a user level doc may eventually make ublas/lapack much more
> approachable by a non computer science mathematician or engineer.

Definitely.

> Forgive me if the above sounds critical and ungracious for free software,
> but I want to use boost and I am worried that it may be too demanding for
> its benefites to be justified for use by the group of people I work with.

Sorry, can't help here.

Best,

Joerg


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net