eccLib 1.1.0
Python library for bioinformatics written in C
Loading...
Searching...
No Matches
Functions
hashmap_ext.c File Reference

Implementation of the hashmap_ext module. More...

#include "hashmap_ext.h"
#include "common.h"
Include dependency graph for hashmap_ext.c:

Functions

static hashmap_uint32_t xxhash_hasher (hashmap_uint32_t seed, const void *key, hashmap_uint32_t key_len)
 
int hashmap_create_xh (const hashmap_uint32_t initial_capacity, struct hashmap_s *const out_hashmap)
 Create a hashmap with a custom hash function.
 
hashmap_uint32_t hashmap_new_hash (struct hashmap_s *const m, const char *const key, const hashmap_uint32_t len)
 
int hashmap_put_tuple (struct hashmap_s *const m, const char *const key, const hashmap_uint32_t len, PyObject *restrict py_key, PyObject *restrict value)
 
struct map_tuplehashmap_pop_tuple (struct hashmap_s *const m, const char *const key, const hashmap_uint32_t len)
 Remove a value from the hashmap.
 
static int free_iter (void *const context, void *const held)
 
void hashmap_destroy_tuple (struct hashmap_s *m)
 Destroy a hashmap, assuming the values are map_tuples.
 
static int free_iter_py (void *const context, void *const held)
 
void hashmap_destroy_py (struct hashmap_s *m)
 Destroy a hashmap, assuming the values are PyObjects.
 

Detailed Description

Implementation of the hashmap_ext module.

Function Documentation

◆ free_iter()

static int free_iter ( void *const  context,
void *const  held 
)
static
Here is the caller graph for this function:

◆ free_iter_py()

static int free_iter_py ( void *const  context,
void *const  held 
)
static
Here is the caller graph for this function:

◆ hashmap_create_xh()

int hashmap_create_xh ( const hashmap_uint32_t  initial_capacity,
struct hashmap_s *const  out_hashmap 
)

Create a hashmap with a custom hash function.

Parameters
initial_capacitythe initial capacity of the hashmap
out_hashmapthe hashmap to create
Returns
0 on success, 1 on failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashmap_new_hash()

hashmap_uint32_t hashmap_new_hash ( struct hashmap_s *const  m,
const char *const  key,
const hashmap_uint32_t  len 
)
Here is the caller graph for this function:

◆ hashmap_put_tuple()

int hashmap_put_tuple ( struct hashmap_s *const  m,
const char *const  key,
const hashmap_uint32_t  len,
PyObject *restrict  py_key,
PyObject *restrict  value 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xxhash_hasher()

static hashmap_uint32_t xxhash_hasher ( hashmap_uint32_t  seed,
const void *  key,
hashmap_uint32_t  key_len 
)
static
Here is the caller graph for this function: