Data Structures |
struct | cucon_pmap |
struct | cucon_pmap_node |
Defines |
#define | cucon_pmap_it_eq(it0, it1) ((it0.node) == (it1.node)) |
#define | cucon_pmap_it_key(it) ((void*)(it).node->key) |
#define | cucon_pmap_it_value_mem(it) ((void*)CU_ALIGNED_PTR_END((it).node)) |
#define | cucon_pmap_it_value_ptr(it) (*(void**)CU_ALIGNED_PTR_END((it).node)) |
#define | cucon_pmap_cct cucon_pmap_init |
#define | cucon_pmap_cct_copy_void cucon_pmap_init_copy_void |
#define | cucon_pmap_cct_copy_mem cucon_pmap_init_copy_mem |
#define | cucon_pmap_cct_copy_mem_ctor cucon_pmap_init_copy_mem_ctor |
#define | cucon_pmap_cct_copy_node cucon_pmap_init_copy_node |
Typedefs |
typedef struct cucon_pmap_node * | cucon_pmap_node_t |
typedef cucon_umap_it_t | cucon_pmap_it_t |
Functions |
void * | cucon_pmap_node_key (cucon_pmap_node_t node) |
void | cucon_pmap_init (cucon_pmap_t map) |
cucon_pmap_t | cucon_pmap_new (void) |
void | cucon_pmap_init_copy_void (cucon_pmap_t dst, cucon_pmap_t src) |
cucon_pmap_t | cucon_pmap_new_copy_void (cucon_pmap_t src) |
void | cucon_pmap_init_copy_mem (cucon_pmap_t dst, cucon_pmap_t src, size_t slot_size) |
cucon_pmap_t | cucon_pmap_new_copy_mem (cucon_pmap_t src, size_t slot_size) |
void | cucon_pmap_init_copy_mem_ctor (cucon_pmap_t dst, cucon_pmap_t src, size_t slot_size, cu_clop(value_init_copy, void, void *dst_slot, void *src_slot, uintptr_t key)) |
void | cucon_pmap_init_copy_node (cucon_pmap_t dst, cucon_pmap_t src, cu_clop(node_alloc_copy, cucon_pmap_node_t, void *, uintptr_t)) |
cucon_pmap_node_t | cucon_pmap_node_alloc (size_t slot_size) |
void * | cucon_pmap_node_get_mem (cucon_pmap_node_t node) |
void | cucon_pmap_swap (cucon_pmap_t map0, cucon_pmap_t map1) |
cu_bool_t | cucon_pmap_insert_init_node (cucon_pmap_t map, cucon_pmap_node_t node) |
cu_bool_t | cucon_pmap_insert_new_node (cucon_pmap_t map, void const *key, size_t node_size, cu_ptr_ptr_t node_out) |
cu_bool_t | cucon_pmap_insert_mem (cucon_pmap_t map, void const *key, size_t slot_size, cu_ptr_ptr_t slot) |
cu_bool_t | cucon_pmap_insert_void (cucon_pmap_t map, void const *key) |
cu_bool_t | cucon_pmap_insert_ptr (cucon_pmap_t map, void const *key, void *ptr) |
cu_bool_t | cucon_pmap_insert_int (cucon_pmap_t map, void const *key, int val) |
cu_bool_t | cucon_pmap_insert_general (cucon_pmap_t map, void const *key, cu_clop0(alloc_node, cucon_pmap_node_t), cucon_pmap_node_t *node_out) |
void * | cucon_pmap_replace_ptr (cucon_pmap_t map, void const *key, void *ptr) |
int | cucon_pmap_replace_int (cucon_pmap_t map, void const *key, int val) |
cu_bool_t | cucon_pmap_erase (cucon_pmap_t map, void const *key) |
void * | cucon_pmap_erase_ptr (cucon_pmap_t map, void const *key) |
int | cucon_pmap_erase_int (cucon_pmap_t map, void const *key) |
cu_bool_t | cucon_pmap_erase_keep_cap (cucon_pmap_t map, void const *key) |
cucon_pmap_node_t | cucon_pmap_pop_any_node (cucon_pmap_t map) |
void const * | cucon_pmap_pop_any_key (cucon_pmap_t map) |
void | cucon_pmap_update_cap (cucon_pmap_t map) |
cucon_pmap_node_t | cucon_pmap_find_node (cucon_pmap_t map, void const *key) |
void * | cucon_pmap_find_mem (cucon_pmap_t map, void const *key) |
void * | cucon_pmap_find_ptr (cucon_pmap_t map, void const *key) |
int | cucon_pmap_find_int (cucon_pmap_t map, void const *key) |
cu_bool_t | cucon_pmap_find_void (cucon_pmap_t map, void const *key) |
void | cucon_pmap_iter_mem (cucon_pmap_t map, cu_clop(cb, void, void const *key, void *value)) |
void | cucon_pmap_iter_ptr (cucon_pmap_t map, cu_clop(cb, void, void const *key, void *value)) |
cu_bool_t | cucon_pmap_conj_general (cucon_pmap_t map, size_t node_offset, cu_clop(cb, cu_bool_t, void const *, void *)) |
cu_bool_t | cucon_pmap_conj_mem (cucon_pmap_t map, cu_clop(cb, cu_bool_t, void const *, void *)) |
cu_bool_t | cucon_pmap_conj_ptr (cucon_pmap_t map, cu_clop(cb, cu_bool_t, void const *, void *)) |
void | cucon_pmap_iter_keys (cucon_pmap_t map, cu_clop(cb, void, void const *)) |
cu_bool_t | cucon_pmap_conj_keys (cucon_pmap_t map, cu_clop(cb, cu_bool_t, void const *)) |
cu_bool_t | cucon_pmap_conj_node (cucon_pmap_t map, cu_clop(cb, cu_bool_t, cucon_pmap_node_t node)) |
void | cucon_pmap_assign_isecn_union (cucon_pmap_t map0, cucon_pmap_t map1) |
void | cucon_pmap_move_isecn (cucon_pmap_t dst, cucon_pmap_t src0, cucon_pmap_t src1) |
void | cucon_pmap_assign_isecn (cucon_pmap_t dst, cucon_pmap_t src) |
void | cucon_pmap_assign_union_void (cucon_pmap_t dst, cucon_pmap_t src) |
void | cucon_pmap_dump_stats (cucon_pmap_t map, FILE *out) |
size_t | cucon_pmap_size (cucon_pmap_t map) |
cu_bool_t | cucon_pmap_is_empty (cucon_pmap_t map) |
cu_bool_t | cucon_pmap_eq_keys (cucon_pmap_t map0, cucon_pmap_t map1) |
cu_bool_t | cucon_pmap_eq_mem (cucon_pmap_t map0, cucon_pmap_t map1, size_t slot_size) |
cu_bool_t | cucon_pmap_eq_ptr (cucon_pmap_t map0, cucon_pmap_t map1) |
cu_hash_t | cucon_pmap_hash_keys (cucon_pmap_t map) |
cu_hash_t | cucon_pmap_hash_mem (cucon_pmap_t map, size_t slot_size) |
cu_hash_t | cucon_pmap_hash_ptr (cucon_pmap_t map) |
cucon_pmap_it_t | cucon_pmap_begin (cucon_pmap_t map) |
cucon_pmap_it_t | cucon_pmap_end (cucon_pmap_t map) |
cu_bool_t | cucon_pmap_end_eq (cucon_pmap_t map, cucon_pmap_it_t it) |
cucon_pmap_it_t | cucon_pmap_it_next (cucon_pmap_it_t it) |
void | cucon_pmap_dump_idr_ptr (cucon_pmap_t map, FILE *out) |
This header implements hash maps keyed on pointers, and with arbitrary value slots. The slots are arbitrary sized memory which is stored on the nodes for best efficiency. The slots are accessed directly using the *_mem
functions, whereas some specialised functions are provided for pointers and integers.