Re: [eigen] How can we do in-place calculation for log(x)

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi Gael,

Thank a lot for the confirmation.

Best,
Hung


On Thu, Jul 30, 2020 at 10:31 AM Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:
Hi,

yes, with "x = x.array().log()" the operation is done inplace, no temporary.

Gaël

On Wed, Jul 29, 2020 at 12:22 AM Hung Dang <hungptit@xxxxxxxxx> wrote:
Hi,

I need to compute x = log(x) in-place, with x can be either a vector or a matrix. This task can be done using either a simple for-loop or x = x..array().log(). The second solution is vectorized, however, I am not sure if it can be done in-place. Is there any better solution?

Regards,
Hung 









Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/