Boost logo

Ublas :

Subject: Re: [ublas] Can I reliably use &(Foo.data()[0]) to pass a pointer to matrix data?
From: Nasos Iliopoulos (nasos_i_at_[hidden])
Date: 2013-06-25 19:16:00


Ramsey,
unless your toolset is using a very strange std allocator implementation
(I have personally never seen a deployment with such a strange
allocator), it will work fine.

-Nasos

On 06/25/2013 02:58 PM, Ramsey, James J CIV (US) wrote:
> I know that with std::vector<Scalar> foo, I can pass a pointer to its data (e.g., to a function that expects an argument of Scalar*), and it should consistently work. Will something similar hold true if, say, I have a uBlas vector of Scalars Foo? That is, can I pass &(Foo.data()[0]) as a Scalar* argument in a function?
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: athanasios.iliopoulos.ctr.gr_at_[hidden]