-
Notifications
You must be signed in to change notification settings - Fork 0
/
sds.odin
122 lines (101 loc) · 1.67 KB
/
sds.odin
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package sds
// Procedure groups for common operations on datastructures:
slice :: proc {
array_slice,
soa_array_slice,
}
set :: proc {
array_set,
soa_array_set,
pool_set,
queue_set,
bit_array_set,
}
set_safe :: proc {
array_set_safe,
soa_array_set_safe,
pool_set_safe,
queue_set_safe,
bit_array_set_safe,
}
get :: proc {
array_get,
soa_array_get,
pool_get,
queue_get,
bit_array_get,
}
get_safe :: proc {
array_get_safe,
soa_array_get_safe,
pool_get_safe,
queue_get_safe,
bit_array_get_safe,
}
get_ptr :: proc {
array_get_ptr,
soa_array_get_ptr,
pool_get_ptr,
queue_get_ptr,
}
get_ptr_safe :: proc {
array_get_ptr_safe,
soa_array_get_ptr_safe,
pool_get_ptr_safe,
queue_get_ptr_safe,
}
has_index :: proc {
array_has_index,
soa_array_has_index,
pool_has_index,
}
has_handle :: proc {
pool_has_handle,
}
push :: proc {
array_push,
soa_array_push,
pool_push,
queue_push_back,
spsc_push,
}
push_safe :: proc {
array_push_safe,
}
push_elems :: proc {
array_push_elems,
spsc_push_elems,
}
push_elems_safe :: proc {
array_push_elems_safe,
}
push_empty :: proc {
array_push_empty,
soa_array_push_empty,
pool_push_empty,
}
pop :: proc {
array_pop_back,
soa_array_pop_back,
queue_pop_back,
spsc_pop,
}
pop_elems :: proc {
spsc_pop_elems,
}
pop_safe :: proc {
array_pop_back_safe,
soa_array_pop_back_safe,
queue_pop_back_safe,
}
pop_front :: proc {
queue_pop_front,
}
pop_front_safe :: proc {
queue_pop_front_safe,
}
remove :: proc {
array_remove,
soa_array_remove,
pool_remove,
}