-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathint_ht_seq.h
More file actions
51 lines (36 loc) · 840 Bytes
/
int_ht_seq.h
File metadata and controls
51 lines (36 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef INT_HT_SEQ_H
#define INT_HT_SEQ_H
#ifdef __cplusplus
#define restrict
extern "C" {
#endif
#include <stdint.h>
typedef struct int_ht_seq {
int64_t size;
int64_t mask;
int64_t elements;
int64_t *keys;
} int_ht_seq_t;
#define INT_HT_SEQ_EMPTY INT64_MIN
#define INT_HT_SEQ_DELETED INT64_MAX
int_ht_seq_t *
int_ht_seq_new(int64_t size);
int_ht_seq_t *
int_ht_seq_init(int_ht_seq_t * ht, int64_t size);
int_ht_seq_t *
int_ht_seq_empty(int_ht_seq_t * ht);
int_ht_seq_t *
int_ht_seq_free_internal(int_ht_seq_t * ht);
int_ht_seq_t *
int_ht_seq_free(int_ht_seq_t * ht);
void
int_ht_seq_expand(int_ht_seq_t * ht, int64_t new_size);
int_ht_seq_t *
int_ht_seq_insert(int_ht_seq_t * ht, int64_t k);
int
int_ht_seq_exists(int_ht_seq_t * ht, int64_t k);
#ifdef __cplusplus
}
#undef restrict
#endif
#endif /*INT-HT-SEQ_H*/