alpaqa develop
Nonconvex constrained optimization
Loading...
Searching...
No Matches
casadi-types.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <algorithm>
4#include <array>
5#include <string>
6
8
9namespace alpaqa {
11
12#ifndef casadi_int
13using casadi_int = long long int;
14#endif
15#ifndef casadi_real
17#endif
18
19namespace casadi {
20
21/// Compile-time string for CasADi function names.
22template <size_t N>
23struct Name {
24 constexpr Name(const char (&str)[N]) { // NOLINT(*-c-arrays)
25 std::copy_n(str, N, value.data());
26 }
27 std::array<char, N> value;
28};
29
30/// Reference to CasADi function.
31template <Name Nm, class Sgn>
34 static constexpr Name name = Nm;
35 [[nodiscard]] static signature_t *load(void *handle, std::string fname);
36};
37
38} // namespace casadi
39
41} // namespace alpaqa
#define BEGIN_ALPAQA_CASADI_LOADER_NAMESPACE
#define END_ALPAQA_CASADI_LOADER_NAMESPACE
double casadi_real
constexpr const auto inf
Definition config.hpp:112
long long int casadi_int
Reference to CasADi function.
static signature_t * load(void *handle, std::string fname)
Compile-time string for CasADi function names.
std::array< char, N > value
constexpr Name(const char(&str)[N])