SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
sion_keyvalue_table.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** SIONLIB http://www.fz-juelich.de/jsc/sionlib **
3 *****************************************************************************
4 ** Copyright (c) 2008-2019 **
5 ** Forschungszentrum Juelich, Juelich Supercomputing Centre **
6 ** **
7 ** See the file COPYRIGHT in the package base directory for details **
8 ****************************************************************************/
9 
14 #ifndef SION_SION_KEYVALUE_TABLE_H
15 #define SION_SION_KEYVALUE_TABLE_H
16 
17 #include <stdint.h>
18 
19 #include "sion_const.h"
20 #include "sion_filedesc.h"
21 
22 #define INITIAL_HASH_SIZE (1*1024)
23 typedef uint64_t sion_table_key_t;
24 
26 
27 _sion_keyvalue_table* _sion_keyvalue_table_init(int size);
28 
29 int _sion_keyvalue_table_destroy(_sion_keyvalue_table** table);
30 
31 int _sion_keyvalue_table_store(_sion_keyvalue_table* table, sion_table_key_t key, void *data);
32 
33 void* _sion_keyvalue_table_lookup(_sion_keyvalue_table* table, sion_table_key_t key);
34 
35 int _sion_keyvalue_table_iterator_reset(_sion_keyvalue_table* table);
36 int _sion_keyvalue_table_iterator_next(_sion_keyvalue_table* table, sion_table_key_t *key, void **data);
37 int _sion_keyvalue_table_iterator_next_in_store_order(_sion_keyvalue_table* table, sion_table_key_t *key, void **data);
38 
39 int _sion_keyvalue_table_get_size(_sion_keyvalue_table* table);
40 
41 #endif