Boolean Variable Ordering optimizations
[satune.git] / src / Collections / structs.h
1 #ifndef STRUCTS_H
2 #define STRUCTS_H
3 #include "cppvector.h"
4 #include "hashtable.h"
5 #include "hashset.h"
6 #include "classlist.h"
7 #include "array.h"
8 #include "corestructs.h"
9
10
11 unsigned int table_entry_hash_function(TableEntry *This);
12 bool table_entry_equals(TableEntry *key1, TableEntry *key2);
13 unsigned int order_node_hash_function(OrderNodeKey *This);
14 bool order_node_equals(OrderNodeKey *key1, OrderNodeKey *key2);
15 unsigned int tunable_dependent_hash_function(TunableDependent *This);
16 bool tunable_dependent_equals(TunableDependent *key1, TunableDependent *key2);
17 unsigned int order_edge_hash_function(OrderEdge *This);
18 bool order_edge_equals(OrderEdge *key1, OrderEdge *key2);
19 unsigned int order_element_hash_function(OrderElement *This);
20 bool order_element_equals(OrderElement *key1, OrderElement *key2);
21 unsigned int order_pair_hash_function(OrderPair *This);
22 bool order_pair_equals(OrderPair *key1, OrderPair *key2);
23
24 unsigned int doredge_hash_function(DOREdge *key);
25 bool doredge_equals(DOREdge *key1, DOREdge *key2);
26
27
28 typedef Hashset<TableEntry *, uintptr_t, PTRSHIFT, table_entry_hash_function, table_entry_equals> HashsetTableEntry;
29 typedef Hashset<OrderNodeKey *, uintptr_t, PTRSHIFT, order_node_hash_function, order_node_equals> HashsetOrderNode;
30 typedef Hashset<TunableDependent *, uintptr_t, PTRSHIFT, tunable_dependent_hash_function, tunable_dependent_equals> HashsetTunableDep;
31 typedef Hashset<OrderEdge *, uintptr_t, PTRSHIFT, order_edge_hash_function, order_edge_equals> HashsetOrderEdge;
32 typedef Hashset<OrderElement *, uintptr_t, PTRSHIFT, order_element_hash_function, order_element_equals> HashsetOrderElement;
33 typedef Hashset<DOREdge *, uintptr_t, PTRSHIFT, doredge_hash_function, doredge_equals> HashsetDOREdge;
34 typedef Hashset<Boolean *, uintptr_t, PTRSHIFT> HashsetBoolean;
35 typedef Hashset<Element *, uintptr_t, PTRSHIFT> HashsetElement;
36 typedef SetIterator<Boolean *, uintptr_t, PTRSHIFT> SetIteratorBoolean;
37 typedef Hashset<uint64_t, uint64_t, 0> Hashset64Int;
38 typedef SetIterator<uint64_t, uint64_t, 0> SetIterator64Int;
39
40
41 typedef Hashtable<OrderNodeKey *, HashsetOrderNode *, uintptr_t, PTRSHIFT> HashtableNodeToNodeSet;
42 typedef Hashtable<OrderPair *, OrderPair *, uintptr_t, PTRSHIFT, order_pair_hash_function, order_pair_equals> HashtableOrderPair;
43 typedef Hashtable<void *, void *, uintptr_t, PTRSHIFT> CloneMap;
44
45
46 typedef Hashtable<Set *, EncodingNode *, uintptr_t, PTRSHIFT> HashtableEncoding;
47
48
49 typedef SetIterator<TableEntry *, uintptr_t, PTRSHIFT, table_entry_hash_function, table_entry_equals> SetIteratorTableEntry;
50 typedef SetIterator<OrderEdge *, uintptr_t, PTRSHIFT, order_edge_hash_function, order_edge_equals> SetIteratorOrderEdge;
51 typedef SetIterator<OrderNodeKey *, uintptr_t, PTRSHIFT, order_node_hash_function, order_node_equals> SetIteratorOrderNode;
52 typedef SetIterator<TunableDependent *, uintptr_t, PTRSHIFT, tunable_dependent_hash_function, tunable_dependent_equals> SetIteratorTunableDep;
53 typedef SetIterator<OrderElement *, uintptr_t, PTRSHIFT, order_element_hash_function, order_element_equals> SetIteratorOrderElement;
54 typedef SetIterator<DOREdge *, uintptr_t, PTRSHIFT, doredge_hash_function, doredge_equals> SetIteratorDOREdge;
55 #endif