[cmake] Optimize compilation performances#241
Open
Me-k-01 wants to merge 29 commits intoponcateam:masterfrom
Open
[cmake] Optimize compilation performances#241Me-k-01 wants to merge 29 commits intoponcateam:masterfrom
Me-k-01 wants to merge 29 commits intoponcateam:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #241 +/- ##
==========================================
- Coverage 94.07% 94.03% -0.05%
==========================================
Files 83 83
Lines 3323 3300 -23
Branches 267 265 -2
==========================================
- Hits 3126 3103 -23
Misses 196 196
Partials 1 1
🚀 New features to boost your workflow:
|
390c0e6 to
a35af0e
Compare
27c8481 to
e5e780d
Compare
652ce6e to
dd27477
Compare
Contributor
This is not relevant, as Eigen use templates to optimize mathematical operations you have in your code, so you cannot pre-compile it. |
5f8713a to
2c1b865
Compare
4871b8c to
97b5698
Compare
Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <auberval.florian01@gmail.com>
- Removal of extern instruction - Macro name change - Comment of incomplete fit type Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <florian.auberval@irit.fr>
…//stackoverflow.com/questions/2351148/explicit-template-instantiation-when-is-it-used) ETI Tells the compiler to use the extern `Basket` class instead of recompiling it for every compile targets. Signed-off-by: fauberva <florian.auberval@irit.fr>
… test Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <florian.auberval@irit.fr>
Precompile the header before, not for each test Signed-off-by: fauberva <auberval.florian01@gmail.com>
Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <auberval.florian01@gmail.com>
Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <florian.auberval@irit.fr>
- Only keep one header to precompile - Add an option to generate precompiled header for each target Signed-off-by: fauberva <florian.auberval@irit.fr>
Signed-off-by: fauberva <auberval.florian01@gmail.com>
Signed-off-by: fauberva <auberval.florian01@gmail.com>
Signed-off-by: fauberva <auberval.florian01@gmail.com>
Signed-off-by: fauberva <auberval.florian01@gmail.com>
Signed-off-by: fauberva <auberval.florian01@gmail.com>
Signed-off-by: fauberva <auberval.florian01@gmail.com>
Signed-off-by: fauberva <florian.auberval@irit.fr>
7fd7dd2 to
828af24
Compare
Signed-off-by: fauberva <florian.auberval@irit.fr>
b668121 to
f7f803a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix issue #235
This PR aims to add precompiled headers to the Fitting and the SpatialPartitioning module, to accelerate the build time on the CI.
This module uses precompiled header parsing and explicit template instantiation to accelerate the total build time of multiple compile target (like the CI tests, or the code coverage test)
Changes made by this PR
Fittingcontaining all of the commonly used fitting types (a new lib and target must be added in the cmake)Fittingclass in the CI testSpatialPartitioningfor the commonly used KdTree and KnnGraphSpatialPartitioningclass in the CI testCommoncontaining the Commonly used Point typesPointclass in the CI test<array>,<random>...)Troubleshooting notes
When testing the compile target linkage to the precompiled header with :
We do find the U (undefined) symbol in the output, which validates that the compiler is using the extern templated class instead of recompiling it for the target.
However, the computation time increases compared to not using explicit instantiation, this might be because the inlined function are too costly to be preinstantiated by the compiler (further testing in progress).