Re: [eigen] Malloc-free dynamic matrices

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


ok first of all let me say that the more time passes the more i find
attractive the idea of saying "Let's just decide now what the data
members of class Matrix are for all of Eigen 3.x and if people need
more data members in the future let them just write a new separate
class or a new Option (template parameter) to Matrix". In other words,
just brush the problem away, so, if you want, we add this
allocatedSize member now, but after that, basta. "Le mieux est
l'ennemi du bien", i.e. "Best is the enemy of Good"

Now....

i haven't been able to help it, i've experimented ...mentally... with
d-pointers-without-a-binary-lib, as I said before this boils down to
doing versioning of stuff across different translation units.

Proof-of-concept:

inline int maxEigenVersion()
{
    static int result = 0;
    result = std::max(result, EIGEN_VERSION_AS_INT);
    return result;
}

Now EIGEN_VERSION_AS_INT could be 30405 in Eigen 3.4.5, etc...

Result: if two files A and B call this function, then any subsequent
call to this function will return the max of the Eigen versions that
they use.



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