Boost logo

Ublas :

Subject: Re: [ublas] Adapt an externally allocated array to matrix?
From: andrea carbone (andrea.carbone_at_[hidden])
Date: 2009-04-30 06:08:52


This can be of some help for your needs:

http://article.gmane.org/gmane.comp.lib.boost.ublas/2050

liu chang wrote:
>
> Is it possible to adapt a C array allocated elsewhere as the storage
> of a dense matrix/vector? i.e.
>
> matrix<float, row_major, ???> a(size1, size2, float*);
>
> There's no mention of this in the documentation, but it looks like a
> custom storage class can play the trick.
>
> As this is required whenever boost::ublas interfaces with other linear
> algebra libraries, I'm sure someone has an implementation floating
> around somewhere. Simply using "float*" doesn't work though :(
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>
>

-- 
View this message in context: http://www.nabble.com/Adapt-an-externally-allocated-array-to-matrix--tp23312056p23313296.html
Sent from the Boost - uBLAS mailing list archive at Nabble.com.