Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PerThreadContainer.h
Go to the documentation of this file.
1 /*
2  * This file belongs to the Galois project, a C++ library for exploiting
3  * parallelism. The code is being released under the terms of the 3-Clause BSD
4  * License (a copy is located in LICENSE.txt at the top-level directory).
5  *
6  * Copyright (C) 2018, The University of Texas at Austin. All rights reserved.
7  * UNIVERSITY EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES CONCERNING THIS
8  * SOFTWARE AND DOCUMENTATION, INCLUDING ANY WARRANTIES OF MERCHANTABILITY,
9  * FITNESS FOR ANY PARTICULAR PURPOSE, NON-INFRINGEMENT AND WARRANTIES OF
10  * PERFORMANCE, AND ANY WARRANTY THAT MIGHT OTHERWISE ARISE FROM COURSE OF
11  * DEALING OR USAGE OF TRADE. NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH
12  * RESPECT TO THE USE OF THE SOFTWARE OR DOCUMENTATION. Under no circumstances
13  * shall University be liable for incidental, special, indirect, direct or
14  * consequential damages or loss of profits, interruption of business, or
15  * related expenses which may arise from use of Software or Documentation,
16  * including but not limited to those resulting from defects in Software and/or
17  * Documentation, or loss or inaccuracy of data of any kind.
18  */
19 
20 #ifndef GALOIS_PERTHREADCONTAINER_H
21 #define GALOIS_PERTHREADCONTAINER_H
22 
23 #include <cstdio>
24 #include <vector>
25 #include <deque>
26 #include <list>
27 #include <map>
28 #include <set>
29 #include <limits>
30 #include <iterator>
31 
32 #include <boost/iterator/counting_iterator.hpp>
33 #include <boost/iterator/iterator_facade.hpp>
34 #include <boost/iterator/transform_iterator.hpp>
35 
36 #include "galois/config.h"
37 #include "galois/gdeque.h"
38 #include "galois/gIO.h"
39 #include "galois/gstl.h"
40 #include "galois/PriorityQueue.h"
43 #include "galois/runtime/Mem.h"
46 #include "galois/Threads.h"
48 
49 namespace galois {
50 
51 namespace {
52 
53 enum GlobalPos { GLOBAL_BEGIN, GLOBAL_END };
54 
55 #define ADAPTOR_BASED_OUTER_ITER
56 
57 // XXX: use a combination of boost::transform_iterator and
58 // boost::counting_iterator to implement the following OuterPerThreadWLIter
59 #ifdef ADAPTOR_BASED_OUTER_ITER
60 
61 template <typename PerThrdCont>
62 struct WLindexer
63  : public std::unary_function<unsigned,
64  typename PerThrdCont::container_type&> {
65  typedef typename PerThrdCont::container_type Ret_ty;
66 
67  PerThrdCont* wl;
68 
69  WLindexer() : wl(NULL) {}
70 
71  WLindexer(PerThrdCont& _wl) : wl(&_wl) {}
72 
73  Ret_ty& operator()(unsigned i) const {
74  assert(wl != NULL);
75  assert(i < wl->numRows());
76  return const_cast<Ret_ty&>(wl->get(i));
77  }
78 };
79 
80 template <typename PerThrdCont>
81 struct TypeFactory {
82  typedef typename boost::transform_iterator<WLindexer<PerThrdCont>,
83  boost::counting_iterator<unsigned>>
84  OuterIter;
85  typedef typename std::reverse_iterator<OuterIter> RvrsOuterIter;
86 };
87 
88 template <typename PerThrdCont>
89 typename TypeFactory<PerThrdCont>::OuterIter make_outer_begin(PerThrdCont& wl) {
90  return boost::make_transform_iterator(boost::counting_iterator<unsigned>(0),
91  WLindexer<PerThrdCont>(wl));
92 }
93 
94 template <typename PerThrdCont>
95 typename TypeFactory<PerThrdCont>::OuterIter make_outer_end(PerThrdCont& wl) {
96  return boost::make_transform_iterator(
97  boost::counting_iterator<unsigned>(wl.numRows()),
98  WLindexer<PerThrdCont>(wl));
99 }
100 
101 template <typename PerThrdCont>
102 typename TypeFactory<PerThrdCont>::RvrsOuterIter
103 make_outer_rbegin(PerThrdCont& wl) {
104  return typename TypeFactory<PerThrdCont>::RvrsOuterIter(make_outer_end(wl));
105 }
106 
107 template <typename PerThrdCont>
108 typename TypeFactory<PerThrdCont>::RvrsOuterIter
109 make_outer_rend(PerThrdCont& wl) {
110  return typename TypeFactory<PerThrdCont>::RvrsOuterIter(make_outer_begin(wl));
111 }
112 
113 #else
114 
115 template <typename PerThrdCont>
116 class OuterPerThreadWLIter
117  : public boost::iterator_facade<OuterPerThreadWLIter<PerThrdCont>,
118  typename PerThrdCont::container_type,
119  boost::random_access_traversal_tag> {
120 
121  using container_type = typename PerThrdCont::container_type;
122  using Diff_ty = ptrdiff_t;
123 
124  friend class boost::iterator_core_access;
125 
126  PerThrdCont* workList;
127  // using Diff_ty due to reverse iterator, whose
128  // end is -1, and, begin is numRows - 1
129  Diff_ty row;
130 
131  void assertInRange() const {
132  assert((row >= 0) && (row < workList->numRows()));
133  }
134 
135  // container_type& getWL() {
136  // assertInRange();
137  // return (*workList)[row];
138  // }
139 
140  container_type& getWL() const {
141  assertInRange();
142  return (*workList)[row];
143  }
144 
145 public:
146  OuterPerThreadWLIter() : workList(NULL), row(0) {}
147 
148  OuterPerThreadWLIter(PerThrdCont& wl, const GlobalPos& pos)
149  : workList(&wl), row(0) {
150 
151  switch (pos) {
152  case GLOBAL_BEGIN:
153  row = 0;
154  break;
155  case GLOBAL_END:
156  row = wl.numRows();
157  break;
158  default:
159  std::abort();
160  }
161  }
162 
163  container_type& dereference(void) const { return getWL(); }
164 
165  // const container_type& dereference (void) const {
166  // getWL ();
167  // }
168 
169  void increment(void) { ++row; }
170 
171  void decrement(void) { --row; }
172 
173  bool equal(const OuterPerThreadWLIter& that) const {
174  assert(this->workList == that.workList);
175  return this->row == that.row;
176  }
177 
178  void advance(ptrdiff_t n) { row += n; }
179 
180  Diff_ty distance_to(const OuterPerThreadWLIter& that) const {
181  assert(this->workList == that.workList);
182  return that.row - this->row;
183  }
184 };
185 
186 template <typename PerThrdCont>
187 OuterPerThreadWLIter<PerThrdCont> make_outer_begin(PerThrdCont& wl) {
188  return OuterPerThreadWLIter<PerThrdCont>(wl, GLOBAL_BEGIN);
189 }
190 
191 template <typename PerThrdCont>
192 OuterPerThreadWLIter<PerThrdCont> make_outer_end(PerThrdCont& wl) {
193  return OuterPerThreadWLIter<PerThrdCont>(wl, GLOBAL_END);
194 }
195 
196 template <typename PerThrdCont>
197 std::reverse_iterator<OuterPerThreadWLIter<PerThrdCont>>
198 make_outer_rbegin(PerThrdCont& wl) {
199  typedef typename std::reverse_iterator<OuterPerThreadWLIter<PerThrdCont>>
200  Ret_ty;
201  return Ret_ty(make_outer_end(wl));
202 }
203 
204 template <typename PerThrdCont>
205 std::reverse_iterator<OuterPerThreadWLIter<PerThrdCont>>
206 make_outer_rend(PerThrdCont& wl) {
207  typedef typename std::reverse_iterator<OuterPerThreadWLIter<PerThrdCont>>
208  Ret_ty;
209  return Ret_ty(make_outer_begin(wl));
210 }
211 
212 #endif
213 
214 } // end namespace
215 
216 template <typename Cont_tp>
218 public:
219  typedef Cont_tp container_type;
221  typedef typename container_type::reference reference;
222  typedef typename container_type::pointer pointer;
223  typedef typename container_type::size_type size_type;
224 
225  typedef typename container_type::iterator local_iterator;
226  typedef typename container_type::const_iterator local_const_iterator;
227  typedef typename container_type::reverse_iterator local_reverse_iterator;
228  typedef typename container_type::const_reverse_iterator
230 
232 
233 #ifdef ADAPTOR_BASED_OUTER_ITER
234  typedef typename TypeFactory<This_ty>::OuterIter OuterIter;
235  typedef typename TypeFactory<This_ty>::RvrsOuterIter RvrsOuterIter;
236 #else
237  typedef OuterPerThreadWLIter<This_ty> OuterIter;
238  typedef typename std::reverse_iterator<OuterIter> RvrsOuterIter;
239 #endif
240  typedef typename galois::ChooseStlTwoLevelIterator<
241  OuterIter, typename container_type::iterator>::type global_iterator;
242  typedef typename galois::ChooseStlTwoLevelIterator<
243  OuterIter, typename container_type::const_iterator>::type
245  typedef typename galois::ChooseStlTwoLevelIterator<
246  RvrsOuterIter, typename container_type::reverse_iterator>::type
248  typedef typename galois::ChooseStlTwoLevelIterator<
249  RvrsOuterIter, typename container_type::const_reverse_iterator>::type
251 
256 
257 private:
258  // XXX: for testing only
259 
260 #if 0
261  struct FakePTS {
262  std::vector<container_type*> v;
263 
264  FakePTS () {
265  v.resize (size ());
266  }
267 
268  container_type** getLocal () const {
269  return getRemote (galois::runtime::LL::getTID ());
270  }
271 
272  container_type** getRemote (size_t i) const {
273  assert (i < v.size ());
274  return const_cast<container_type**> (&v[i]);
275  }
276 
277  size_t size () const { return galois::runtime::LL::getMaxThreads(); }
278 
279  };
280 #endif
281  // typedef FakePTS PerThrdCont_ty;
283  PerThrdCont_ty perThrdCont;
284 
285  void destroy() {
286  for (unsigned i = 0; i < perThrdCont.size(); ++i) {
287  delete *perThrdCont.getRemote(i);
288  *perThrdCont.getRemote(i) = NULL;
289  }
290  }
291 
292 protected:
293  PerThreadContainer() : perThrdCont() {
294  for (unsigned i = 0; i < perThrdCont.size(); ++i) {
295  *perThrdCont.getRemote(i) = NULL;
296  }
297  }
298 
299  template <typename... Args>
300  void init(Args&&... args) {
301  for (unsigned i = 0; i < perThrdCont.size(); ++i) {
302  *perThrdCont.getRemote(i) =
303  new container_type(std::forward<Args>(args)...);
304  }
305  }
306 
309  destroy();
310  }
311 
312 public:
313  unsigned numRows() const { return perThrdCont.size(); }
314 
315  container_type& get() { return **(perThrdCont.getLocal()); }
316 
317  const container_type& get() const { return **(perThrdCont.getLocal()); }
318 
319  container_type& get(unsigned i) { return **(perThrdCont.getRemote(i)); }
320 
321  const container_type& get(unsigned i) const {
322  return **(perThrdCont.getRemote(i));
323  }
324 
325  container_type& operator[](unsigned i) { return get(i); }
326 
327  const container_type& operator[](unsigned i) const { return get(i); }
328 
330  return galois::stl_two_level_begin(make_outer_begin(*this),
331  make_outer_end(*this));
332  }
333 
335  return galois::stl_two_level_end(make_outer_begin(*this),
336  make_outer_end(*this));
337  }
338 
340 
341  global_const_iterator end_all() const { return cend_all(); }
342 
343  // for compatibility with Range.h
345 
346  global_iterator end() { return end_all(); }
347 
348  global_const_iterator begin() const { return begin_all(); }
349 
350  global_const_iterator end() const { return end_all(); }
351 
353 
354  global_const_iterator cend() const { return cend_all(); }
355 
357  return galois::stl_two_level_cbegin(make_outer_begin(*this),
358  make_outer_end(*this));
359  }
360 
362  return galois::stl_two_level_cend(make_outer_begin(*this),
363  make_outer_end(*this));
364  }
365 
367  return galois::stl_two_level_rbegin(make_outer_rbegin(*this),
368  make_outer_rend(*this));
369  }
370 
372  return galois::stl_two_level_rend(make_outer_rbegin(*this),
373  make_outer_rend(*this));
374  }
375 
377 
379 
381  return galois::stl_two_level_crbegin(make_outer_rbegin(*this),
382  make_outer_rend(*this));
383  }
384 
386  return galois::stl_two_level_crend(make_outer_rbegin(*this),
387  make_outer_rend(*this));
388  }
389 
390  local_iterator local_begin() { return get().begin(); }
391  local_iterator local_end() { return get().end(); }
392 
393  // legacy STL
394  local_const_iterator local_begin() const { return get().begin(); }
395  local_const_iterator local_end() const { return get().end(); }
396 
397  local_const_iterator local_cbegin() const { return get().cbegin(); }
398  local_const_iterator local_cend() const { return get().cend(); }
399 
400  local_reverse_iterator local_rbegin() { return get().rbegin(); }
401  local_reverse_iterator local_rend() { return get().rend(); }
402 
403  local_const_reverse_iterator local_crbegin() const { return get().crbegin(); }
404  local_const_reverse_iterator local_crend() const { return get().crend(); }
405 
406  size_type size_all() const {
407  size_type sz = 0;
408 
409  for (unsigned i = 0; i < perThrdCont.size(); ++i) {
410  sz += get(i).size();
411  }
412 
413  return sz;
414  }
415 
416  // XXX: disabling because of per thread memory allocators
417  // void clear_all() {
418  // for (unsigned i = 0; i < perThrdCont.size(); ++i) {
419  // get(i).clear();
420  // }
421  // }
422 
423  void clear_all_parallel(void) {
425  [this](const unsigned, const unsigned) { get().clear(); },
426  std::make_tuple());
427  }
428 
429  bool empty_all() const {
430  bool res = true;
431  for (unsigned i = 0; i < perThrdCont.size(); ++i) {
432  res = res && get(i).empty();
433  }
434 
435  return res;
436  }
437 
438  template <typename Range, typename Ret>
439  void fill_parallel(const Range& range,
440  Ret (container_type::*pushFn)(const value_type&) =
441  &container_type::push_back) {
443  range,
444  [this, pushFn](const typename Range::value_type& v) {
445  container_type& my = get();
446  (my.*pushFn)(v);
447  // (get ().*pushFn)(v);
448  },
449  std::make_tuple());
450  }
451 };
452 
453 template <typename T>
455  : public PerThreadContainer<typename gstl::template Vector<T>> {
456 public:
457  typedef typename gstl::template Pow2Alloc<T> Alloc_ty;
458  typedef typename gstl::template Vector<T> container_type;
459 
460 protected:
462 
464 
465 public:
467 
468  void reserve_all(size_t sz) {
469  size_t numT = galois::getActiveThreads();
470  size_t perT = (sz + numT - 1) / numT; // round up
471 
472  for (unsigned i = 0; i < numT; ++i) {
473  Super_ty::get(i).reserve(perT);
474  }
475  }
476 };
477 
478 template <typename T>
480  : public PerThreadContainer<typename gstl::template Deque<T>> {
481 
482 public:
483  typedef typename gstl::template Pow2Alloc<T> Alloc_ty;
484 
485 protected:
486  typedef typename gstl::template Deque<T> container_type;
488 
490 
491 public:
493 };
494 
495 template <typename T, unsigned ChunkSize = 64>
497  : public PerThreadContainer<galois::gdeque<T, ChunkSize>> {
498 
500 
501 public:
503 };
504 
505 template <typename T>
507  : public PerThreadContainer<typename gstl::template List<T>> {
508 
509 public:
510  typedef typename gstl::template FixedSizeAlloc<T> Alloc_ty;
511 
512 protected:
513  typedef typename gstl::template List<T> container_type;
515 
517 
518 public:
520 };
521 
522 template <typename K, typename V, typename C = std::less<K>>
524  : public PerThreadContainer<typename gstl::template Map<K, V, C>> {
525 
526 public:
527  typedef typename gstl::template Map<K, V, C> container_type;
528  typedef typename gstl::template FixedSizeAlloc<
531 
532 protected:
534 
536 
537 public:
538  explicit PerThreadMap(const C& cmp = C()) : Super_ty(), alloc() {
539  Super_ty::init(cmp, alloc);
540  }
541 
545 
546  // hiding non-const (and const) versions in Super_ty
549 
550  // hiding non-const (and const) versions in Super_ty
552  return Super_ty::crbegin_all();
553  }
555  return Super_ty::crend_all();
556  }
557 };
558 
559 template <typename T, typename C = std::less<T>>
561  : public PerThreadContainer<typename gstl::template Set<T, C>> {
562 
563 public:
564  typedef typename gstl::template FixedSizeAlloc<T> Alloc_ty;
565 
566 protected:
567  typedef typename gstl::template Set<T, C> container_type;
569 
571 
572 public:
573  explicit PerThreadSet(const C& cmp = C()) : Super_ty(), alloc() {
574  Super_ty::init(cmp, alloc);
575  }
576 
580 
581  // hiding non-const (and const) versions in Super_ty
584 
585  // hiding non-const (and const) versions in Super_ty
587  return Super_ty::crbegin_all();
588  }
590  return Super_ty::crend_all();
591  }
592 };
593 
594 template <typename T, typename C = std::less<T>>
596  : public PerThreadContainer<typename gstl::template PQ<T, C>> {
597 
598 public:
599  typedef typename gstl::template Pow2Alloc<T> Alloc_ty;
600 
601 protected:
602  typedef typename gstl::template Vector<T> Vec_ty;
603  typedef typename gstl::template PQ<T, C> container_type;
605 
607 
608 public:
609  explicit PerThreadMinHeap(const C& cmp = C()) : Super_ty(), alloc() {
610  Super_ty::init(cmp, Vec_ty(alloc));
611  }
612 
616 
617  // hiding non-const (and const) versions in Super_ty
620 
621  // hiding non-const (and const) versions in Super_ty
623  return Super_ty::crbegin_all();
624  }
626  return Super_ty::crend_all();
627  }
628 };
629 
630 } // end namespace galois
631 #endif // GALOIS_PERTHREADCONTAINER_H
container_type::reverse_iterator local_reverse_iterator
Definition: PerThreadContainer.h:227
container_type::iterator local_iterator
Definition: PerThreadContainer.h:225
local_iterator local_begin()
Definition: PerThreadContainer.h:390
global_const_reverse_iterator const_reverse_iterator
Definition: PerThreadContainer.h:255
global_const_iterator end_all() const
Definition: PerThreadContainer.h:548
Super_ty::global_const_reverse_iterator global_const_reverse_iterator
Definition: PerThreadContainer.h:579
local_const_iterator local_cbegin() const
Definition: PerThreadContainer.h:397
PerThreadGdeque()
Definition: PerThreadContainer.h:502
Alloc_ty alloc
Definition: PerThreadContainer.h:606
Super_ty::global_const_iterator global_const_iterator
Definition: PerThreadContainer.h:542
Super_ty::global_const_iterator global_const_iterator
Definition: PerThreadContainer.h:577
global_const_iterator cbegin() const
Definition: PerThreadContainer.h:352
internal::StlInnerIsConstIterator< Outer >::type stl_two_level_cend(Outer beg, Outer end)
Definition: TwoLevelIterator.h:780
PerThreadMinHeap(const C &cmp=C())
Definition: PerThreadContainer.h:609
unsigned int getActiveThreads() noexcept
Returns the number of threads in use.
Definition: Threads.cpp:37
PerThreadContainer< container_type > Super_ty
Definition: PerThreadContainer.h:461
gstl::template PQ< T, C > container_type
Definition: PerThreadContainer.h:603
global_iterator end_all()
Definition: PerThreadContainer.h:334
container_type::reference reference
Definition: PerThreadContainer.h:221
Definition: PerThreadContainer.h:479
PerThreadContainer()
Definition: PerThreadContainer.h:293
global_const_reverse_iterator rbegin_all() const
Definition: PerThreadContainer.h:376
global_const_iterator cbegin_all() const
Definition: PerThreadContainer.h:356
TypeFactory< This_ty >::RvrsOuterIter RvrsOuterIter
Definition: PerThreadContainer.h:235
global_iterator iterator
Definition: PerThreadContainer.h:252
global_const_iterator begin_all() const
Definition: PerThreadContainer.h:339
local_iterator local_end()
Definition: PerThreadContainer.h:391
PerThreadContainer< container_type > Super_ty
Definition: PerThreadContainer.h:533
TypeFactory< This_ty >::OuterIter OuterIter
Definition: PerThreadContainer.h:234
Definition: PerThreadContainer.h:496
void reserve_all(size_t sz)
Definition: PerThreadContainer.h:468
internal::StlInnerIsRvrsIterator< Outer >::type stl_two_level_rbegin(Outer beg, Outer end)
Definition: TwoLevelIterator.h:786
galois::ChooseStlTwoLevelIterator< OuterIter, typename container_type::const_iterator >::type global_const_iterator
Definition: PerThreadContainer.h:244
T * getLocal()
Definition: PerThreadStorage.h:128
global_iterator end()
Definition: PerThreadContainer.h:346
container_type & get()
Definition: PerThreadContainer.h:315
global_iterator begin_all()
Definition: PerThreadContainer.h:329
PerThreadDeque()
Definition: PerThreadContainer.h:492
container_type & operator[](unsigned i)
Definition: PerThreadContainer.h:325
gstl::template FixedSizeAlloc< T > Alloc_ty
Definition: PerThreadContainer.h:510
global_reverse_iterator reverse_iterator
Definition: PerThreadContainer.h:254
gstl::template Set< T, C > container_type
Definition: PerThreadContainer.h:567
global_const_iterator end() const
Definition: PerThreadContainer.h:350
global_const_iterator begin_all() const
Definition: PerThreadContainer.h:547
global_const_reverse_iterator rend_all() const
Definition: PerThreadContainer.h:378
gstl::template Pow2Alloc< T > Alloc_ty
Definition: PerThreadContainer.h:457
size_type size_all() const
Definition: PerThreadContainer.h:406
internal::StlInnerIsConstRvrsIterator< Outer >::type stl_two_level_crbegin(Outer beg, Outer end)
Definition: TwoLevelIterator.h:798
Definition: PerThreadContainer.h:506
global_const_reverse_iterator crbegin_all() const
Definition: PerThreadContainer.h:380
unsigned numRows() const
Definition: PerThreadContainer.h:313
void clear_all_parallel(void)
Definition: PerThreadContainer.h:423
gstl::template FixedSizeAlloc< T > Alloc_ty
Definition: PerThreadContainer.h:564
void on_each_gen(FunctionTy &&fn, const TupleTy &tpl)
Definition: Executor_OnEach.h:74
gstl::template Vector< T > Vec_ty
Definition: PerThreadContainer.h:602
PerThreadVector()
Definition: PerThreadContainer.h:466
gstl::template Pow2Alloc< T > Alloc_ty
Definition: PerThreadContainer.h:483
Super_ty::global_const_iterator global_const_iterator
Definition: PerThreadContainer.h:613
local_reverse_iterator local_rbegin()
Definition: PerThreadContainer.h:400
Definition: PerThreadContainer.h:217
bool empty_all() const
Definition: PerThreadContainer.h:429
Alloc_ty alloc
Definition: PerThreadContainer.h:463
s_wl< T, Args...> wl(Args &&...args)
Definition: Traits.h:219
container_type::const_iterator local_const_iterator
Definition: PerThreadContainer.h:226
global_const_reverse_iterator rend_all() const
Definition: PerThreadContainer.h:589
container_type::value_type value_type
Definition: PerThreadContainer.h:220
local_reverse_iterator local_rend()
Definition: PerThreadContainer.h:401
global_const_iterator end_all() const
Definition: PerThreadContainer.h:341
local_const_iterator local_cend() const
Definition: PerThreadContainer.h:398
typename runtime::FixedSizeAllocator< T > FixedSizeAlloc
[define Pow_2_VarSizeAlloc]
Definition: gstl.h:48
gstl::template Vector< T > container_type
Definition: PerThreadContainer.h:458
void do_all_gen(const R &range, F &&func, const ArgsTuple &argsTuple)
Definition: Executor_DoAll.h:530
PerThreadContainer< container_type > Super_ty
Definition: PerThreadContainer.h:514
Alloc_ty alloc
Definition: PerThreadContainer.h:489
gstl::template Map< K, V, C > container_type
Definition: PerThreadContainer.h:527
PerThreadSet(const C &cmp=C())
Definition: PerThreadContainer.h:573
container_type::size_type size_type
Definition: PerThreadContainer.h:223
gstl::template List< T > container_type
Definition: PerThreadContainer.h:513
PerThreadMap(const C &cmp=C())
Definition: PerThreadContainer.h:538
global_iterator begin()
Definition: PerThreadContainer.h:344
local_const_reverse_iterator local_crbegin() const
Definition: PerThreadContainer.h:403
void operator()(void)
Definition: Executor_ParaMeter.h:417
PerThreadContainer This_ty
Definition: PerThreadContainer.h:231
Alloc_ty alloc
Definition: PerThreadContainer.h:516
local_const_reverse_iterator local_crend() const
Definition: PerThreadContainer.h:404
global_const_reverse_iterator rbegin_all() const
Definition: PerThreadContainer.h:622
internal::StlInnerIsConstIterator< Outer >::type stl_two_level_cbegin(Outer beg, Outer end)
Definition: TwoLevelIterator.h:774
~PerThreadContainer()
Definition: PerThreadContainer.h:307
Super_ty::global_const_reverse_iterator global_const_reverse_iterator
Definition: PerThreadContainer.h:544
galois::ChooseStlTwoLevelIterator< RvrsOuterIter, typename container_type::const_reverse_iterator >::type global_const_reverse_iterator
Definition: PerThreadContainer.h:250
gstl::template Pow2Alloc< T > Alloc_ty
Definition: PerThreadContainer.h:599
global_const_reverse_iterator rbegin_all() const
Definition: PerThreadContainer.h:551
unsigned size() const
Definition: PerThreadStorage.h:159
void fill_parallel(const Range &range, Ret(container_type::*pushFn)(const value_type &)=&container_type::push_back)
Definition: PerThreadContainer.h:439
global_reverse_iterator rbegin_all()
Definition: PerThreadContainer.h:366
global_const_iterator begin() const
Definition: PerThreadContainer.h:348
PerThreadList()
Definition: PerThreadContainer.h:519
PerThreadContainer< container_type > Super_ty
Definition: PerThreadContainer.h:568
internal::StlInnerIsConstRvrsIterator< Outer >::type stl_two_level_crend(Outer beg, Outer end)
Definition: TwoLevelIterator.h:804
Super_ty::global_const_reverse_iterator global_const_reverse_iterator
Definition: PerThreadContainer.h:615
Definition: PerThreadContainer.h:560
global_reverse_iterator rend_all()
Definition: PerThreadContainer.h:371
PerThreadContainer< container_type > Super_ty
Definition: PerThreadContainer.h:604
global_const_iterator end_all() const
Definition: PerThreadContainer.h:619
Definition: PerThreadContainer.h:523
Definition: PerThreadContainer.h:454
internal::StlInnerIsIterator< Outer >::type stl_two_level_begin(Outer beg, Outer end)
Definition: TwoLevelIterator.h:762
gstl::template Deque< T > container_type
Definition: PerThreadContainer.h:486
internal::StlInnerIsIterator< Outer >::type stl_two_level_end(Outer beg, Outer end)
Definition: TwoLevelIterator.h:768
gstl::template FixedSizeAlloc< typename container_type::value_type > Alloc_ty
Definition: PerThreadContainer.h:530
global_const_iterator const_iterator
Definition: PerThreadContainer.h:253
const container_type & operator[](unsigned i) const
Definition: PerThreadContainer.h:327
global_const_reverse_iterator rend_all() const
Definition: PerThreadContainer.h:554
global_const_iterator end_all() const
Definition: PerThreadContainer.h:583
container_type::pointer pointer
Definition: PerThreadContainer.h:222
global_const_reverse_iterator crend_all() const
Definition: PerThreadContainer.h:385
T * getRemote(unsigned int thread)
Definition: PerThreadStorage.h:149
global_const_iterator cend_all() const
Definition: PerThreadContainer.h:361
galois::ChooseStlTwoLevelIterator< RvrsOuterIter, typename container_type::reverse_iterator >::type global_reverse_iterator
Definition: PerThreadContainer.h:247
global_const_iterator begin_all() const
Definition: PerThreadContainer.h:618
Type function to select appropriate two-level iterator.
Definition: TwoLevelIterator.h:756
Definition: PerThreadContainer.h:595
T value_type
Definition: Executor_ParaMeter.h:111
galois::ChooseStlTwoLevelIterator< OuterIter, typename container_type::iterator >::type global_iterator
Definition: PerThreadContainer.h:241
global_const_iterator cend() const
Definition: PerThreadContainer.h:354
Cont_tp container_type
Definition: PerThreadContainer.h:219
global_const_iterator begin_all() const
Definition: PerThreadContainer.h:582
Alloc_ty alloc
Definition: PerThreadContainer.h:535
Alloc_ty alloc
Definition: PerThreadContainer.h:570
PerThreadContainer< container_type > Super_ty
Definition: PerThreadContainer.h:487
local_const_iterator local_begin() const
Definition: PerThreadContainer.h:394
local_const_iterator local_end() const
Definition: PerThreadContainer.h:395
global_const_reverse_iterator rbegin_all() const
Definition: PerThreadContainer.h:586
void init(Args &&...args)
Definition: PerThreadContainer.h:300
internal::StlInnerIsRvrsIterator< Outer >::type stl_two_level_rend(Outer beg, Outer end)
Definition: TwoLevelIterator.h:792
global_const_reverse_iterator rend_all() const
Definition: PerThreadContainer.h:625
container_type::const_reverse_iterator local_const_reverse_iterator
Definition: PerThreadContainer.h:229