Eigen3 Support

I had a little time to fiddle this afternoon and I’ve push a patch to Gerrit that allows building against Eigen3 using the support mode. This means that Eigen3’s API is not yet supported in Avogadro 1.1.x and that the ABI may break.

I think this is a good thing – it allows building against either Eigen 2 or Eigen 3 (long requested). Considering Avogadro 1.x is something of an evolutionary dead-end, I think there isn’t really much motivation to migrate all the code in the v1.x codebase. Such migration can occur as code is migrated to 2.x.

Thoughts?
http://review.source.kitware.com/#/c/12868/

-Geoff

Hi Geoff,

On Mon, Sep 30, 2013 at 8:17 PM, Geoffrey Hutchison geoff.hutchison@gmail.com wrote:

I had a little time to fiddle this afternoon and I’ve push a patch to Gerrit that allows building against Eigen3 using the support mode. This means that Eigen3’s API is not yet supported in Avogadro 1.1.x and that the ABI may break.

The ABI does break, the Eigen vector classes changed some template
arguments for Vector3d defines for example, I hit this when porting
some of the QM code.

I think this is a good thing – it allows building against either Eigen 2 or Eigen 3 (long requested). Considering Avogadro 1.x is something of an evolutionary dead-end, I think there isn’t really much motivation to migrate all the code in the v1.x codebase. Such migration can occur as code is migrated to 2.x.

Thoughts?
http://review.source.kitware.com/#/c/12868/

Most of the migration is relatively simple, I took a quick look and
the only change I would suggest is configuring the Eigen definition so
that users of the Avogadro API don’t need to duplicate this define (or
would it work if they did not). Great to see it was so easy - I had
been meaning to take a look.

Marcus

The ABI does break, the Eigen vector classes changed some template
arguments for Vector3d defines for example, I hit this when porting
some of the QM code.

Considering we broke Avogadro ABI in the 1.1 update, I wasn’t overly concerned about this – largely because I think this effort will make it much easier for packagers to use the newer Eigen code.

Most of the migration is relatively simple, I took a quick look and
the only change I would suggest is configuring the Eigen definition so
that users of the Avogadro API don’t need to duplicate this define (or
would it work if they did not).

Good point, they’ll want the define as well.

-Geoff