28 #ifndef OPAL_HASH_TABLE_H
29 #define OPAL_HASH_TABLE_H
31 #include "opal_config.h"
184 size_t keylen,
void **ptr);
233 void **value,
void **node);
251 void **value,
void *in_node,
269 void **value,
void **node);
287 void **value,
void *in_node,
OPAL_DECLSPEC int opal_hash_table_set_value_uint32(opal_hash_table_t *table, uint32_t key, void *value)
Set value based on uint32_t key.
Definition: opal_hash_table.c:153
Definition: opal_hash_table.h:42
OPAL_DECLSPEC int opal_hash_table_get_first_key_uint64(opal_hash_table_t *table, uint64_t *key, void **value, void **node)
Get the first 64 key from the hash table, which can be used later to get the next key...
Definition: opal_hash_table.c:542
size_t ht_size
number of values on table
Definition: opal_hash_table.h:48
OPAL_DECLSPEC int opal_hash_table_get_first_key_uint32(opal_hash_table_t *table, uint32_t *key, void **value, void **node)
The following functions are only for allowing iterating through the hash table.
Definition: opal_hash_table.c:470
OPAL_DECLSPEC int opal_hash_table_get_value_uint64(opal_hash_table_t *table, uint64_t key, void **ptr)
Retrieve value via uint64_t key.
Definition: opal_hash_table.c:234
static size_t opal_hash_table_get_size(opal_hash_table_t *ht)
Returns the number of elements currently stored in the table.
Definition: opal_hash_table.h:77
OPAL_DECLSPEC int opal_hash_table_set_value_ptr(opal_hash_table_t *table, const void *key, size_t keylen, void *value)
Set value based on arbitrary length binary key.
Definition: opal_hash_table.c:396
OPAL_DECLSPEC int opal_hash_table_remove_all(opal_hash_table_t *ht)
Remove all elements from the table.
Definition: opal_hash_table.c:89
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
opal_object_t super
subclass of opal_object_t
Definition: opal_hash_table.h:44
OPAL_DECLSPEC int opal_hash_table_get_value_ptr(opal_hash_table_t *table, const void *key, size_t keylen, void **ptr)
Retrieve value via arbitrary length binary key.
Definition: opal_hash_table.c:369
opal_list_t * ht_table
each item is an array of opal_fhnode_t nodes
Definition: opal_hash_table.h:46
OPAL_DECLSPEC int opal_hash_table_remove_value_ptr(opal_hash_table_t *table, const void *key, size_t keylen)
Remove value based on arbitrary length binary key.
Definition: opal_hash_table.c:437
opal_list_t ht_nodes
free list of hash nodes
Definition: opal_hash_table.h:45
Base object.
Definition: opal_object.h:182
Definition: opal_list.h:147
OPAL_DECLSPEC int opal_hash_table_remove_value_uint64(opal_hash_table_t *table, uint64_t key)
Remove value based on uint64_t key.
Definition: opal_hash_table.c:296
OPAL_DECLSPEC int opal_hash_table_init(opal_hash_table_t *ht, size_t table_size)
Initializes the table size, must be called before using the table.
Definition: opal_hash_table.c:71
OPAL_DECLSPEC int opal_hash_table_get_value_uint32(opal_hash_table_t *table, uint32_t key, void **ptr)
Retrieve value via uint32_t key.
Definition: opal_hash_table.c:128
OPAL_DECLSPEC int opal_hash_table_remove_value_uint32(opal_hash_table_t *table, uint32_t key)
Remove value based on uint32_t key.
Definition: opal_hash_table.c:189
OPAL_DECLSPEC int opal_hash_table_get_next_key_uint32(opal_hash_table_t *table, uint32_t *key, void **value, void *in_node, void **out_node)
Get the next 32 bit key from the hash table, knowing the current key.
Definition: opal_hash_table.c:497
OPAL_DECLSPEC int opal_hash_table_get_next_key_uint64(opal_hash_table_t *table, uint64_t *key, void **value, void *in_node, void **out_node)
Get the next 64 bit key from the hash table, knowing the current key.
Definition: opal_hash_table.c:569
OPAL_DECLSPEC int opal_hash_table_set_value_uint64(opal_hash_table_t *table, uint64_t key, void *value)
Set value based on uint64_t key.
Definition: opal_hash_table.c:259
size_t ht_table_size
size of table
Definition: opal_hash_table.h:47
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236