Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WorkList.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_WORKLIST_WORKLIST_H
21 #define GALOIS_WORKLIST_WORKLIST_H
22 
23 #include "galois/config.h"
24 #include "galois/optional.h"
27 #include "galois/worklists/Chunk.h"
30 #include "galois/worklists/Obim.h"
34 
35 namespace galois {
51 namespace worklists {
52 namespace { // don't pollute the symbol table with the example
53 
54 // Worklists may not be copied.
55 // All classes (should) conform to:
56 template <typename T>
57 class AbstractWorkList {
58  AbstractWorkList(const AbstractWorkList&) = delete;
59  const AbstractWorkList& operator=(const AbstractWorkList&) = delete;
60 
61 public:
62  AbstractWorkList();
63 
66  AbstractWorkList(int, double, char*);
67 
69  typedef T value_type;
70 
72  template <typename _T>
73  using retype = AbstractWorkList<_T>;
74 
76  void push(const value_type& val);
77 
79  template <typename Iter>
80  void push(Iter b, Iter e);
81 
86  template <typename RangeTy>
87  void push_initial(const RangeTy&);
88 
91 
97  bool empty();
98 };
99 
100 } // namespace
101 } // end namespace worklists
102 } // end namespace galois
103 
104 #endif
Galois version of boost::optional.
Definition: optional.h:34
T value_type
Definition: Executor_ParaMeter.h:111