Boost logo

Ublas :

Subject: Re: [ublas] [numeric_bindings] Call LAPACK and BLAS with C arrays
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2012-02-01 05:04:51

On 2012-01-30 22:36, sguazt wrote:
> So is there another way to use numeric_bindings with plain C array?
> Thank you very much.
> Best,
> -- Marco

Hello Marco,

support for arrays such as double[20] is built into the bindings.
Support for dynamically allocated plain c-arrays is partly finished,
please check the vector_view wrapper:

double *some_data = new double[ 20 ];
some_bindings_routine( ...., vector_view( some_data, 20 ), ... )

I think writing one for matrices is pretty straightforward if you look
at the vector_view one. I think the best thing would be to add some
wrappers and adaptors to have a more complete support for this to the
bindings. Unfortunately I will be short on time for a couple of months.