Initial commit
[cgperf.git] / bool-array.h
blob95585899ef9fa01219bb820a0fdb5bf3730d29dc
1 #ifndef CGPERF_BOOL_ARRAY_H
2 #define CGPERF_BOOL_ARRAY_H
3 #include "c_fixing.h"
4 /*------------------------------------------------------------------------------------------------*/
5 #include "namespace/bool-array.h"
6 /*------------------------------------------------------------------------------------------------*/
7 /*{{{ constants and types */
8 struct Bool_Array {
9 /*{{{ private */
10 /* size of array */
11 u32 size;
13 * Current iteration number. Always nonzero. Starts out as 1, and is
14 * incremented each time clear() is called.
16 u32 iteration_number;
18 * for each index, we store in storage_array[index] the
19 * iteration_number at the time set_bit(index) was last called
21 u32 *storage_array;
22 /*}}} private -- END */
24 /*}}} constants and types -- END */
25 /*{{{ public static methods */
26 static struct Bool_Array *ba_new(u32 size);
27 static void ba_del(struct Bool_Array *t);
28 static void ba_clear(struct Bool_Array *t);
29 static bool ba_set_bit(struct Bool_Array *t, u32 index);
30 /*}}} public static methods -- END */
31 /*------------------------------------------------------------------------------------------------*/
32 #define EPILOG
33 #include "namespace/bool-array.h"
34 #undef EPILOG
35 /*------------------------------------------------------------------------------------------------*/
36 #endif