libMVL
Mappable vector library
|
This structure is used for constructing associative maps and also for describing index groupings. More...
#include <libMVL.h>
Public Attributes | |
LIBMVL_OFFSET64 | flags |
flags describing HASH_MAP state | |
LIBMVL_OFFSET64 | hash_count |
Number of valid entries in hash, hash_count < hash_size and hash_count < hash_map_size. | |
LIBMVL_OFFSET64 | hash_size |
size of hash, first and next arrays | |
LIBMVL_OFFSET64 | hash_map_size |
size of hash_map array, should be power of 2 | |
LIBMVL_OFFSET64 | first_count |
Number of valid entries in first array - this is populated by mvl_find_groups() | |
LIBMVL_OFFSET64 * | hash |
Input hashes, used by mvl_compute_hash_map() | |
LIBMVL_OFFSET64 * | hash_map |
This is an associative table mapping hash & (hash_map_size-1) into indices in the "first" array. | |
LIBMVL_OFFSET64 * | first |
array of indices in each group | |
LIBMVL_OFFSET64 * | next |
array of next indices in each group. ~0LLU indicates end of group | |
LIBMVL_OFFSET64 | vec_count |
Number of vectors used to produce hashes. | |
int * | vec_types |
Types of vectors used to produce hashes. | |
This structure is used for constructing associative maps and also for describing index groupings.
This structure can either be allocated by mvl_allocate_hash_map() or constructed by the caller. In the latter case read comments describing size constraints. You can use flags to indicate that some arrays are not to be freed, such as when they point into memory mapped data. The purpose of having hash_size is to facilitate memory reuse by allocating the structure with hash_size large enough to accomodate subsequent calls with different hash_count