#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 19 of file casadi-external-function.hpp.
Classes | |
struct | Functions |
class | Sparsity |
struct | Work |
Public Member Functions | |
Function (std::shared_ptr< void > so_handle, const std::string &func_name) | |
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 |
struct builtin::Function::Functions | functions |
std::optional< Work > | work |
void * | mem = nullptr |
struct builtin::Function::Functions |
struct builtin::Function::Work |
Class Members | ||
---|---|---|
vector< const casadi_real * > | arg | |
vector< casadi_real * > | res | |
vector< casadi_int > | iw | |
vector< casadi_real > | w |
Function | ( | std::shared_ptr< void > | so_handle, |
const std::string & | func_name | ||
) |
Definition at line 40 of file casadi-external-function.cpp.
Definition at line 45 of file casadi-external-function.cpp.
Definition at line 49 of file casadi-external-function.cpp.
~Function | ( | ) |
Definition at line 52 of file casadi-external-function.cpp.
casadi_int n_in | ( | ) | const |
Definition at line 60 of file casadi-external-function.cpp.
casadi_int n_out | ( | ) | const |
Definition at line 61 of file casadi-external-function.cpp.
std::pair< casadi_int, casadi_int > size_in | ( | casadi_int | n | ) | const |
Definition at line 62 of file casadi-external-function.cpp.
std::pair< casadi_int, casadi_int > size_out | ( | casadi_int | n | ) | const |
Definition at line 65 of file casadi-external-function.cpp.
casadi_int size1_in | ( | casadi_int | n | ) | const |
Definition at line 68 of file casadi-external-function.cpp.
casadi_int size1_out | ( | casadi_int | n | ) | const |
Definition at line 71 of file casadi-external-function.cpp.
casadi_int size2_in | ( | casadi_int | n | ) | const |
Definition at line 74 of file casadi-external-function.cpp.
casadi_int size2_out | ( | casadi_int | n | ) | const |
Definition at line 77 of file casadi-external-function.cpp.
Function::Sparsity sparsity_in | ( | casadi_int | n | ) | const |
Definition at line 80 of file casadi-external-function.cpp.
Function::Sparsity sparsity_out | ( | casadi_int | n | ) | const |
Definition at line 83 of file casadi-external-function.cpp.
|
inline |
Definition at line 54 of file casadi-external-function.hpp.
|
private |
Definition at line 7 of file casadi-external-function.cpp.
|
private |
Definition at line 26 of file casadi-external-function.cpp.
|
private |
Definition at line 76 of file casadi-external-function.hpp.
|
private |
|
private |
Definition at line 98 of file casadi-external-function.hpp.
|
private |
Definition at line 99 of file casadi-external-function.hpp.