include/pops/runtime/export.hpp File ReferenceΒΆ

adc_cpp: include/pops/runtime/export.hpp File Reference
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
export.hpp File Reference

POPS_EXPORT: force DEFAULT VISIBILITY on an out-of-line symbol, even when the unit is compiled with -fvisibility=hidden (case of the pybind11 _pops module). More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define POPS_EXPORT   __attribute__((visibility("default")))
 

Detailed Description

POPS_EXPORT: force DEFAULT VISIBILITY on an out-of-line symbol, even when the unit is compiled with -fvisibility=hidden (case of the pybind11 _pops module).

Used by the DSL "production" path: a generated .so loader, dlopen-ed at run time (System::add_native_block), includes the add_compiled_model header template which calls OUT-OF-LINE methods of pops::System (install_block / grid_context / ensure_aux_width) DEFINED in the already-loaded _pops module. Without default visibility, these symbols do not appear in the dynamic table of the module and the loader CANNOT resolve them (link failure at dlopen). We therefore export EXACTLY these methods + pops::abi_key (minimal surface). MSVC / Windows: no effect here (POSIX dlopen path; a future Windows port would use __declspec(dllexport)).

Macro Definition Documentation

◆ POPS_EXPORT

#define POPS_EXPORT   __attribute__((visibility("default")))