35 auto &w =
work.emplace();
36 w.arg.resize(
static_cast<size_t>(
sz_arg));
37 w.res.resize(
static_cast<size_t>(
sz_res));
38 w.iw.resize(
static_cast<size_t>(
sz_iw));
39 w.w.resize(
static_cast<size_t>(
sz_w));
44 : so_handle{std::move(so_handle)} {
48 : so_handle{
o.so_handle}, functions{
o.functions} {
52 : so_handle{std::move(
o.so_handle)}, functions{
o.functions},
53 work{std::move(
o.work)}, mem{std::exchange(
o.mem,
nullptr)} {}
#define BEGIN_ALPAQA_CASADI_LOADER_NAMESPACE
#define END_ALPAQA_CASADI_LOADER_NAMESPACE
std::pair< casadi_int, casadi_int > size() const
Class that loads and calls pre-compiled CasADi functions in a DLL/SO file.
struct alpaqa::casadi::Function::Functions functions
casadi_int size1_out(casadi_int) const
fname_init_mem::signature_t * init_mem
fname_n_out::signature_t * n_out
fname_decref::signature_t * decref
std::pair< casadi_int, casadi_int > size_in(casadi_int) const
fname_sparsity_in::signature_t * sparsity_in
void load(void *so_handle, const std::string &func_name)
std::pair< casadi_int, casadi_int > size_out(casadi_int) const
fname_sparsity_out::signature_t * sparsity_out
Sparsity sparsity_in(casadi_int) const
std::shared_ptr< void > so_handle
casadi_int size2_out(casadi_int) const
Function(std::shared_ptr< void > so_handle, const std::string &func_name)
std::optional< Work > work
Sparsity sparsity_out(casadi_int) const
casadi_int size1_in(casadi_int) const
fname_alloc_mem::signature_t * alloc_mem
fname_free_mem::signature_t * free_mem
fname_incref::signature_t * incref
casadi_int size2_in(casadi_int) const
fname_work::signature_t * work
fname_n_in::signature_t * n_in
Function external(const std::string &name, const std::string &bin_name, DynamicLoadFlags dl_flags)
Load the given CasADi function from the given DLL/SO file.
std::shared_ptr< void > load_lib(const std::filesystem::path &so_filename, DynamicLoadFlags flags)
Load a DLL or SO file.
Flags to be passed to dlopen.
static signature_t * load(void *handle, std::string fname)