|
Boost Users : |
Subject: Re: [Boost-users] Matrix of external data
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2011-03-29 15:53:28
On 2011-03-29 20:32, petros wrote:
> Hi,
> I am new to the matrix functionality of ublas and would like to ask a
> couple of questions.
> What I want to do is use the matrix data structures from ublas, together
> with a vendor supplied
> lapack (mkl).
> The issue is that , lapack acts on raw pointers to the matrix data,
> which, most of the time, it assumes to be
> contiguous â or some striding info is requested.
> Here are the questions:
> a) it is not clear to me that the storage is guaranteed to be
> contiguous. What would be the appropriate storage class to use?
> I would prefer that this is not stl-vector-based choice, since this is
> no longer guaranteed (to my knowledge) to possess this property.
> b) is there a way to wrap the data structure into a reference counted
> pointer? There would be a few benefits to this, as using the
> same matrix from different threads. Also, obviously, sharing the same
> data from many matrices, views to matrices etc.
> Also, very importantly to me, I would like to have the ability to
> âcreateâ a matrix form an existing raw pointer, by âdressingâ it into
> a ref-counted one, therefore separating the data ownership from the
> matrix functionality. Is there an example that does something along
> these lines?
> Thank you very much, in advance, for your help,
> Petros
>
Hello Petros,
are you aware of Boost.NumericBindings library, which is under
development? It provides modern-C++-glue between numeric algorithms such
as those provided by LAPACK, BLAS, and matrix and vector containers such
as those provided by uBLAS, eigen, MTL, and more.
The library may be found here:
http://svn.boost.org/svn/boost/sandbox/numeric_bindings/
Cheers,
Rutger
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