diff --git a/flat__hash__map_8h.html b/flat__hash__map_8h.html index 0a2e9bf..7b9f37d 100644 --- a/flat__hash__map_8h.html +++ b/flat__hash__map_8h.html @@ -142,14 +142,8 @@

Initialize the container with memory, callbacks, and permissions.

#define ccc_fhm_init(memory_ptr, capacity, key_field, fhash_elem_field, alloc_fn, hash_fn, key_eq_fn, aux_data) - Initialize a flat hash map from any buffer of user types at runtime.
+ Initialize a map with a buffer of types at compile time or runtime.
  -#define ccc_fhm_zero_init(type_name, key_field, fhash_elem_field, alloc_fn, hash_fn, key_eq_fn, aux_data) - Initialize a zero capacity table with allocation permission.
-  -#define ccc_fhm_static_init(memory_ptr, key_field, fhash_elem_field, hash_fn, key_eq_fn, aux_data) - the initialization helper macro for a hash table. May be called at compile time only if the memory to which it points is of static storage duration and thus implicitly zero initialized.
ccc_result ccc_fhm_copy (ccc_flat_hash_map *dst, ccc_flat_hash_map const *src, ccc_alloc_fn *fn)  Copy the map at source to destination.
  @@ -466,7 +460,7 @@

ccc_impl_fhm_init(memory_ptr, capacity, key_field, fhash_elem_field, \
alloc_fn, hash_fn, key_eq_fn, aux_data)
-

Initialize a flat hash map from any buffer of user types at runtime.

+

Initialize a map with a buffer of types at compile time or runtime.

Parameters
@@ -480,8 +474,7 @@

Returns
the flat hash map directly initialized on the right hand side of the equality operator (i.e. ccc_flat_hash_map fh = ccc_fhm_init(...);)
-
Warning
this version initialization can only operate at runtime and memory_ptr must not be a compound literal. It must be an existing l-value of user types allocated on the stack, heap, or data segment. For compound literal initialization, see ccc_fhm_static_init().
+
Returns
the flat hash map directly initialized on the right hand side of the equality operator (i.e. ccc_flat_hash_map fh = ccc_fhm_init(...);)
@@ -771,92 +764,6 @@

Returns
a compound literal reference to the removed entry. If Occupied it may be unwrapped to obtain the old key value pair. If Vacant the key value pair was not stored in the map. If bad input is provided an input error is set.

Note that this function may write to the struct containing the second parameter and wraps it in an entry to provide information about the old value.

- - -
-

◆ ccc_fhm_static_init

- -
-
-

[in]memory_ptrthe pointer to the backing buffer array of user types. May be NULL if the user provides a allocation function. The buffer will be interpreted in units of type size that the user intends to store.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define ccc_fhm_static_init( memory_ptr,
 key_field,
 fhash_elem_field,
 hash_fn,
 key_eq_fn,
 aux_data 
)
-
-Value:
ccc_impl_fhm_static_init(memory_ptr, key_field, fhash_elem_field, hash_fn, \
-
key_eq_fn, aux_data)
-
-

the initialization helper macro for a hash table. May be called at compile time only if the memory to which it points is of static storage duration and thus implicitly zero initialized.

-
Parameters
- - - - - - - -
[in]memory_ptrthe pointer to the static array of user types.
[in]key_fieldthe field of the struct used for key storage.
[in]fhash_elem_fieldthe name of the fhmap_elem field.
[in]hash_fnthe ccc_hash_fn function the user desires for the table.
[in]key_eq_fnthe ccc_key_eq_fn the user intends to use.
[in]aux_dataauxiliary data that is needed for hashing or comparison.
-
-
-
Returns
the flat hash map directly initialized on the right hand side of the equality operator (i.e. ccc_flat_hash_map fh = ccc_fhm_static_init(...);)
-
Warning
the memory pointed to for the backing buffer of the hash table must be of static storage duration and non-NULL. Implicit zeroing is needed.
-
Note
for best performance of the hash table choose a prime number for the table size as the hash map cannot participate in resizing to help with this.
-
#define FLAT_HASH_MAP_USING_NAMESPACE_CCC
-
struct val
-
{
-
fhmap_elem e;
-
int key;
-
int val;
-
};
-
static struct val vals[37];
-
static flat_hash_map fh
-
= fhm_static_init(vals, key, e, fhmap_int_to_u64, fhmap_id_eq, NULL);
-

If the compiler has sufficient support for C23, the above can be rewritten more cleanly as follows:

-
static flat_hash_map fh
-
= fhm_static_init((static struct val[37]){}, key, e, fhmap_int_to_u64,
-
fhmap_id_eq, NULL);
-

In this example, the flat hash map has more complete ownership of the anonymous static buffer of user types with static storage duration. There is no dangling reference that other code can access.

-

This version of the initialization function is designed to provide convenient initialization at compile time. It is common in C to have data structures implemented at static global file scope for a module. Therefore, this method lets one initialize a static global hash table at compile time so the data structure is ready as soon as program execution begins. Note that an allocation function is explicitly excluded. A static storage duration array of user types cannot be resized or freed.

-
@@ -951,107 +858,6 @@

Warning
ensure the key type matches the type stored in table as your key. For example, if your key is of type int and you pass a size_t variable to the key argument, you will overwrite adjacent bytes of your struct.

Note that for brevity and convenience the user need not write the key to the lazy value compound literal as well. This function ensures the key in the compound literal matches the searched key.

- - -
-

◆ ccc_fhm_zero_init

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define ccc_fhm_zero_init( type_name,
 key_field,
 fhash_elem_field,
 alloc_fn,
 hash_fn,
 key_eq_fn,
 aux_data 
)
-
-Value:
ccc_impl_fhm_zero_init(type_name, key_field, fhash_elem_field, alloc_fn, \
-
hash_fn, key_eq_fn, aux_data)
-
-

Initialize a zero capacity table with allocation permission.

-
Parameters
- - - - - - - - -
[in]type_namethe type being stored in the hash table.
[in]key_fieldthe field of the struct used for key storage.
[in]fhash_elem_fieldthe name of the fhmap_elem field.
[in]alloc_fnthe allocation function for resizing.
[in]hash_fnthe ccc_hash_fn function the user desires for the table.
[in]key_eq_fnthe ccc_key_eq_fn the user intends to use.
[in]aux_dataauxiliary data that is needed for hashing or comparison.
-
-
-
Returns
the flat hash map directly initialized on the right hand side of the equality operator (i.e. ccc_flat_hash_map fh = ccc_fhm_zero_init(...);)
-
Warning
this initialization requires an allocation function be provided.
-

At compile time.

-
#define FLAT_HASH_MAP_USING_NAMESPACE_CCC
-
struct val
-
{
-
fhmap_elem e;
-
int key;
-
int val;
-
};
-
static flat_hash_map fh = fhm_zero_init(
-
struct val, key, e, std_alloc, fhmap_int_to_u64, fhmap_id_eq, NULL);
-

At runtime.

-
#define FLAT_HASH_MAP_USING_NAMESPACE_CCC
-
struct val
-
{
-
fhmap_elem e;
-
int key;
-
int val;
-
};
-
int main(void)
-
{
-
static flat_hash_map fh = fhm_zero_init(
-
struct val, key, e, std_alloc, fhmap_int_to_u64, fhmap_id_eq, NULL);
-
return 0;
-
}
-

This initializer is designed to be used at compile time or runtime. The table is assumed to start with no allocation and zero capacity. It will resize as it is used at runtime with the provided allocation function.

-

Typedef Documentation

diff --git a/flat__hash__map_8h.js b/flat__hash__map_8h.js index 88b2964..268a5c4 100644 --- a/flat__hash__map_8h.js +++ b/flat__hash__map_8h.js @@ -10,10 +10,8 @@ var flat__hash__map_8h = [ "ccc_fhm_or_insert_w", "flat__hash__map_8h.html#a147ceaca531b1d1a6980d77ae4cbf816", null ], [ "ccc_fhm_remove_entry_r", "flat__hash__map_8h.html#adb6b5779ecab7401ee0656c01a97696c", null ], [ "ccc_fhm_remove_r", "flat__hash__map_8h.html#ab3e7d1da422626b8f3624fb50e461331", null ], - [ "ccc_fhm_static_init", "flat__hash__map_8h.html#a55c28ee177e9d614a4036e98060e50c3", null ], [ "ccc_fhm_try_insert_r", "flat__hash__map_8h.html#a6b3df14a3340eb4eed0a2611152605ae", null ], [ "ccc_fhm_try_insert_w", "flat__hash__map_8h.html#ab3a078263d05afaac040fd318dda51ae", null ], - [ "ccc_fhm_zero_init", "flat__hash__map_8h.html#a925565b52174e9ea4325c7bd3b3bbdaf", null ], [ "ccc_fhmap_elem", "flat__hash__map_8h.html#ada2d334ae54ac456f5ff1a37ac546994", null ], [ "ccc_fhmap_entry", "flat__hash__map_8h.html#aefcfb8e4e21401e417bac1f3921606b4", null ], [ "ccc_flat_hash_map", "flat__hash__map_8h.html#af8251d1f96c8a10e8ff2b20d7f117447", null ], diff --git a/flat__hash__map_8h_source.html b/flat__hash__map_8h_source.html index b7de994..4ea920f 100644 --- a/flat__hash__map_8h_source.html +++ b/flat__hash__map_8h_source.html @@ -107,198 +107,188 @@
46
51typedef union ccc_fhmap_entry_ ccc_fhmap_entry;
52
-
76#define ccc_fhm_init(memory_ptr, capacity, key_field, fhash_elem_field, \
-
77 alloc_fn, hash_fn, key_eq_fn, aux_data) \
-
78 ccc_impl_fhm_init(memory_ptr, capacity, key_field, fhash_elem_field, \
-
79 alloc_fn, hash_fn, key_eq_fn, aux_data)
-
80
-
128#define ccc_fhm_zero_init(type_name, key_field, fhash_elem_field, alloc_fn, \
-
129 hash_fn, key_eq_fn, aux_data) \
-
130 ccc_impl_fhm_zero_init(type_name, key_field, fhash_elem_field, alloc_fn, \
-
131 hash_fn, key_eq_fn, aux_data)
-
132
-
182#define ccc_fhm_static_init(memory_ptr, key_field, fhash_elem_field, hash_fn, \
-
183 key_eq_fn, aux_data) \
-
184 ccc_impl_fhm_static_init(memory_ptr, key_field, fhash_elem_field, hash_fn, \
-
185 key_eq_fn, aux_data)
-
186
- -
271 ccc_alloc_fn *fn);
-
272
-
283[[nodiscard]] bool ccc_fhm_contains(ccc_flat_hash_map *h, void const *key);
-
284
-
289[[nodiscard]] void *ccc_fhm_get_key_val(ccc_flat_hash_map *h, void const *key);
-
290
- -
309 ccc_fhmap_elem *out_handle);
-
310
-
322#define ccc_fhm_insert_r(flat_hash_map_ptr, out_handle_ptr) \
-
323 &(ccc_entry) \
-
324 { \
-
325 ccc_fhm_insert((flat_hash_map_ptr), (out_handle_ptr)).impl_ \
-
326 }
-
327
- -
339 ccc_fhmap_elem *out_handle);
-
340
-
351#define ccc_fhm_remove_r(flat_hash_map_ptr, out_handle_ptr) \
-
352 &(ccc_entry) \
-
353 { \
-
354 ccc_fhm_remove((flat_hash_map_ptr), (out_handle_ptr)).impl_ \
-
355 }
+
72#define ccc_fhm_init(memory_ptr, capacity, key_field, fhash_elem_field, \
+
73 alloc_fn, hash_fn, key_eq_fn, aux_data) \
+
74 ccc_impl_fhm_init(memory_ptr, capacity, key_field, fhash_elem_field, \
+
75 alloc_fn, hash_fn, key_eq_fn, aux_data)
+
76
+ +
161 ccc_alloc_fn *fn);
+
162
+
173[[nodiscard]] bool ccc_fhm_contains(ccc_flat_hash_map *h, void const *key);
+
174
+
179[[nodiscard]] void *ccc_fhm_get_key_val(ccc_flat_hash_map *h, void const *key);
+
180
+ +
199 ccc_fhmap_elem *out_handle);
+
200
+
212#define ccc_fhm_insert_r(flat_hash_map_ptr, out_handle_ptr) \
+
213 &(ccc_entry) \
+
214 { \
+
215 ccc_fhm_insert((flat_hash_map_ptr), (out_handle_ptr)).impl_ \
+
216 }
+
217
+ +
229 ccc_fhmap_elem *out_handle);
+
230
+
241#define ccc_fhm_remove_r(flat_hash_map_ptr, out_handle_ptr) \
+
242 &(ccc_entry) \
+
243 { \
+
244 ccc_fhm_remove((flat_hash_map_ptr), (out_handle_ptr)).impl_ \
+
245 }
+
246
+ +
257 ccc_fhmap_elem *key_val_handle);
+
258
+
269#define ccc_fhm_try_insert_r(flat_hash_map_ptr, key_val_handle_ptr) \
+
270 &(ccc_entry) \
+
271 { \
+
272 ccc_fhm_try_insert((flat_hash_map_ptr), (key_val_handle_ptr)).impl_ \
+
273 }
+
274
+
290#define ccc_fhm_try_insert_w(flat_hash_map_ptr, key, lazy_value...) \
+
291 &(ccc_entry) \
+
292 { \
+
293 ccc_impl_fhm_try_insert_w(flat_hash_map_ptr, key, lazy_value) \
+
294 }
+
295
+
304[[nodiscard]] ccc_entry
+ +
306
+
315#define ccc_fhm_insert_or_assign_r(flat_hash_map_ptr, key_val_handle_ptr) \
+
316 &(ccc_entry) \
+
317 { \
+
318 ccc_fhm_insert_or_assign((flat_hash_map_ptr), (key_val_handle)).impl_ \
+
319 }
+
320
+
333#define ccc_fhm_insert_or_assign_w(flat_hash_map_ptr, key, lazy_value...) \
+
334 &(ccc_entry) \
+
335 { \
+
336 ccc_impl_fhm_insert_or_assign_w(flat_hash_map_ptr, key, lazy_value) \
+
337 }
+
338
+ +
355 void const *key);
356
- -
367 ccc_fhmap_elem *key_val_handle);
-
368
-
379#define ccc_fhm_try_insert_r(flat_hash_map_ptr, key_val_handle_ptr) \
-
380 &(ccc_entry) \
-
381 { \
-
382 ccc_fhm_try_insert((flat_hash_map_ptr), (key_val_handle_ptr)).impl_ \
-
383 }
-
384
-
400#define ccc_fhm_try_insert_w(flat_hash_map_ptr, key, lazy_value...) \
-
401 &(ccc_entry) \
-
402 { \
-
403 ccc_impl_fhm_try_insert_w(flat_hash_map_ptr, key, lazy_value) \
-
404 }
-
405
-
414[[nodiscard]] ccc_entry
- -
416
-
425#define ccc_fhm_insert_or_assign_r(flat_hash_map_ptr, key_val_handle_ptr) \
-
426 &(ccc_entry) \
-
427 { \
-
428 ccc_fhm_insert_or_assign((flat_hash_map_ptr), (key_val_handle)).impl_ \
-
429 }
-
430
-
443#define ccc_fhm_insert_or_assign_w(flat_hash_map_ptr, key, lazy_value...) \
-
444 &(ccc_entry) \
-
445 { \
-
446 ccc_impl_fhm_insert_or_assign_w(flat_hash_map_ptr, key, lazy_value) \
-
447 }
-
448
- -
465 void const *key);
-
466
-
483#define ccc_fhm_entry_r(flat_hash_map_ptr, key_ptr) \
-
484 &(ccc_fhmap_entry) \
-
485 { \
-
486 ccc_fhm_entry((flat_hash_map_ptr), (key_ptr)).impl_ \
-
487 }
+
373#define ccc_fhm_entry_r(flat_hash_map_ptr, key_ptr) \
+
374 &(ccc_fhmap_entry) \
+
375 { \
+
376 ccc_fhm_entry((flat_hash_map_ptr), (key_ptr)).impl_ \
+
377 }
+
378
+ +
388 ccc_update_fn *fn);
+
389
+
398[[nodiscard]] ccc_fhmap_entry *
+ +
400
+
427#define ccc_fhm_and_modify_w(flat_hash_map_entry_ptr, type_name, \
+
428 closure_over_T...) \
+
429 &(ccc_fhmap_entry) \
+
430 { \
+
431 ccc_impl_fhm_and_modify_w(flat_hash_map_entry_ptr, type_name, \
+
432 closure_over_T) \
+
433 }
+
434
+
444[[nodiscard]] void *ccc_fhm_or_insert(ccc_fhmap_entry const *e,
+
445 ccc_fhmap_elem *elem);
+
446
+
458#define ccc_fhm_or_insert_w(flat_hash_map_entry_ptr, lazy_key_value...) \
+
459 ccc_impl_fhm_or_insert_w(flat_hash_map_entry_ptr, lazy_key_value)
+
460
+
472[[nodiscard]] void *ccc_fhm_insert_entry(ccc_fhmap_entry const *e,
+
473 ccc_fhmap_elem *elem);
+
474
+
480#define ccc_fhm_insert_entry_w(flat_hash_map_entry_ptr, lazy_key_value...) \
+
481 ccc_impl_fhm_insert_entry_w(flat_hash_map_entry_ptr, lazy_key_value)
+
482
+
488
- -
498 ccc_update_fn *fn);
-
499
-
508[[nodiscard]] ccc_fhmap_entry *
- -
510
-
537#define ccc_fhm_and_modify_w(flat_hash_map_entry_ptr, type_name, \
-
538 closure_over_T...) \
-
539 &(ccc_fhmap_entry) \
-
540 { \
-
541 ccc_impl_fhm_and_modify_w(flat_hash_map_entry_ptr, type_name, \
-
542 closure_over_T) \
-
543 }
-
544
-
554[[nodiscard]] void *ccc_fhm_or_insert(ccc_fhmap_entry const *e,
-
555 ccc_fhmap_elem *elem);
-
556
-
568#define ccc_fhm_or_insert_w(flat_hash_map_entry_ptr, lazy_key_value...) \
-
569 ccc_impl_fhm_or_insert_w(flat_hash_map_entry_ptr, lazy_key_value)
-
570
-
582[[nodiscard]] void *ccc_fhm_insert_entry(ccc_fhmap_entry const *e,
-
583 ccc_fhmap_elem *elem);
-
584
-
590#define ccc_fhm_insert_entry_w(flat_hash_map_entry_ptr, lazy_key_value...) \
-
591 ccc_impl_fhm_insert_entry_w(flat_hash_map_entry_ptr, lazy_key_value)
+
493#define ccc_fhm_remove_entry_r(flat_hash_map_entry_ptr) \
+
494 &(ccc_entry) \
+
495 { \
+
496 ccc_fhm_remove_entry((flat_hash_map_entry_ptr)).impl_ \
+
497 }
+
498
+
502[[nodiscard]] void *ccc_fhm_unwrap(ccc_fhmap_entry const *e);
+
503
+
507[[nodiscard]] bool ccc_fhm_occupied(ccc_fhmap_entry const *e);
+
508
+
524[[nodiscard]] bool ccc_fhm_insert_error(ccc_fhmap_entry const *e);
+
525
+ +
536
+ +
551
+ +
561
+
576[[nodiscard]] void *ccc_fhm_begin(ccc_flat_hash_map const *h);
+
577
+
584[[nodiscard]] void *ccc_fhm_next(ccc_flat_hash_map const *h,
+
585 ccc_fhmap_elem const *iter);
+
586
+
591[[nodiscard]] void *ccc_fhm_end(ccc_flat_hash_map const *h);
592
- -
598
-
603#define ccc_fhm_remove_entry_r(flat_hash_map_entry_ptr) \
-
604 &(ccc_entry) \
-
605 { \
-
606 ccc_fhm_remove_entry((flat_hash_map_entry_ptr)).impl_ \
-
607 }
+
602[[nodiscard]] bool ccc_fhm_is_empty(ccc_flat_hash_map const *h);
+
603
+
607[[nodiscard]] size_t ccc_fhm_size(ccc_flat_hash_map const *h);
608
-
612[[nodiscard]] void *ccc_fhm_unwrap(ccc_fhmap_entry const *e);
-
613
-
617[[nodiscard]] bool ccc_fhm_occupied(ccc_fhmap_entry const *e);
+
617[[nodiscard]] size_t ccc_fhm_next_prime(size_t n);
618
-
634[[nodiscard]] bool ccc_fhm_insert_error(ccc_fhmap_entry const *e);
-
635
- -
646
- -
661
- -
671
-
686[[nodiscard]] void *ccc_fhm_begin(ccc_flat_hash_map const *h);
-
687
-
694[[nodiscard]] void *ccc_fhm_next(ccc_flat_hash_map const *h,
-
695 ccc_fhmap_elem const *iter);
-
696
-
701[[nodiscard]] void *ccc_fhm_end(ccc_flat_hash_map const *h);
-
702
-
712[[nodiscard]] bool ccc_fhm_is_empty(ccc_flat_hash_map const *h);
-
713
-
717[[nodiscard]] size_t ccc_fhm_size(ccc_flat_hash_map const *h);
-
718
-
727[[nodiscard]] size_t ccc_fhm_next_prime(size_t n);
-
728
-
732[[nodiscard]] size_t ccc_fhm_capacity(ccc_flat_hash_map const *h);
-
733
-
741[[nodiscard]] void *ccc_fhm_data(ccc_flat_hash_map const *h);
-
742
-
746[[nodiscard]] bool ccc_fhm_validate(ccc_flat_hash_map const *h);
-
747
-
752#ifdef FLAT_HASH_MAP_USING_NAMESPACE_CCC
-
753typedef ccc_fhmap_elem fhmap_elem;
-
754typedef ccc_flat_hash_map flat_hash_map;
-
755typedef ccc_fhmap_entry fhmap_entry;
-
756# define fhm_init(args...) ccc_fhm_init(args)
-
757# define fhm_static_init(args...) ccc_fhm_static_init(args)
-
758# define fhm_zero_init(args...) ccc_fhm_zero_init(args)
-
759# define fhm_copy(args...) ccc_fhm_copy(args)
-
760# define fhm_and_modify_w(args...) ccc_fhm_and_modify_w(args)
-
761# define fhm_or_insert_w(args...) ccc_fhm_or_insert_w(args)
-
762# define fhm_insert_entry_w(args...) ccc_fhm_insert_entry_w(args)
-
763# define fhm_try_insert_w(args...) ccc_fhm_try_insert_w(args)
-
764# define fhm_insert_or_assign_w(args...) ccc_fhm_insert_or_assign_w(args)
-
765# define fhm_contains(args...) ccc_fhm_contains(args)
-
766# define fhm_get_key_val(args...) ccc_fhm_get_key_val(args)
-
767# define fhm_remove_r(args...) ccc_fhm_remove_r(args)
-
768# define fhm_insert_r(args...) ccc_fhm_insert_r(args)
-
769# define fhm_try_insert_r(args...) ccc_fhm_try_insert_r(args)
-
770# define fhm_insert_or_assign_r(args...) ccc_fhm_insert_or_assign_r(args)
-
771# define fhm_remove_entry_r(args...) ccc_fhm_remove_entry_r(args)
-
772# define fhm_remove(args...) ccc_fhm_remove(args)
-
773# define fhm_insert(args...) ccc_fhm_insert(args)
-
774# define fhm_try_insert(args...) ccc_fhm_try_insert(args)
-
775# define fhm_insert_or_assign(args...) ccc_fhm_insert_or_assign(args)
-
776# define fhm_remove_entry(args...) ccc_fhm_remove_entry(args)
-
777# define fhm_entry_r(args...) ccc_fhm_entry_r(args)
-
778# define fhm_entry(args...) ccc_fhm_entry(args)
-
779# define fhm_and_modify(args...) ccc_fhm_and_modify(args)
-
780# define fhm_and_modify_aux(args...) ccc_fhm_and_modify_aux(args)
-
781# define fhm_or_insert(args...) ccc_fhm_or_insert(args)
-
782# define fhm_insert_entry(args...) ccc_fhm_insert_entry(args)
-
783# define fhm_unwrap(args...) ccc_fhm_unwrap(args)
-
784# define fhm_occupied(args...) ccc_fhm_occupied(args)
-
785# define fhm_insert_error(args...) ccc_fhm_insert_error(args)
-
786# define fhm_begin(args...) ccc_fhm_begin(args)
-
787# define fhm_next(args...) ccc_fhm_next(args)
-
788# define fhm_end(args...) ccc_fhm_end(args)
-
789# define fhm_data(args...) ccc_fhm_data(args)
-
790# define fhm_is_empty(args...) ccc_fhm_is_empty(args)
-
791# define fhm_size(args...) ccc_fhm_size(args)
-
792# define fhm_clear(args...) ccc_fhm_clear(args)
-
793# define fhm_clear_and_free(args...) ccc_fhm_clear_and_free(args)
-
794# define fhm_next_prime(args...) ccc_fhm_next_prime(args)
-
795# define fhm_capacity(args...) ccc_fhm_capacity(args)
-
796# define fhm_validate(args...) ccc_fhm_validate(args)
-
797#endif
-
798
-
799#endif /* CCC_FLAT_HASH_MAP_H */
+
622[[nodiscard]] size_t ccc_fhm_capacity(ccc_flat_hash_map const *h);
+
623
+
631[[nodiscard]] void *ccc_fhm_data(ccc_flat_hash_map const *h);
+
632
+
636[[nodiscard]] bool ccc_fhm_validate(ccc_flat_hash_map const *h);
+
637
+
642#ifdef FLAT_HASH_MAP_USING_NAMESPACE_CCC
+
643typedef ccc_fhmap_elem fhmap_elem;
+
644typedef ccc_flat_hash_map flat_hash_map;
+
645typedef ccc_fhmap_entry fhmap_entry;
+
646# define fhm_init(args...) ccc_fhm_init(args)
+
647# define fhm_static_init(args...) ccc_fhm_static_init(args)
+
648# define fhm_zero_init(args...) ccc_fhm_zero_init(args)
+
649# define fhm_copy(args...) ccc_fhm_copy(args)
+
650# define fhm_and_modify_w(args...) ccc_fhm_and_modify_w(args)
+
651# define fhm_or_insert_w(args...) ccc_fhm_or_insert_w(args)
+
652# define fhm_insert_entry_w(args...) ccc_fhm_insert_entry_w(args)
+
653# define fhm_try_insert_w(args...) ccc_fhm_try_insert_w(args)
+
654# define fhm_insert_or_assign_w(args...) ccc_fhm_insert_or_assign_w(args)
+
655# define fhm_contains(args...) ccc_fhm_contains(args)
+
656# define fhm_get_key_val(args...) ccc_fhm_get_key_val(args)
+
657# define fhm_remove_r(args...) ccc_fhm_remove_r(args)
+
658# define fhm_insert_r(args...) ccc_fhm_insert_r(args)
+
659# define fhm_try_insert_r(args...) ccc_fhm_try_insert_r(args)
+
660# define fhm_insert_or_assign_r(args...) ccc_fhm_insert_or_assign_r(args)
+
661# define fhm_remove_entry_r(args...) ccc_fhm_remove_entry_r(args)
+
662# define fhm_remove(args...) ccc_fhm_remove(args)
+
663# define fhm_insert(args...) ccc_fhm_insert(args)
+
664# define fhm_try_insert(args...) ccc_fhm_try_insert(args)
+
665# define fhm_insert_or_assign(args...) ccc_fhm_insert_or_assign(args)
+
666# define fhm_remove_entry(args...) ccc_fhm_remove_entry(args)
+
667# define fhm_entry_r(args...) ccc_fhm_entry_r(args)
+
668# define fhm_entry(args...) ccc_fhm_entry(args)
+
669# define fhm_and_modify(args...) ccc_fhm_and_modify(args)
+
670# define fhm_and_modify_aux(args...) ccc_fhm_and_modify_aux(args)
+
671# define fhm_or_insert(args...) ccc_fhm_or_insert(args)
+
672# define fhm_insert_entry(args...) ccc_fhm_insert_entry(args)
+
673# define fhm_unwrap(args...) ccc_fhm_unwrap(args)
+
674# define fhm_occupied(args...) ccc_fhm_occupied(args)
+
675# define fhm_insert_error(args...) ccc_fhm_insert_error(args)
+
676# define fhm_begin(args...) ccc_fhm_begin(args)
+
677# define fhm_next(args...) ccc_fhm_next(args)
+
678# define fhm_end(args...) ccc_fhm_end(args)
+
679# define fhm_data(args...) ccc_fhm_data(args)
+
680# define fhm_is_empty(args...) ccc_fhm_is_empty(args)
+
681# define fhm_size(args...) ccc_fhm_size(args)
+
682# define fhm_clear(args...) ccc_fhm_clear(args)
+
683# define fhm_clear_and_free(args...) ccc_fhm_clear_and_free(args)
+
684# define fhm_next_prime(args...) ccc_fhm_next_prime(args)
+
685# define fhm_capacity(args...) ccc_fhm_capacity(args)
+
686# define fhm_validate(args...) ccc_fhm_validate(args)
+
687#endif
+
688
+
689#endif /* CCC_FLAT_HASH_MAP_H */
void * ccc_fhm_next(ccc_flat_hash_map const *h, ccc_fhmap_elem const *iter)
Advances the iterator to the next occupied table slot.
size_t ccc_fhm_next_prime(size_t n)
Helper to find a prime number if needed.
ccc_entry ccc_fhm_insert_or_assign(ccc_flat_hash_map *h, ccc_fhmap_elem *key_val_handle)
Invariantly inserts or overwrites a user struct into the table.
diff --git a/globals.html b/globals.html index 0a9890d..51033f5 100644 --- a/globals.html +++ b/globals.html @@ -246,13 +246,11 @@

- c -