Re: [eigen] Using transpose in expressions

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


Fixed: https://bitbucket.org/eigen/eigen/commits/de7b8c9b1e86

gael

On Tue, Mar 29, 2016 at 5:33 PM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:
Hi,

thank you for finding this issue.  It's surprising that it has not been discovered earlier. I've already a fix in blas_traits that I'll push after more testing...products...


gael

On Sat, Mar 26, 2016 at 9:23 PM, Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I can confirm this, also on 3.2.8 and 3.2-head. It does work on the 3.3 branch, however (which has a significantly different evaluator structure).

I don't know how to best fix this (I'm not _that_ familiar with Eigen's internals).
Meanwhile, you can work-around this by by adding an .eval() before or after the .transpose()

Christoph


On 2016-03-26 13:51, Brad Bell wrote:
Why does the following program  work when ERROR_CASE is zero and
generates a compile error when ERROR_CASE is one
(I am using eigen-3.2.7).

# include <iostream>
# include <Eigen/Core>
# define ERROR_CASE 1
int main(void)
{   typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> matrix;
     //
     matrix A = matrix::Identity(2, 2);
# if ERROR_CASE
     matrix C = A * (A * A).transpose();
# else
     matrix C = A * A * A.transpose();
# endif
     //
     std::cout << "C = \n" << C << "\n";
}





--
 Dipl. Inf., Dipl. Math. Christoph Hertzberg

 Universität Bremen
 FB 3 - Mathematik und Informatik
 AG Robotik
 Robert-Hooke-Straße 1
 28359 Bremen, Germany

 Zentrale: +49 421 178 45-6611

 Besuchsadresse der Nebengeschäftsstelle:
 Robert-Hooke-Straße 5
 28359 Bremen, Germany

 Tel.:    +49 421 178 45-4021
 Empfang: +49 421 178 45-6600
 Fax:     +49 421 178 45-4150
 E-Mail:  chtz@xxxxxxxxxxxxxxxxxxxxxxxx

 Weitere Informationen: http://www.informatik.uni-bremen.de/robotik






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