|
Astaroth
3.1
Scalable Multi-GPU Stencil Computations
|
Go to the source code of this file.
Data Structures | |
| struct | hashmap_create_options_t |
| struct | hashmap_element_t |
| struct | hashmap_t |
Macros | |
| #define | HASHMAP_ALWAYS_INLINE HASHMAP_WEAK |
| #define | HASHMAP_ATTRIBUTE(a) |
| #define | HASHMAP_CAST(type, x) |
| #define | HASHMAP_LINEAR_PROBE_LENGTH (8) |
| #define | HASHMAP_NULL 0 |
| #define | HASHMAP_PTR_CAST(type, x) |
Typedefs | |
| typedef int(* | hashmap_comparer_t) (const void *a, hashmap_uint32_t a_len, const void *b, hashmap_uint32_t b_len) |
| typedef hashmap_uint32_t(* | hashmap_hasher_t) (hashmap_uint32_t seed, const void *key, hashmap_uint32_t key_len) |
| typedef uint32_t | hashmap_uint32_t |
| typedef uint64_t | hashmap_uint64_t |
| typedef uint8_t | hashmap_uint8_t |
Functions | |
| HASHMAP_WEAK hashmap_uint32_t | hashmap_capacity (const struct hashmap_s *const hashmap) |
| Get the capacity of the hashmap. | |
| HASHMAP_WEAK hashmap_uint32_t | hashmap_clz (const hashmap_uint32_t x) |
| HASHMAP_WEAK int | hashmap_create (const hashmap_uint32_t initial_capacity, struct hashmap_s *const out_hashmap) |
| Create a hashmap. | |
| HASHMAP_WEAK int | hashmap_create_ex (struct hashmap_create_options_s options, struct hashmap_s *const out_hashmap) |
| Create a hashmap. | |
| HASHMAP_WEAK void | hashmap_destroy (struct hashmap_s *const hashmap) |
| Destroy the hashmap. | |
| HASHMAP_WEAK void * | hashmap_get (const struct hashmap_s *const hashmap, const void *const key, const hashmap_uint32_t len) |
| Get an element from the hashmap. | |
| HASHMAP_WEAK int | hashmap_hash_helper (const struct hashmap_s *const m, const void *const key, const hashmap_uint32_t len, hashmap_uint32_t *const out_index) |
| HASHMAP_WEAK hashmap_uint32_t | hashmap_hash_helper_int_helper (const struct hashmap_s *const m, const void *const key, const hashmap_uint32_t len) |
| HASHMAP_WEAK int | hashmap_iterate (const struct hashmap_s *const hashmap, int(*iterator)(void *const context, void *const value), void *const context) |
| Iterate over all the elements in a hashmap. | |
| HASHMAP_WEAK int | hashmap_iterate_pairs (struct hashmap_s *const hashmap, int(*iterator)(void *const, struct hashmap_element_s *const), void *const context) |
| Iterate over all the elements in a hashmap. | |
| HASHMAP_WEAK hashmap_uint32_t | hashmap_num_entries (const struct hashmap_s *const hashmap) |
| Get the size of the hashmap. | |
| HASHMAP_WEAK int | hashmap_put (struct hashmap_s *const hashmap, const void *const key, const hashmap_uint32_t len, void *const value) |
| Put an element into the hashmap. | |
| HASHMAP_WEAK int | hashmap_rehash_helper (struct hashmap_s *const m) |
| HASHMAP_WEAK int | hashmap_rehash_iterator (void *const new_hash, struct hashmap_element_s *const e) |
| HASHMAP_WEAK int | hashmap_remove (struct hashmap_s *const hashmap, const void *const key, const hashmap_uint32_t len) |
| Remove an element from the hashmap. | |
| HASHMAP_WEAK const void * | hashmap_remove_and_return_key (struct hashmap_s *const hashmap, const void *const key, const hashmap_uint32_t len) |
| Remove an element from the hashmap. | |
| #define HASHMAP_ALWAYS_INLINE HASHMAP_WEAK |
| #define HASHMAP_ATTRIBUTE | ( | a | ) |
| #define HASHMAP_CAST | ( | type, | |
| x ) |
| #define HASHMAP_LINEAR_PROBE_LENGTH (8) |
| #define HASHMAP_NULL 0 |
| #define HASHMAP_PTR_CAST | ( | type, | |
| x ) |
| typedef int(* hashmap_comparer_t) (const void *a, hashmap_uint32_t a_len, const void *b, hashmap_uint32_t b_len) |
| typedef hashmap_uint32_t(* hashmap_hasher_t) (hashmap_uint32_t seed, const void *key, hashmap_uint32_t key_len) |
| typedef uint32_t hashmap_uint32_t |
| typedef uint64_t hashmap_uint64_t |
| typedef uint8_t hashmap_uint8_t |
| HASHMAP_WEAK hashmap_uint32_t hashmap_capacity | ( | const struct hashmap_s *const | hashmap | ) |
Get the capacity of the hashmap.
| hashmap | The hashmap to get the size of. |
| HASHMAP_WEAK hashmap_uint32_t hashmap_clz | ( | const hashmap_uint32_t | x | ) |
| int hashmap_create | ( | const hashmap_uint32_t | initial_capacity, |
| struct hashmap_s *const | out_hashmap ) |
Create a hashmap.
| initial_capacity | The initial capacity of the hashmap. |
| out_hashmap | The storage for the created hashmap. |
| int hashmap_create_ex | ( | struct hashmap_create_options_s | options, |
| struct hashmap_s *const | out_hashmap ) |
Create a hashmap.
| options | The options to create the hashmap with. |
| out_hashmap | The storage for the created hashmap. |
The options members work as follows:
| void hashmap_destroy | ( | struct hashmap_s *const | hashmap | ) |
Destroy the hashmap.
| hashmap | The hashmap to destroy. |
| void * hashmap_get | ( | const struct hashmap_s *const | hashmap, |
| const void *const | key, | ||
| const hashmap_uint32_t | len ) |
Get an element from the hashmap.
| hashmap | The hashmap to get from. |
| key | The string key to use. |
| len | The length of the string key. |
| HASHMAP_WEAK int hashmap_hash_helper | ( | const struct hashmap_s *const | m, |
| const void *const | key, | ||
| const hashmap_uint32_t | len, | ||
| hashmap_uint32_t *const | out_index ) |
| HASHMAP_WEAK hashmap_uint32_t hashmap_hash_helper_int_helper | ( | const struct hashmap_s *const | m, |
| const void *const | key, | ||
| const hashmap_uint32_t | len ) |
| int hashmap_iterate | ( | const struct hashmap_s *const | hashmap, |
| int(* | iterator )(void *const context, void *const value), | ||
| void *const | context ) |
Iterate over all the elements in a hashmap.
| hashmap | The hashmap to iterate over. |
| iterator | The function pointer to call on each element. |
| context | The context to pass as the first argument to f. |
| int hashmap_iterate_pairs | ( | struct hashmap_s *const | hashmap, |
| int(* | iterator )(void *const, struct hashmap_element_s *const), | ||
| void *const | context ) |
Iterate over all the elements in a hashmap.
| hashmap | The hashmap to iterate over. |
| iterator | The function pointer to call on each element. |
| context | The context to pass as the first argument to f. |
| HASHMAP_WEAK hashmap_uint32_t hashmap_num_entries | ( | const struct hashmap_s *const | hashmap | ) |
Get the size of the hashmap.
| hashmap | The hashmap to get the size of. |
| int hashmap_put | ( | struct hashmap_s *const | hashmap, |
| const void *const | key, | ||
| const hashmap_uint32_t | len, | ||
| void *const | value ) |
Put an element into the hashmap.
| hashmap | The hashmap to insert into. |
| key | The string key to use. |
| len | The length of the string key. |
| value | The value to insert. |
The key string slice is not copied when creating the hashmap entry, and thus must remain a valid pointer until the hashmap entry is removed or the hashmap is destroyed.
| HASHMAP_WEAK int hashmap_rehash_helper | ( | struct hashmap_s *const | m | ) |
| int hashmap_rehash_iterator | ( | void *const | new_hash, |
| struct hashmap_element_s *const | e ) |
| int hashmap_remove | ( | struct hashmap_s *const | hashmap, |
| const void *const | key, | ||
| const hashmap_uint32_t | len ) |
Remove an element from the hashmap.
| hashmap | The hashmap to remove from. |
| key | The string key to use. |
| len | The length of the string key. |
| const void * hashmap_remove_and_return_key | ( | struct hashmap_s *const | hashmap, |
| const void *const | key, | ||
| const hashmap_uint32_t | len ) |
Remove an element from the hashmap.
| hashmap | The hashmap to remove from. |
| key | The string key to use. |
| len | The length of the string key. |