00001 00023 #ifndef GALOIS_RUNTIME_WORKLIST_H 00024 #define GALOIS_RUNTIME_WORKLIST_H 00025 00026 #include "Galois/optional.h" 00027 00028 #include "AltChunked.h" 00029 #include "BulkSynchronous.h" 00030 #include "Chunked.h" 00031 #include "Fifo.h" 00032 #include "GFifo.h" 00033 #include "Lifo.h" 00034 #include "LocalQueue.h" 00035 #include "Obim.h" 00036 #include "OrderedList.h" 00037 #include "OwnerComputes.h" 00038 #include "StableIterator.h" 00039 00040 namespace Galois { 00055 namespace WorkList { 00056 namespace { // don't pollute the symbol table with the example 00057 00058 // Worklists may not be copied. 00059 // Worklists should be default instantiatable 00060 // All classes (should) conform to: 00061 template<typename T, bool Concurrent> 00062 class AbstractWorkList { 00063 AbstractWorkList(const AbstractWorkList&); 00064 const AbstractWorkList& operator=(const AbstractWorkList&); 00065 00066 public: 00067 AbstractWorkList() { } 00068 00070 typedef T value_type; 00071 00073 template<bool _concurrent> 00074 struct rethread { typedef AbstractWorkList<T, _concurrent> type; }; 00075 00077 template<typename _T> 00078 struct retype { typedef AbstractWorkList<_T, Concurrent> type; }; 00079 00081 void push(const value_type& val); 00082 00084 template<typename Iter> 00085 void push(Iter b, Iter e); 00086 00089 template<typename RangeTy> 00090 void push_initial(const RangeTy&); 00091 00093 Galois::optional<value_type> pop(); 00094 }; 00095 00096 } // end namespace anonymous 00097 } // end namespace WorkList 00098 } // end namespace Galois 00099 00100 #endif