#include <stdint.h>
#include <stddef.h>
#include <derive-c/core/math.h>
#include <derive-c/core/prelude.h>
Go to the source code of this file.
◆ dc_ankerl_dfd
◆ dc_ankerl_buckets_capacity()
| size_t dc_ankerl_buckets_capacity |
( |
size_t | for_items | ) |
|
|
static |
Definition at line 10 of file utils.h.
10 {
13 }
15}
static const size_t dc_ankerl_initial_items
static DC_INLINE DC_CONST size_t dc_math_next_power_of_2(size_t x)
◆ dc_ankerl_dfd_decrement_for_backshift()
Definition at line 31 of file utils.h.
31 {
35 }
37}
static const dc_ankerl_dfd dc_ankerl_dfd_none
static const dc_ankerl_dfd dc_ankerl_dfd_max
#define DC_ASSERT(expr,...)
◆ dc_ankerl_dfd_increment()
◆ dc_ankerl_dfd_new()
◆ dc_ankerl_fingerprint_from_hash()
| uint8_t dc_ankerl_fingerprint_from_hash |
( |
size_t | hash | ) |
|
|
static |
Definition at line 17 of file utils.h.
17 {
18 uint8_t fp = (uint8_t)(hash >> (sizeof(size_t) * 8U - 8U));
19 return (fp == 0) ? 1U : fp;
20}
◆ dc_ankerl_mdata_present()
◆ DC_STATIC_ASSERT() [1/2]
| DC_STATIC_ASSERT |
( |
sizeof(dc_ankerl_index_large) | = =6 | ) |
|
◆ DC_STATIC_ASSERT() [2/2]
◆ get() [1/2]
| size_t get |
( |
dc_ankerl_index_large const * | index | ) |
|
|
static |
Definition at line 59 of file utils.h.
59 {
60 return (size_t)index->dense_index_lo + ((size_t)index->dense_index_hi << 32);
61}
◆ get() [2/2]
Definition at line 79 of file utils.h.
79 {
80 return (size_t)index->dense_index;
81}
◆ new()
Definition at line 63 of file utils.h.
63 {
64 DC_ASSERT(to <= dc_ankerl_index_large_max,
"Index too large for ankerl");
65 return (dc_ankerl_index_large){
66 .dense_index_hi = (uint16_t)(to >> 32),
67 .dense_index_lo = (uint32_t)to,
68 };
69}
◆ dc_ankerl_dfd_max
◆ dc_ankerl_dfd_none
◆ dc_ankerl_initial_items
| const size_t dc_ankerl_initial_items = 256 |
|
static |
◆ max
| uint64_t const max = ((((int64_t)1) << 47) - 1) |