#include <derive-c/core/math.h>
#include <derive-c/core/prelude.h>
#include <stdint.h>
Go to the source code of this file.
◆ DC_SWISS_INITIAL_CAPACITY
| #define DC_SWISS_INITIAL_CAPACITY 256 |
◆ DC_SWISS_NO_INDEX
| #define DC_SWISS_NO_INDEX ((size_t)-1) |
◆ DC_SWISS_SIMD_PROBE_SIZE
| #define DC_SWISS_SIMD_PROBE_SIZE 16 |
◆ DC_SWISS_VAL_DELETED
| #define DC_SWISS_VAL_DELETED 0b11111110 |
◆ DC_SWISS_VAL_EMPTY
| #define DC_SWISS_VAL_EMPTY 0b10000000 |
◆ DC_SWISS_VAL_ID_MASK
| #define DC_SWISS_VAL_ID_MASK 0b01111111 |
◆ DC_SWISS_VAL_SENTINEL
| #define DC_SWISS_VAL_SENTINEL 0b11111111 |
◆ dc_swiss_ctrl
◆ dc_swiss_id
◆ dc_swiss_optional_index
◆ dc_swiss_rehash_action
| Enumerator |
|---|
| DC_SWISS_DOUBLE_CAPACITY | |
| DC_SWISS_CLEANUP_TOMBSONES | |
| DC_SWISS_DO_NOTHING | |
Definition at line 59 of file utils.h.
59 {
@ DC_SWISS_DOUBLE_CAPACITY
@ DC_SWISS_CLEANUP_TOMBSONES
◆ DC_STATIC_ASSERT()
◆ dc_swiss_capacity()
| size_t dc_swiss_capacity |
( |
size_t | for_items | ) |
|
|
static |
Definition at line 44 of file utils.h.
44 {
47 }
49}
#define DC_SWISS_SIMD_PROBE_SIZE
static DC_INLINE DC_CONST size_t dc_math_next_power_of_2(size_t x)
◆ dc_swiss_ctrl_get_id()
Definition at line 35 of file utils.h.
35 {
38}
static bool dc_swiss_is_present(dc_swiss_ctrl ctrl)
#define DC_SWISS_VAL_ID_MASK
#define DC_ASSUME(expr,...)
◆ dc_swiss_ctrl_set_at()
Definition at line 51 of file utils.h.
52 {
53 self[index] = val;
56 }
57}
◆ dc_swiss_heuristic_should_extend()
Definition at line 65 of file utils.h.
66 {
68
70 if (count >= max_load) {
72 }
73
74 if (tombstones > (count / 2)) {
76 }
77
79}
◆ dc_swiss_id_from_hash()
◆ dc_swiss_is_present()
Definition at line 24 of file utils.h.
24 {
25 switch (ctrl) {
29 return false;
30 default:
31 return true;
32 }
33}
#define DC_SWISS_VAL_EMPTY
#define DC_SWISS_VAL_DELETED
#define DC_SWISS_VAL_SENTINEL