sparse or decompose
[satune.git] / src / Collections / structs.h
index 88cd42a0941ccaff833137237abe3ae1fc36d7ad..6540b5ad289d6536318b1bf8ea505dc47ac27159 100644 (file)
@@ -7,31 +7,46 @@
 #include "array.h"
 #include "corestructs.h"
 
+
 unsigned int table_entry_hash_function(TableEntry *This);
 bool table_entry_equals(TableEntry *key1, TableEntry *key2);
-unsigned int order_node_hash_function(OrderNode *This);
-bool order_node_equals(OrderNode *key1, OrderNode *key2);
+unsigned int order_node_hash_function(OrderNodeKey *This);
+bool order_node_equals(OrderNodeKey *key1, OrderNodeKey *key2);
 unsigned int order_edge_hash_function(OrderEdge *This);
 bool order_edge_equals(OrderEdge *key1, OrderEdge *key2);
 unsigned int order_element_hash_function(OrderElement *This);
 bool order_element_equals(OrderElement *key1, OrderElement *key2);
 unsigned int order_pair_hash_function(OrderPair *This);
 bool order_pair_equals(OrderPair *key1, OrderPair *key2);
+unsigned int tunableSettingHash(TunableSetting *setting);
+bool tunableSettingEquals(TunableSetting *setting1, TunableSetting *setting2);
+unsigned int doredge_hash_function(DOREdge *key);
+bool doredge_equals(DOREdge *key1, DOREdge *key2);
 
 
+typedef Hashset<TableEntry *, uintptr_t, PTRSHIFT, table_entry_hash_function, table_entry_equals> HashsetTableEntry;
+typedef Hashset<OrderNodeKey *, uintptr_t, PTRSHIFT, order_node_hash_function, order_node_equals> HashsetOrderNode;
+typedef Hashset<OrderEdge *, uintptr_t, PTRSHIFT, order_edge_hash_function, order_edge_equals> HashsetOrderEdge;
+typedef Hashset<OrderElement *, uintptr_t, PTRSHIFT, order_element_hash_function, order_element_equals> HashsetOrderElement;
+typedef Hashset<DOREdge *, uintptr_t, PTRSHIFT, doredge_hash_function, doredge_equals> HashsetDOREdge;
+typedef Hashset<Boolean *, uintptr_t, PTRSHIFT> HashsetBoolean;
+typedef Hashset<Element *, uintptr_t, PTRSHIFT> HashsetElement;
+typedef Hashset<uint64_t, uint64_t, 0> Hashset64Int;
+typedef Hashset<TunableSetting *, uintptr_t, 4, tunableSettingHash, tunableSettingEquals> HashsetTunableSetting;
 
-typedef HashSet<TableEntry *, uintptr_t, 4, table_entry_hash_function, table_entry_equals> HashSetTableEntry;
-typedef HashSet<OrderNode *, uintptr_t, 4, order_node_hash_function, order_node_equals> HashSetOrderNode;
-typedef HashSet<OrderEdge *, uintptr_t, 4, order_edge_hash_function, order_edge_equals> HashSetOrderEdge;
-typedef HashSet<OrderElement *, uintptr_t, 4, order_element_hash_function, order_element_equals> HashSetOrderElement;
-typedef HashTable<OrderNode *, HashSetOrderNode *, uintptr_t, 4> HashTableNodeToNodeSet;
-typedef HashTable<OrderPair *, OrderPair *, uintptr_t, 4, order_pair_hash_function, order_pair_equals> HashTableOrderPair;
-typedef HashTable<void *, void *, uintptr_t, 4> CloneMap;
-typedef HashTable<Order* , IntegerEncodingRecord*, uintptr_t, 4> HashTableOrderIntegerEncoding; 
 
-typedef SetIterator<TableEntry *, uintptr_t, 4, table_entry_hash_function, table_entry_equals> SetIteratorTableEntry;
-typedef SetIterator<OrderEdge *, uintptr_t, 4, order_edge_hash_function, order_edge_equals> SetIteratorOrderEdge;
-typedef SetIterator<OrderNode *, uintptr_t, 4, order_node_hash_function, order_node_equals> SetIteratorOrderNode;
+typedef Hashtable<OrderNodeKey *, HashsetOrderNode *, uintptr_t, PTRSHIFT> HashtableNodeToNodeSet;
+typedef Hashtable<OrderPair *, OrderPair *, uintptr_t, PTRSHIFT, order_pair_hash_function, order_pair_equals> HashtableOrderPair;
+typedef Hashtable<void *, void *, uintptr_t, PTRSHIFT> CloneMap;
+typedef Hashtable<Set *, EncodingNode *, uintptr_t, PTRSHIFT> HashtableEncoding;
 
 
+typedef SetIterator<TableEntry *, uintptr_t, PTRSHIFT, table_entry_hash_function, table_entry_equals> SetIteratorTableEntry;
+typedef SetIterator<OrderEdge *, uintptr_t, PTRSHIFT, order_edge_hash_function, order_edge_equals> SetIteratorOrderEdge;
+typedef SetIterator<OrderNodeKey *, uintptr_t, PTRSHIFT, order_node_hash_function, order_node_equals> SetIteratorOrderNode;
+typedef SetIterator<OrderElement *, uintptr_t, PTRSHIFT, order_element_hash_function, order_element_equals> SetIteratorOrderElement;
+typedef SetIterator<DOREdge *, uintptr_t, PTRSHIFT, doredge_hash_function, doredge_equals> SetIteratorDOREdge;
+typedef SetIterator<Boolean *, uintptr_t, PTRSHIFT> SetIteratorBoolean;
+typedef SetIterator<uint64_t, uint64_t, 0> SetIterator64Int;
+typedef SetIterator<TunableSetting *, uintptr_t, 4, tunableSettingHash, tunableSettingEquals> SetIteratorTunableSetting;
 #endif