20 #ifndef GALOIS_WORKLIST_LOCALQUEUE_H
21 #define GALOIS_WORKLIST_LOCALQUEUE_H
23 #include <type_traits>
25 #include <boost/mpl/if.hpp>
27 #include "galois/config.h"
33 template <
typename T =
int>
35 template <
bool _concurrent>
38 template <
typename _T>
42 template <
typename Global = NoGlobalQueue<>,
typename Local = GFIFO<
int>,
45 template <
bool _concurrent>
48 template <
typename _T>
52 template <
typename _global>
55 template <
typename _local>
63 template <
typename RangeTy,
64 bool Enable = std::is_same<Global, NoGlobalQueue<T>>::value>
65 void pushGlobal(
const RangeTy& range,
66 typename std::enable_if<Enable>::type* = 0) {
67 auto rp = range.local_pair();
68 local.
getLocal()->push(rp.first, rp.second);
71 template <
typename RangeTy,
72 bool Enable = std::is_same<Global, NoGlobalQueue<T>>::value>
73 void pushGlobal(
const RangeTy& range,
74 typename std::enable_if<!Enable>::type* = 0) {
75 global.push_initial(range);
78 template <
bool Enable = std::is_same<Global, NoGlobalQueue<T>>::value>
83 template <
bool Enable = std::is_same<Global, NoGlobalQueue<T>>::value>
93 template <
typename Iter>
94 void push(Iter b, Iter e) {
98 template <
typename RangeTy>
void push(const value_type &val)
Definition: LocalQueue.h:91
void push(Iter b, Iter e)
Definition: LocalQueue.h:94
Definition: LocalQueue.h:44
T * getLocal()
Definition: PerThreadStorage.h:128
Definition: LocalQueue.h:34
galois::optional< value_type > pop()
Definition: LocalQueue.h:103
Galois version of boost::optional.
Definition: optional.h:34
#define GALOIS_WLCOMPILECHECK(name)
Definition: WLCompileCheck.h:26
void push_initial(const RangeTy &range)
Definition: LocalQueue.h:99
T value_type
Definition: LocalQueue.h:89