aboutsummaryrefslogtreecommitdiffstats
path: root/build/4coder_byp/custom/4coder_table.h
blob: 5616e80558cf87d02e80840af8b55757c417cc2d (plain) (blame)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * 4coder tables
 */

// TOP

#if !defined(FCODER_TABLES_H)
#define FCODER_TABLES_H

struct Table_Lookup{
 u64 hash;
 u32 index;
 b8 found_match;
 b8 found_empty_slot;
 b8 found_erased_slot;
 };

 struct Table_u64_u64{
 Base_Allocator *allocator;
 void *memory;
 u64 *keys;
 u64 *vals;
 u32 slot_count;
 u32 used_count;
 u32 dirty_count;
 };

 struct Table_u32_u16{
 Base_Allocator *allocator;
 void *memory;
 u32 *keys;
 u16 *vals;
 u32 slot_count;
 u32 used_count;
 u32 dirty_count;
 };

 struct Table_Data_u64{
 Base_Allocator *allocator;
 void *memory;
 u64 *hashes;
 String_Const_u8 *keys;
 u64 *vals;
 u32 slot_count;
 u32 used_count;
 u32 dirty_count;
 };

 struct Table_u64_Data{
 Base_Allocator *allocator;
 void *memory;
 u64 *keys;
 String_Const_u8 *vals;
 u32 slot_count;
 u32 used_count;
 u32 dirty_count;
 };

 struct Table_Data_Data{
 Base_Allocator *allocator;
 void *memory;
 u64 *hashes;
 String_Const_u8 *keys;
 String_Const_u8 *vals;
 u32 slot_count;
 u32 used_count;
 u32 dirty_count;
};

#endif

// BOTTOM