Boost logo

Boost Users :

Subject: [Boost-users] Matrix of external data
From: petros (pmamales_at_[hidden])
Date: 2011-03-29 14:32:34


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



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