Skip to content

Symbol export - #2056

Draft
yhmtsai wants to merge 21 commits into
developfrom
symbol_export
Draft

Symbol export#2056
yhmtsai wants to merge 21 commits into
developfrom
symbol_export

Conversation

@yhmtsai

@yhmtsai yhmtsai commented Jul 28, 2026

Copy link
Copy Markdown
Member

This PR tries to export the symbols manually.
It is passed on enabled ref/omp from my side, but it was mostly to enable the symbol when the compilation report unresolved symbol.
Thus, there will still be another round to ensure having the same logic on all of them.
MSVC has different logic on export and import than GCC/CLANG.
Also, Ginkgo has complex setting especially in core. For example, OmpExecutor has different copy is implemented in different backends.

In most cases, instantiation follows the visibility when declaring export in the template declaration in GCC/CLANG. Some needs to export them in instantiation explicitly. In MSVC, we always need to export them in instantiation/definition, but we still need to have them in declaration for importing.
Thus, I go for export/import in declaration and definition in both cases.

vtable symbol sometimes needs explicitly exported in GCC/CLANG but no need in MSVC.
MSVC does not like export the class, which uses std member.
If exporting the entire class, the class inheriting from the base class requires the base class fully imported. This also makes some difficulty in the current ginkgo structure.
In short, we only have export class for GCC/CLANG, but still export function on both side.

I will take the necessary part from GenerateExportHeader with the optional export on class macro.

@ginkgo-bot ginkgo-bot added reg:build This is related to the build system. reg:ci-cd This is related to the continuous integration system. reg:benchmarking This is related to benchmarking. type:solver This is related to the solvers type:preconditioner This is related to the preconditioners type:matrix-format This is related to the Matrix formats type:factorization This is related to the Factorizations type:reordering This is related to the matrix(LinOp) reordering type:multigrid This is related to multigrid type:stopping-criteria This is related to the stopping criteria mod:all This touches all Ginkgo modules. labels Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:all This touches all Ginkgo modules. reg:benchmarking This is related to benchmarking. reg:build This is related to the build system. reg:ci-cd This is related to the continuous integration system. type:factorization This is related to the Factorizations type:matrix-format This is related to the Matrix formats type:multigrid This is related to multigrid type:preconditioner This is related to the preconditioners type:reordering This is related to the matrix(LinOp) reordering type:solver This is related to the solvers type:stopping-criteria This is related to the stopping criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants