#include <alpaqa/casadi/casadi-external-function.hpp>
Class that loads and calls pre-compiled CasADi functions in a DLL/SO file.
Designed to match (part of) the casadi::Function API.
Definition at line 25 of file casadi-external-function.hpp.
Classes | |
struct | Functions |
class | Sparsity |
struct | Work |
Public Member Functions | |
Function () | |
Function (std::shared_ptr< void > so_handle, const std::string &func_name) | |
Function (const Functions &functions) | |
Function (const Function &) | |
Function (Function &&) noexcept | |
~Function () | |
casadi_int | n_in () const |
casadi_int | n_out () const |
std::pair< casadi_int, casadi_int > | size_in (casadi_int) const |
std::pair< casadi_int, casadi_int > | size_out (casadi_int) const |
casadi_int | size1_in (casadi_int) const |
casadi_int | size1_out (casadi_int) const |
casadi_int | size2_in (casadi_int) const |
casadi_int | size2_out (casadi_int) const |
Sparsity | sparsity_in (casadi_int) const |
Sparsity | sparsity_out (casadi_int) const |
void | operator() (std::span< const double *const > arg, std::span< double *const > res) |
Private Member Functions | |
void | load (void *so_handle, const std::string &func_name) |
void | init_work () |
Private Attributes | |
std::shared_ptr< void > | so_handle |
Functions | functions |
std::optional< Work > | work |
int | mem = 0 |
struct alpaqa::casadi::Function::Functions |
struct alpaqa::casadi::Function::Work |
Class Members | ||
---|---|---|
vector< const casadi_real * > | arg | |
vector< casadi_real * > | res | |
vector< casadi_int > | iw | |
vector< casadi_real > | w |
|
default |
Function | ( | std::shared_ptr< void > | so_handle, |
const std::string & | func_name ) |
Definition at line 46 of file casadi-external-function.cpp.
Definition at line 52 of file casadi-external-function.cpp.
Definition at line 56 of file casadi-external-function.cpp.
Definition at line 60 of file casadi-external-function.cpp.
~Function | ( | ) |
Definition at line 63 of file casadi-external-function.cpp.
|
nodiscard |
Definition at line 71 of file casadi-external-function.cpp.
|
nodiscard |
Definition at line 72 of file casadi-external-function.cpp.
|
nodiscard |
Definition at line 73 of file casadi-external-function.cpp.
|
nodiscard |
Definition at line 76 of file casadi-external-function.cpp.
|
nodiscard |
Definition at line 79 of file casadi-external-function.cpp.
|
nodiscard |
Definition at line 82 of file casadi-external-function.cpp.
|
nodiscard |
Definition at line 85 of file casadi-external-function.cpp.
|
nodiscard |
Definition at line 88 of file casadi-external-function.cpp.
|
nodiscard |
Definition at line 91 of file casadi-external-function.cpp.
|
nodiscard |
Definition at line 94 of file casadi-external-function.cpp.
|
inline |
Definition at line 79 of file casadi-external-function.hpp.
|
private |
Definition at line 12 of file casadi-external-function.cpp.
|
private |
Definition at line 31 of file casadi-external-function.cpp.
|
private |
Definition at line 101 of file casadi-external-function.hpp.
|
private |
Definition at line 102 of file casadi-external-function.hpp.
|
private |
Definition at line 109 of file casadi-external-function.hpp.
|
private |
Definition at line 110 of file casadi-external-function.hpp.