SIONlib  1.7.1
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-2016 **
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 #include "sion.h"
19 #include "sion_filedesc.h"
20 
21 #define INITIAL_HASH_SIZE (1*1024)
22 typedef uint64_t sion_table_key_t;
23 
25 
26 _sion_keyvalue_table* _sion_keyvalue_table_init(int size);
27 
28 int _sion_keyvalue_table_destroy(_sion_keyvalue_table** table);
29 
30 int _sion_keyvalue_table_store(_sion_keyvalue_table* table, sion_table_key_t key, void *data);
31 
32 void* _sion_keyvalue_table_lookup(_sion_keyvalue_table* table, sion_table_key_t key);
33 
34 int _sion_keyvalue_table_iterator_reset(_sion_keyvalue_table* table);
35 int _sion_keyvalue_table_iterator_next(_sion_keyvalue_table* table, sion_table_key_t *key, void **data);
36 int _sion_keyvalue_table_iterator_next_in_store_order(_sion_keyvalue_table* table, sion_table_key_t *key, void **data);
37 
38 int _sion_keyvalue_table_get_size(_sion_keyvalue_table* table);
39 
40 #endif