#include <stddef.h>
#include <stdint.h>
#include <dlfcn.h>
#include <unistd.h>
Go to the source code of this file.
◆ REDUCT_API
◆ REDUCT_LIB_OPEN
| #define REDUCT_LIB_OPEN |
( |
|
_path | ) |
dlopen(_path, RTLD_NOW | RTLD_GLOBAL) |
◆ REDUCT_LIB_CLOSE
| #define REDUCT_LIB_CLOSE |
( |
|
_lib | ) |
dlclose(_lib) |
◆ REDUCT_LIB_SYM
| #define REDUCT_LIB_SYM |
( |
|
_lib, |
|
|
|
_name |
|
) |
| dlsym(_lib, _name) |
◆ REDUCT_LIB_ERROR
| #define REDUCT_LIB_ERROR |
( |
| ) |
dlerror() |
◆ REDUCT_LIKELY
| #define REDUCT_LIKELY |
( |
|
_x | ) |
(_x) |
◆ REDUCT_UNLIKELY
| #define REDUCT_UNLIKELY |
( |
|
_x | ) |
(_x) |
◆ REDUCT_NORETURN
◆ REDUCT_ALWAYS_INLINE
| #define REDUCT_ALWAYS_INLINE |
◆ REDUCT_MIN
| #define REDUCT_MIN |
( |
|
_a, |
|
|
|
_b |
|
) |
| ((_a) < (_b) ? (_a) : (_b)) |
◆ REDUCT_MAX
| #define REDUCT_MAX |
( |
|
_a, |
|
|
|
_b |
|
) |
| ((_a) > (_b) ? (_a) : (_b)) |
◆ REDUCT_UNUSED
| #define REDUCT_UNUSED |
( |
|
_x | ) |
((void)(_x)) |
◆ REDUCT_PI
| #define REDUCT_PI 3.14159265358979323846 |
PI constant.
Definition at line 72 of file defs.h.
◆ REDUCT_E
| #define REDUCT_E 2.7182818284590452354 |
E constant.
Definition at line 77 of file defs.h.
◆ REDUCT_INF
Value: (((union { \
uint64_t u; \
double f; \
}){0x7FF0000000000000ULL}) \
.f)
INFINITY constant.
Definition at line 82 of file defs.h.
◆ REDUCT_NAN
Value: (((union { \
uint64_t u; \
double f; \
}){0x7FF8000000000000ULL}) \
.f)
NAN constant.
Definition at line 92 of file defs.h.
◆ REDUCT_PATH_MAX
| #define REDUCT_PATH_MAX 1024 |
Maximum path length for Reduct.
Definition at line 102 of file defs.h.
◆ REDUCT_CONTAINER_OF
| #define REDUCT_CONTAINER_OF |
( |
|
_ptr, |
|
|
|
_type, |
|
|
|
_member |
|
) |
| ((_type*)((char*)(_ptr) - offsetof(_type, _member))) |
Container of macro.
Used to get the pointer to a structure from a pointer to one of its members.
- Parameters
-
| _ptr | The pointer to the member. |
| _type | The type of the structure. |
| _member | The name of the member. |
Definition at line 113 of file defs.h.
◆ REDUCT_LIB_ENTRY
| #define REDUCT_LIB_ENTRY "reduct_module_init" |
The name of the entry symbol for a Reduct module.
Definition at line 139 of file defs.h.
◆ REDUCT_INPUT_ID_NONE
Invalid handle value.
Definition at line 152 of file defs.h.
◆ REDUCT_ALIGNMENT
| #define REDUCT_ALIGNMENT 64 |
The memory alignment for items.
Definition at line 154 of file defs.h.
◆ REDUCT_ROUND_UP
| #define REDUCT_ROUND_UP |
( |
|
_val, |
|
|
|
_align |
|
) |
| (((_val) + (_align) - 1) & ~((_align) - 1)) |
◆ reduct_lib_t
◆ reduct_native_fn
Native function pointer type.
Definition at line 126 of file defs.h.
◆ reduct_native_intrinsic_fn
| typedef struct reduct_rvsdg_origin *( * reduct_native_intrinsic_fn) (struct reduct_builder *builder, struct reduct_list *expr) |
Intrinsic handler function type.
Definition at line 126 of file defs.h.
◆ reduct_module_init_fn
Module initialization function type.
Definition at line 137 of file defs.h.
◆ reduct_input_id_t