octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: including a new gnulib module


From: Max Brister
Subject: Re: including a new gnulib module
Date: Thu, 26 Jul 2012 08:39:21 -0500

On Thu, Jul 26, 2012 at 8:34 AM, c. <address@hidden> wrote:
>
> Il giorno 26/lug/2012, alle ore 15.33, Max Brister ha scritto:
>
>> A better way to do the copy might be using std::copy. For example,
>> double *dout = reinterpret_cast<double *> (out);
>> std::copy (dout, dout + l, res.fortran_vec ());
>
> Actually what I was asking for was a way to avoid the copy.
>
>> Also, reinterpret_cast is used instead of (double *). This is because
>> we prefer C++ style casts over C style casts in core.
>>
>> Max Brister
> c.
>

I don't think you are going to be able to do that currently. The array
class would need a constructor that takes a pointer to existing data
and its dimensions. It should be possible to add such a constructor,
but I don't know if we want to.

Max Brister


reply via email to

[Prev in Thread] Current Thread [Next in Thread]