[eigen] How can we do in-place calculation for log(x)
• To: eigen@xxxxxxxxxxxxxxxxxxx
• Subject: [eigen] How can we do in-place calculation for log(x)
• From: Hung Dang <hungptit@xxxxxxxxx>
• Date: Tue, 28 Jul 2020 18:22:19 -0400
• Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=ZUuZHNzhR2kPX4QL23s6gR8wP1SkVg8XkZ63s5e6bmQ=; b=n/bIWJfy8hjX5POeW2sp1NecVhGVjFBl9C9bvPt+acOO7O/VVqnA/lCfdqTCdrlaSM sw/3eE/HU50ZApXC3sfm7G+lw1N+zdwQwTuVWJXh2pVU46ffgz6pZc0QWr1ZMRWcfFFC THQLQaRiMwO/Lv2Kt+WSv+HDUmEggHyI+ecitbz3w0++JHIjEci6dgnBAjUtJAW3CJ1s JpDEYX6V+mbAM5xkaYn3Jq3McwFKH3+dv+YsNktnlw7iIQfRwLDr3GqT8cvfjxkpj8iN wuicVfqzRIsUlVUgZ9yksaMjEoVzLh1B7gb5WsH1m3W2jTOMmiqgvxZqy/xu8Xd3K1zD b0vw==

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/