alpaqa 1.0.0a19
Nonconvex constrained optimization
Loading...
Searching...
No Matches
cutest-types.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <algorithm>
4#include <array>
5
6namespace alpaqa::cutest {
7
8/// Compile-time string for CUTEst function names.
9template <size_t N>
10struct Name {
11 constexpr Name(const char (&str)[N]) { // NOLINT(*-c-arrays)
12 std::copy_n(str, N, value.data());
13 }
14 std::array<char, N> value;
15};
16
17/// Reference to CUTEst function.
18template <Name Nm, class Sgn>
19struct Function {
21 static constexpr Name name = Nm;
22 [[nodiscard]] static signature_t *load(void *handle);
23};
24
25using integer = int;
27using logical = int;
28constexpr logical True = 1;
29constexpr logical False = 0;
30constexpr doublereal inf = 1e20;
31constexpr size_t fstring_len = 10;
32
33} // namespace alpaqa::cutest
constexpr logical True
constexpr logical False
constexpr size_t fstring_len
constexpr doublereal inf
Reference to CUTEst function.
static signature_t * load(void *handle)
static constexpr Name name
Compile-time string for CUTEst function names.
std::array< char, N > value
constexpr Name(const char(&str)[N])