![]() |
The ROme OpTimistic Simulator
2.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
|
This header implements a simple hash map data structure. More...
Go to the source code of this file.
Data Structures | |
struct | _inner_hash_map_t |
struct | _inner_hash_map_t::_hash_map_node_t |
Typedefs | |
typedef uint32_t | map_size_t |
typedef map_size_t | hash_t |
typedef unsigned long long | key_type_t |
Functions | |
void | _hash_map_init (struct _inner_hash_map_t *_i_hmap) |
void | _hash_map_fini (struct _inner_hash_map_t *_i_hmap) |
void | _hash_map_add (struct _inner_hash_map_t *_i_hmap, unsigned long long key, map_size_t cur_count) |
unsigned | _hash_map_lookup (struct _inner_hash_map_t *_i_hmap, unsigned long long key) |
void | _hash_map_remove (struct _inner_hash_map_t *_i_hmap, unsigned long long key, map_size_t cur_count) |
void | _hash_map_update_i (struct _inner_hash_map_t *_i_hmap, unsigned long long key, map_size_t new_i) |
size_t | _hash_map_dump_size (struct _inner_hash_map_t *_i_hmap) |
unsigned char * | _hash_map_dump (struct _inner_hash_map_t *_i_hmap, unsigned char *_destination) |
unsigned char * | _hash_map_load (struct _inner_hash_map_t *_i_hmap, unsigned char *_source) |
This header implements a simple hash map data structure.
Copyright (C) 2008-2018 HPDCS Group http://www.dis.uniroma1.it/~hpdcs
This file is part of ROOT-Sim (ROme OpTimistic Simulator).
ROOT-Sim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; only version 3 of the License applies.
ROOT-Sim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with ROOT-Sim; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
This a simple hash map implementation, currently used in the abm layer. It's based on a open addressing design: it handles collisions through linear probing, entries are reordered through robin hood hashing. TODO by default __wrap_malloc and __wrap_free are used, instead the choice of the allocation facilities should change on demand
Definition in file hash_map.h.
#define hash_map_count | ( | hashmap | ) |
Definition at line 69 of file hash_map.h.
#define hash_map_delete_elem | ( | hashmap, | |
elem | |||
) |
Definition at line 90 of file hash_map.h.
#define hash_map_dump | ( | hashmap, | |
destination | |||
) |
Definition at line 111 of file hash_map.h.
#define hash_map_dump_size | ( | hashmap | ) |
Definition at line 105 of file hash_map.h.
#define hash_map_fini | ( | hashmap | ) |
Definition at line 73 of file hash_map.h.
#define hash_map_init | ( | hashmap | ) |
Definition at line 64 of file hash_map.h.
#define hash_map_items | ( | hashmap | ) |
Definition at line 99 of file hash_map.h.
#define hash_map_load | ( | hashmap, | |
source | |||
) |
Definition at line 116 of file hash_map.h.
#define hash_map_lookup | ( | hashmap, | |
key | |||
) |
Definition at line 85 of file hash_map.h.
#define hash_map_reserve_elem | ( | hashmap, | |
key | |||
) |
Definition at line 78 of file hash_map.h.
#define rootsim_hash_map | ( | type | ) |
Definition at line 58 of file hash_map.h.