[eigen] Today's joke

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


Hi again,

so, while doing the index types change, I realized something that's
going to make me take a more humble approach in my rationalizations in
the future :)

Many people asked why the strange value 33331 for the constant
Dynamic. An explanation is given in the code (see Constants.h), but
that basically has a lot to do with the assumption that indices are at
least 32bit wide. Of course, since today, that is no longer always
true. For now the only valid use case for changing that is in the
Sparse module, where we don't use that Dynamic value much, but still,
it's unsafe. And since it's a usual template parameter value for
Matrix, it impacts a lot our ABI. In short, once Eigen 3.0 is
released, we can't tweak that value anymore. So having it rely on
technical details is not comfortable.

So i think after all I'll follow people's sound advice and change it to -1 !!!!

My big argument against that is that e.g. (RowsAtCompileTime <= 4)
will no longer mean what it seems to (it will be true in the Dynamic
case !!!) but that is fortunately not a kind condition that we use too
frequently in the code. Should be a reasonably small change.

Benoit



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