Re: [eigen] Significant perf regression probably due to bug 363 patches

[ Thread Index | Date Index | More Archives ]

2011/11/5 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> So this is really a bug in your code; did this ever work? Meanwhile,
> we should try to generate an error at compile time in this case. This
> should be easy since x and y are of templated type so we get to know
> (in frame 3) that they're floats which doesn't make sense for (rows,
> cols) dimensions.

Done in changeset c6f51dc87530 , so your code now gives this compile error:

In file included from eigen/Eigen/Core:289:0,
                 from eigen/bench/BenchTimer.h:46,
                 from Downloads/GgmLvqBench.cpp:25:
eigen/Eigen/src/Core/PlainObjectBase.h: In member function ‘void
Eigen::PlainObjectBase<Derived>::Index, typename
SizeAtCompileTime != 2), T0>::type*) [with T0 = float, T1 = float,
Derived = Eigen::Matrix<float, 4, 1>,
Eigen::PlainObjectBase<Derived>::Index = long int, typename
SizeAtCompileTime != 2), T0>::type = float]’:
eigen/Eigen/src/Core/Matrix.h:252:7:   instantiated from
‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows,
_MaxCols>::Matrix(const T0&, const T1&) [with T0 = float, T1 = float,
_Scalar = float, int _Rows = 4, int _Cols = 1, int _Options = 0, int
_MaxRows = 4, int _MaxCols = 1]’
Downloads/GgmLvqBench.cpp:386:76:   instantiated from here
eigen/Eigen/src/Core/PlainObjectBase.h:599:7: error: static assertion


Mail converted by MHonArc 2.6.19+