Boost logo

Ublas :

Subject: Re: [ublas] [numeric_bindings] Call LAPACK and BLAS with C arrays
From: sguazt (marco.guazzone_at_[hidden])
Date: 2012-01-31 03:55:11


On Mon, Jan 30, 2012 at 10:36 PM, sguazt <marco.guazzone_at_[hidden]> wrote:
> Hello,
>
> Is it possible to call any of the ::boost::numeric::bindings::lapack
> or ::boost::numeric::bindings::blas functions by using plain C arrays?
>
> In my case a C array can represent either a vector or a linearized
> matrix (in column-major order).
> For instance, take the LAPACK ?POSV subroutine.
>
> Currently I use this "trick":

[cut]

> So is there another way to use numeric_bindings with plain C array?

I forgot to tell that, currently, to make it works, I directly call
functions BLAS_ and LAPACK_ declared in

boost/numeric/bindings/lapack/detail/blas.h
boost/numeric/bindings/lapack/detail/lapack.h

The problem here is that these names are declared in files located
under the 'detail' directory. So, according to the Boost philosophy,
these (macro) names can change in the future. Maybe, you can move
these files up the 'detail' directory and name the macros with
something like BOOST_NUMERIC_BINDINGS_BLAS and
BOOST_NUMERIC_BINDINGS_LAPACK.
Another problem is that the caller has to take care of the
real/complex type of its arrays/matrices.
I mean, I has to decide in advance what to call between Dxxx, Sxxx,
Cxxx, Zxxx, where xxx is a BLAS/LAPACK function.
It would be nice to have also for C arrays polymorphic functions.

Thank you very much.

Best,

-- Marco