24 #ifndef __TPIE_PIPELINING_GRAPH_H__
25 #define __TPIE_PIPELINING_GRAPH_H__
36 namespace pipelining {
54 bool is_initiator(
node * s);
58 void add_successor(
node * from,
node * to,
bool push);
60 inline size_t count(
node * s) {
61 for (
size_t i = 0; i < m_nodes.size(); ++i) {
62 if (m_nodes[i] == s)
return 1;
69 void evacuate_all()
const;
71 void assign_memory(memory_size_type m)
const;
73 void print_memory(std::ostream & os)
const;
75 const std::string & get_name()
const;
77 std::string get_unique_id()
const;
82 std::auto_ptr<node_graph> itemFlowGraph;
86 std::auto_ptr<node_graph> actorGraph;
89 std::vector<node *> m_nodes;
91 void assign_minimum_memory()
const;
102 memory_size_type sum_assigned_memory(
double factor)
const;
113 typedef std::vector<phase> phases_t;
114 typedef phases_t::iterator phaseit;
115 typedef std::vector<node *> nodes_t;
116 typedef nodes_t::iterator nodeit;
119 static memory_size_type memory_usage(
size_t phases);
123 const phases_t & phases() {
127 const nodes_t & item_sources() {
128 return m_itemSources;
131 const nodes_t & item_sinks() {
140 std::vector<bool> m_evacuatePrevious;
141 nodes_t m_itemSources;
154 #endif // __TPIE_PIPELINING_GRAPH_H__
Defines the tp_assert macro.
The base class for indicating the progress of some task.
Compute phases and execute pipelining program.
Management of a single pipelining phase.
Generic internal disjoint_sets (union find) implementation.
Predeclarations of some pipelining classes.
For applications where you wish to disable progress indicators via a template parameter, refer to progress_types members names sub, fp and base.
Progress indicator concept in an efficient non-inheritance way.