This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 269 - Create a header which properly forwards eigen types
Summary: Create a header which properly forwards eigen types
Status: RESOLVED WONTFIX
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.0
Hardware: All All
: --- Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on: 339
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-16 13:57 UTC by Benjamin Schindler
Modified: 2019-12-04 10:45 UTC (History)
3 users (show)



Attachments

Description Benjamin Schindler 2011-05-16 13:57:29 UTC
To reduce compilation time, I'd like to have the possibility to forward-declare eigen types. Eigen got quite expensive nowadays:

bschindl@hundertwasser ~/documents $ cat test.cpp
#include <eigen3/Eigen/Core>
bschindl@hundertwasser ~/documents $ g++ -E -o test.cpp.o test.cpp 
bschindl@hundertwasser ~/documents $ wc -l test.cpp.o 
56644 test.cpp.o

So basically, 56k lines of code by including eigen only - that's a lot. Of course, quite a bit of it is shared (i.e. comes from stl headers but still). 

There is Eigen/src/Core/util/ForwardDeclarations.h, but eigen files are not self-contained unfortunately (i.e. to include it, I'd have to do: 

namespace Eigen { #include <....> }

but Eigen/Core does a lot more preprocessor stuff to make this just work, so currently there is no easy solution
Comment 1 Gael Guennebaud 2013-06-10 21:05:04 UTC
We had something like that at the beginning of Eigen, but in practice the gain on compilation times was really small. You can try by copying Eigen/Core and removing everything after ForwardDelcarations.h.

A better solution is to use precompiled headers. So I'd say wontfix.
Comment 2 Nobody 2019-12-04 10:45:03 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/269.

Note You need to log in before you can comment on or make changes to this bug.