<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hans,<div><br></div><div>Thanks for sharing this work.</div><div><br></div><div>I was able to utilize your script and methodology for SimpleITK to explicitly instantiate about 16 classes with their commonly used arguments as by SimpleITK [1]. I created a separate library in SimpleITK which contains these explicitly instantiated classes [2].</div><div><br></div><div>These instantiations reduced the size of the .o files for SimpleITK by ~30% (500MB), and enabled linking once again on Windows 64. Some systems seem to also gain significant performance in build time (over 2X), but there are many reasons for it including running into memory or IO limitations on the individual system.</div><div><br></div><div>However I was not able to get it working with the explicitly instantiated library as shared. The mixtures of export specification of the initial ITK declaration and the explicit instantiation linking specification didn't appear to work. I think they need to be consistent? I followed the methodology that was done for the MetaDataObjects[3]. If I build ITK and SimpleITK as shared but with the Explicit library as static it appears to work.</div><div><br></div><div>Any help on explicitly instantiation with shared libraries would be appreciated!</div><div><br></div><div>Thanks,</div><div>Brad</div><div><br></div><div>[1] <a href="https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/include/sitkExplicitITK.h">https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/include/sitkExplicitITK.h</a></div><div>[2] <a href="https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/src/CMakeLists.txt">https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/src/CMakeLists.txt</a></div><div>[3] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/d195bfb21e8af086c67208c2b96d5fd5992c66ca/Modules/Core/Common/include/itkMetaDataObject.h#L191-L224">https://github.com/InsightSoftwareConsortium/ITK/blob/d195bfb21e8af086c67208c2b96d5fd5992c66ca/Modules/Core/Common/include/itkMetaDataObject.h#L191-L224</a></div><div><br><div><div>On Jan 28, 2015, at 12:16 PM, Johnson, Hans J <<a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Yes!  I’d love someone to investigate further:</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="https://github.com/hjmjohnson/ITK/tree/TryExplicitInstantiationTesting" class="">https://github.com/hjmjohnson/ITK/tree/TryExplicitInstantiationTesting</a></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="https://github.com/hjmjohnson/ITK/commit/0576c75c8a760f1cafcde3125210134a39502304" class="">https://github.com/hjmjohnson/ITK/commit/0576c75c8a760f1cafcde3125210134a39502304</a></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Hans</div></blockquote></div><br></div></body></html>