26#define SPOT_LIKELY(expr) __builtin_expect(!!(expr), 1)
27#define SPOT_UNLIKELY(expr) __builtin_expect(!!(expr), 0)
29#define SPOT_LIKELY(expr) (expr)
30#define SPOT_UNLIKELY(expr) (expr)
34 #define SPOT_DEPRECATED(msg)
35 #define SPOT_FALLTHROUGH
37 #if __cplusplus < 201703L
38 #error C++17 compiler required
40 #define SPOT_DEPRECATED(msg) [[deprecated(msg)]]
41 #define SPOT_FALLTHROUGH [[fallthrough]]
44#if defined _WIN32 || defined __CYGWIN__
45 #define SPOT_HELPER_DLL_IMPORT __declspec(dllimport)
46 #define SPOT_HELPER_DLL_EXPORT __declspec(dllexport)
47 #define SPOT_HELPER_DLL_LOCAL
50 #define SPOT_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
51 #define SPOT_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
52 #define SPOT_HELPER_DLL_LOCAL __attribute__ ((visibility ("hidden")))
54 #define SPOT_HELPER_DLL_IMPORT
55 #define SPOT_HELPER_DLL_EXPORT
56 #define SPOT_HELPER_DLL_LOCAL
69#define spot_assert__ assert
70#if defined(SPOT_BUILD) || defined(SPOT_DEBUG)
71 #define SPOT_ASSERT(x) spot_assert__(x)
75 #define SPOT_ASSERT(x) while (0)
83 #define SPOT_API SPOT_HELPER_DLL_EXPORT
85 #define SPOT_API SPOT_HELPER_DLL_IMPORT
87 #define SPOT_LOCAL SPOT_HELPER_DLL_LOCAL
92#define SPOT_API_VAR extern SPOT_API
103#if defined __clang__ || defined __GNUC__
104# define SPOT_UNREACHABLE_BUILTIN() __builtin_unreachable()
105# elif defined _MSC_VER
106# define SPOT_UNREACHABLE_BUILTIN() __assume(0)
108# define SPOT_UNREACHABLE_BUILTIN() abort()
113#define SPOT_UNREACHABLE() do { \
114 SPOT_ASSERT(!("unreachable code reached")); \
115 SPOT_UNREACHABLE_BUILTIN(); \
118#define SPOT_UNIMPLEMENTED() throw std::runtime_error("unimplemented");
121#if SPOT_DEBUG && !defined(NDEBUG)
122#define SPOT_ASSUME(cond) assert(cond)
124#define SPOT_ASSUME(cond) \
128 SPOT_UNREACHABLE_BUILTIN(); \
136#define SPOT_RETURN(code) -> decltype(code) { return code; }
140 struct SPOT_API parse_error:
public std::runtime_error
142 parse_error(
const std::string& s)
143 : std::runtime_error(s)
154 class SPOT_API parallel_policy
158 parallel_policy(
unsigned nthreads = 1) : nthreads_(nthreads)
162 unsigned nthreads()
const
185#if __GNUC__ == 8 && __GNUC_MINOR__ == 2
186# define SPOT_make_shared_enabled__(TYPE, ...) \
187 std::shared_ptr<TYPE>(new TYPE(__VA_ARGS__))
189# define SPOT_make_shared_enabled__(TYPE, ...) \
190 std::make_shared<TYPE>(__VA_ARGS__)
Definition automata.hh:26
Please direct any
question,
comment, or
bug report to the Spot mailing list at
spot@lrde.epita.fr.
Generated on for spot by
1.15.0