Nonconvex constrained optimization
Loading...
Searching...
No Matches
register-config.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#if _WIN32
7
8#define DECLARE_ALPAQA_CONFIG(Conf) \
9 template <> \
10 struct alpaqa::is_config<Conf> : std::true_type {};
11#define DEFINE_ALPAQA_CONFIG(Conf) \
12 template struct __declspec(dllexport) alpaqa::ProblemVTable<Conf>; \
13 template <> \
14 const typename Conf::vec alpaqa::null_vec<Conf>{};
15
16#else // _WIN32
17
18#define DECLARE_ALPAQA_CONFIG(Conf) \
19 template <> \
20 struct alpaqa::is_config<Conf> : std::true_type {}; \
21 extern template struct __attribute__((visibility("default"))) alpaqa::ProblemVTable<Conf>;
22#define DEFINE_ALPAQA_CONFIG(Conf) \
23 template struct alpaqa::ProblemVTable<Conf>; \
24 template <> \
25 const typename Conf::vec alpaqa::null_vec<Conf>{};
26
27#endif // _WIN32
28
29#define DECLARE_AND_DEFINE_ALPAQA_CONFIG(Conf) \
30 DECLARE_ALPAQA_CONFIG(Conf) \
31 DEFINE_ALPAQA_CONFIG(Conf)