Boost logo

Boost :

From: Lubomir Bourdev (lbourdev_at_[hidden])
Date: 2006-11-17 16:40:57


I haven't played much with ublas, but it seems like you can easily
construct a GIL view from ublas matrix:

typedef boost::numeric::ublas::matrix<float> Matrix;
Matrix m(3, 3);

float* data=&m.data()[0]; // is there a better way?
gray32f_view_t gv=interleaved_view(m.size1(), m.size2(),
                   (gray32f_ptr_t)data,
m.size1()*sizeof(Matrix::value_type));
fill_pixels(gv, bits32f(0));

Lubomir

> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of N H
> Sent: Thursday, November 16, 2006 7:23 PM
> To: boost_at_[hidden]
> Subject: [boost] GIL -request interface to ublas
>
> vigra's inheritance structure is good for multi dimensional
> operation(tensor operation).
>
> vigra::MultiArrayView -> vigra::MultiArray -> vigra::Matrix
> vigra::MultiArrayView -> vigra::BasicImageView
>
> But I can't find similar relation among
> GIL, boost::numeric::ublas, boost::multi_array
>
> My request is interface to ublas like this
>
> view_mat = view(ublas::matrix)
> gray32f_image_t dist_img=resampling(view_mat)
>
> Then GIL can use LAPCK via ublas.
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk