Skip to content

Start usage of extern templates

Guillaume Pasero requested to merge 1649-extern-templates-take3 into develop

Summary

This is the 3rd attempt to integrate extern templates into OTB.

Rationale

This work is part of the build performance story (#1649 (closed))

Implementation Details

This 3rd try is based on branches 1649-extern-templates and 1649-extern-templates-take2. Here is the summary:

  • As in "take2", use a custom GenerateExportHeaderCustom module to generate export headers.
  • Use extern templates with common types for classes :
    • Image
    • VectorImage
    • ImageFileReader
    • ImageFileWriter
  • Clean export macros (remove/replace ITK_EXPORT) in modules ImageBase and ImageIO
  • other minor fixes to reduce the number of symbols compiled

You can use the following command to check the impact:

find . -name "*.o" -exec nm -g --demangle '{}' \; | grep " W otb::" | sort | uniq -c | sort -n

Additional notes

Two classes have not been exported by default (ITK_EXPORT removed) as they are not used outside their module :

  • otb::ExtractROIBase
  • otb::ImageSeriesFileReaderBase

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement

Merge request reports