Re: [eigen] Eigen2 to Eigen3 Migration Path

[ Thread Index | Date Index | More Archives ]

OK, thought about this some more.

If EIGEN2_SUPPORT doesn't work for you, then here's what you can do:

 * about the namespace & mangling: go ahead with your Eigen -> Eigen3
renaming, this is a non-issue. Indeed, every .cpp files that makes
Eigen calls, #includes the corresponding Eigen sources itself, so it
will never have to link to another object file to find a function
definition. This means that the only bad effect of this namespace
renaming is at worst to have redundant code (the same function
compiled with Eigen and with Eigen3) which is not a big deal since
it's temporary. You won't get linking failures, and you won't
accidentally link to the wrong function definition.

 * about the include guards and macros, first of all check if it is
really the case that a single .cpp file really needs to include both
eigen2 and eigen3, as opposed to separate .cpp files, some linking to
eigen2 and some to eigen3 ?


2011/1/12 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> 2011/1/12 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
>> On Wed, Jan 12, 2011 at 1:57 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>>> The trivial solution would have been to replace Eigen by Eigen3 and
>>> EIGEN_ by EIGEN3_ everywhere in the Eigen3 sources, but that is quite
>>> invasive at this stage.
>>> However, given that that solves the problem once and for all, also for
>>> any future version, it's quite tempting.
>>> Would you agree with such a change?
>> but think about the hundreds of projects which are already using
>> Eigen3... I'm afraid this is much too late for such a change. Let's
>> first see whether EIGEN2_SUPPORT could not solve the issue.
> My assumption here was that Eigen2 still has many more users than
> Eigen3 has, but indeed experimental data proves me wrong:
> I copied the list of visited pages on our website with number of
> visits in January 2011, and did:
> bjacob@cahouette:~$ grep /dox/ stats | cut -f 2 -d ' ' | awk '{ SUM +=
> $1} END { print SUM }'
> 663
> bjacob@cahouette:~$ grep /dox\-devel/ stats | cut -f 2 -d ' ' | awk '{
> SUM += $1} END { print SUM }'
> 617
> So we seem to have almost as many users on Eigen3 as we have on Eigen2.
> Solving the present problem with EIGEN2_SUPPORT would be great indeed.
> Let's wait to hear back from Tully about that. We can probably extend
> EIGEN2_SUPPORT to do many more things you may need.
> Benoit
>> gael

Mail converted by MHonArc 2.6.19+