TPIE

2362a60
tpie::pipelining::node Class Reference

Base class of all nodes. More...

#include <tpie/pipelining/node.h>

Inherited by tpie::pipelining::parallel_bits::before< push_type< dest_t >::type >, tpie::pipelining::parallel_bits::consumer< push_type< dest_t >::type >, tpie::pipelining::parallel_bits::consumer< T2 >, tpie::pipelining::bits::sort_output_base< push_type< dest_t >::type, pred_t, store_t >, tpie::pipelining::bits::ami_input_stack_t< dest_t >, tpie::pipelining::bits::ami_input_t< dest_t >, tpie::pipelining::bits::ami_output_t< T >, tpie::pipelining::bits::ami_pull_input_stack_t< T >, tpie::pipelining::bits::buffer_input_t< T >, tpie::pipelining::bits::buffer_output_t< dest_t >, tpie::pipelining::bits::buffer_pull_output_t< T >, tpie::pipelining::bits::chunker_t< dest_t >, tpie::pipelining::bits::count_consecutive_t< dest_t >, tpie::pipelining::bits::dummydest_t< T >, tpie::pipelining::bits::exclude_lambda_t< F >::type< dest_t >, tpie::pipelining::bits::extract_first_t< dest_t >, tpie::pipelining::bits::filter_t< F >::type< dest_t >, tpie::pipelining::bits::fork_t< fact2_t >::type< dest_t >, tpie::pipelining::bits::Forwarder< dest_t >, tpie::pipelining::bits::input_t< dest_t >, tpie::pipelining::bits::input_vector_t< dest_t, T, A >, tpie::pipelining::bits::internal_buffer_input_t< T >, tpie::pipelining::bits::internal_buffer_pull_output_t< T >, tpie::pipelining::bits::internal_reverser_input_t< T >, tpie::pipelining::bits::internal_reverser_output_t< dest_t >, tpie::pipelining::bits::internal_reverser_pull_output_t< T >, tpie::pipelining::bits::item_type_t< T >::type< dest_t >, tpie::pipelining::bits::lambda_t< F >::type< dest_t >, tpie::pipelining::bits::linear_t< dest_t >, tpie::pipelining::bits::map_sink_t< F >, tpie::pipelining::bits::map_t< F >::type< dest_t >, tpie::pipelining::bits::map_temp_t< F >::type< dest_t >, tpie::pipelining::bits::merge_t< fact_t >::type< dest_t >, tpie::pipelining::bits::named_input_t< dest_t >, tpie::pipelining::bits::named_output_t< T >, tpie::pipelining::bits::named_pull_input_t< T >, tpie::pipelining::bits::null_sink_t< T >, tpie::pipelining::bits::ostream_logger_t< dest_t >, tpie::pipelining::bits::output_t< T >, tpie::pipelining::bits::output_vector_t< T, A >, tpie::pipelining::bits::preparer_t< F >::type< dest_t >, tpie::pipelining::bits::printf_ints_t, tpie::pipelining::bits::propagater_t< F >::type< dest_t >, tpie::pipelining::bits::pull_fork_t< source_t, dest_fact_t >, tpie::pipelining::bits::pull_input_iterator_t< IT >, tpie::pipelining::bits::pull_input_t< T >, tpie::pipelining::bits::pull_input_vector_t< T, A >, tpie::pipelining::bits::pull_output_iterator_t< IT >::type< dest_t >, tpie::pipelining::bits::pull_output_t< source_t >, tpie::pipelining::bits::pull_peek_t< source_t >, tpie::pipelining::bits::pull_reverse_input_t< T >, tpie::pipelining::bits::pull_source_t< fact_t >::type< dest_t >, tpie::pipelining::bits::push_input_iterator_t< IT >::type< dest_t >, tpie::pipelining::bits::push_output_iterator_t< Iterator, Item >, tpie::pipelining::bits::push_output_iterator_t< Iterator, void >, tpie::pipelining::bits::range_t< dest_t >, tpie::pipelining::bits::reverser_input_t< T >, tpie::pipelining::bits::reverser_output_t< dest_t >, tpie::pipelining::bits::reverser_pull_output_t< T >, tpie::pipelining::bits::scanf_ints_t< dest_t >, tpie::pipelining::bits::sort_calc_t< T, pred_t, store_t >, tpie::pipelining::bits::sort_input_t< T, pred_t, store_t >, tpie::pipelining::bits::sort_output_base< T, pred_t, store_t >, tpie::pipelining::bits::tee_t< dest_t, T >, tpie::pipelining::bits::unique_t< dest_t, equal_t >, tpie::pipelining::bits::unzip_t< fact2_t >::type< dest1_t >, tpie::pipelining::bits::vfork_node< T >::type< dest_t >, tpie::pipelining::bits::virtrecv< Output >, tpie::pipelining::bits::virtsrc< Input >, tpie::pipelining::bits::visit_t< F >::type< dest_t >, tpie::pipelining::bits::vpush_node< T >, tpie::pipelining::bits::zero_source_t< T >, tpie::pipelining::bits::zip_t< src_fact_t >::type< dest_t >, tpie::pipelining::join< T >::sink_impl, tpie::pipelining::join< T >::source_base, tpie::pipelining::parallel_bits::after_base, tpie::pipelining::parallel_bits::before< T >, tpie::pipelining::parallel_bits::consumer< T >, tpie::pipelining::parallel_bits::producer< T1, T2 >, tpie::pipelining::serialization_bits::buffer_input_t< T >, tpie::pipelining::serialization_bits::buffer_output_t< dest_t >, tpie::pipelining::serialization_bits::buffer_pull_output_t< T >, tpie::pipelining::serialization_bits::input_t< dest_t >, tpie::pipelining::serialization_bits::output_t< T >, tpie::pipelining::serialization_bits::reverser_input_t< T >, tpie::pipelining::serialization_bits::reverser_output_t< dest_t >, tpie::pipelining::serialization_bits::reverser_pull_output_t< T >, tpie::pipelining::serialization_bits::sort_calc_t< Traits >, tpie::pipelining::serialization_bits::sort_input_t< Traits >, tpie::pipelining::serialization_bits::sort_output_base< Traits >, tpie::pipelining::split< T >::sink_impl, tpie::pipelining::split< T >::source_base, tpie::pipelining::bits::virtsrc< Output >, and tpie::pipelining::bits::virtsrc< T >.

Public Types

enum  PLOT { PLOT_SIMPLIFIED_HIDE =1, PLOT_BUFFERED =2, PLOT_PARALLEL =4 }
 Options for how to plot this node. More...
 
enum  STATE {
  STATE_FRESH, STATE_IN_PREPARE, STATE_AFTER_PREPARE, STATE_IN_PROPAGATE,
  STATE_AFTER_PROPAGATE, STATE_IN_BEGIN, STATE_AFTER_BEGIN, STATE_IN_GO,
  STATE_IN_END, STATE_AFTER_END
}
 Used internally to check order of method calls. More...
 
typedef boost::optional
< any_noncopyable & > 
maybeany_t
 

Public Member Functions

virtual ~node ()
 Virtual dtor. More...
 
memory_size_type get_minimum_resource_usage (resource_type type) const
 Get the minimum amount of the resource declared by this node. More...
 
memory_size_type get_maximum_resource_usage (resource_type type) const
 Get the maximum amount of the resource declared by this node. More...
 
double get_resource_fraction (resource_type type) const
 Get the priority for the specific resource of this node. More...
 
memory_size_type get_available_of_resource (resource_type type) const
 Get the amount of the specific resource assigned to this node. More...
 
void set_minimum_resource_usage (resource_type type, memory_size_type usage)
 Called by implementers to declare minimum resource requirements. More...
 
void set_maximum_resource_usage (resource_type type, memory_size_type usage)
 Called by implementers to declare maximum resource requirements. More...
 
void set_resource_fraction (resource_type type, double f)
 Set the resource priority of this node. More...
 
virtual void resource_available_changed (resource_type, memory_size_type)
 Called by the resource manager to notify the node's available amount of resource has changed. More...
 
void _internal_set_available_of_resource (resource_type type, memory_size_type available)
 Used internally to assign the available resource to the node. More...
 
memory_size_type get_minimum_memory () const
 Get the minimum amount of memory declared by this node. More...
 
memory_size_type get_maximum_memory () const
 Get the maximum amount of memory declared by this node. More...
 
double get_memory_fraction () const
 Get the memory priority of this node. More...
 
memory_size_type get_available_memory () const
 Get the amount of memory assigned to this node. More...
 
void set_minimum_memory (memory_size_type minimumMemory)
 Called by implementers to declare minimum memory requirements. More...
 
void set_maximum_memory (memory_size_type maximumMemory)
 Called by implementers to declare maximum memory requirements. More...
 
void set_memory_fraction (double f)
 Set the memory priority of this node. More...
 
virtual void set_available_memory (memory_size_type availableMemory)
 Called by the memory manager to set the amount of memory assigned to this node. More...
 
memory_size_type get_used_memory () const
 Get the amount of memory currently used by this node. More...
 
bits::node_map::ptr get_node_map () const
 Get the local node map, mapping node IDs to node pointers for all the nodes reachable from this one. More...
 
node_token::id_t get_id () const
 Get the internal node ID of this node (mainly for debugging purposes). More...
 
virtual void prepare ()
 Called before memory assignment but after depending phases have executed and ended. More...
 
virtual void propagate ()
 Propagate stream metadata. More...
 
virtual void begin ()
 Begin pipeline processing phase. More...
 
virtual bool is_go_free () const
 
virtual void go ()
 For initiator nodes, execute this phase by pushing all items to be pushed. More...
 
virtual void end ()
 End pipeline processing phase. More...
 
virtual bool can_evacuate ()
 Overridden by nodes that have data to evacuate. More...
 
virtual void evacuate ()
 Overridden by nodes that have data to evacuate. More...
 
priority_type get_name_priority ()
 Get the priority of this node's name. More...
 
const std::string & get_name ()
 Get this node's name. More...
 
void set_name (const std::string &name, priority_type priority=PRIORITY_USER)
 Set this node's name. More...
 
priority_type get_phase_name_priority ()
 Get the priority of this node's pdane name. More...
 
const std::string & get_phase_name ()
 Get this node's phase name. More...
 
void set_phase_name (const std::string &name, priority_type priority=PRIORITY_USER)
 Set this node's phase name. More...
 
void set_breadcrumb (const std::string &breadcrumb)
 Used internally when a pair_factory has a name set. More...
 
stream_size_type get_steps ()
 Used internally for progress indication. More...
 
stream_size_type get_steps_left ()
 
void set_progress_indicator (progress_indicator_base *pi)
 Used internally. Set the progress indicator to use. More...
 
progress_indicator_baseget_progress_indicator ()
 Used internally. Get the progress indicator used. More...
 
STATE get_state () const
 Used internally to check order of method calls. More...
 
void set_state (STATE s)
 Used internally to check order of method calls. More...
 
resource_type get_resource_being_assigned () const
 Used internally to check order of method calls. More...
 
void set_resource_being_assigned (resource_type type)
 Used internally to check order of method calls. More...
 
flags< PLOTget_plot_options () const
 Get options specified for plot(), as a combination of node::PLOT values. More...
 
void set_plot_options (flags< PLOT > options)
 Set options specified for plot(), as a combination of node::PLOT values. More...
 
void add_push_destination (const node_token &dest)
 Called by implementers to declare a push destination. More...
 
void add_push_destination (const node &dest)
 Called by implementers to declare a push destination. More...
 
void add_pull_source (const node_token &dest)
 Called by implementers to declare a pull source. More...
 
void add_pull_source (const node &dest)
 Called by implementers to declare a pull source. More...
 
void add_dependency (const node_token &dest)
 Called by implementers to declare a node dependency, that is, a requirement that another node has end() called before the begin() of this node. More...
 
void add_dependency (const node &dest)
 Called by implementers to declare a node dependency, that is, a requirement that another node has end() called before the begin() of this node. More...
 
void add_memory_share_dependency (const node_token &dest)
 Called by implementers to declare a node memory share dependency, that is, a requirement that another node has end() called before the begin() of this node, and memory shared between end() and begin() unless evacuate() is called. More...
 
void add_memory_share_dependency (const node &dest)
 Called by implementers to declare a node memory share dependency, that is, a requirement that another node has end() called before the begin() of this node, and memory shared between end() and begin() unless evacuate() is called. More...
 
template<typename T >
void forward (std::string key, T value, memory_size_type k=std::numeric_limits< memory_size_type >::max())
 Called by implementers to forward auxiliary data to successors. More...
 
void forward_any (std::string key, any_noncopyable value, memory_size_type k=std::numeric_limits< memory_size_type >::max())
 See node::forward. More...
 
bool can_fetch (std::string key)
 Find out if there is a piece of auxiliary data forwarded with a given name. More...
 
maybeany_t fetch_maybe (std::string key)
 Fetch piece of auxiliary data as any_noncopyable (the internal representation) wrapped in a boost::optional which is unitialized if the key is not found. More...
 
any_noncopyablefetch_any (std::string key)
 Fetch piece of auxiliary data as any_noncopyable (the internal representation). More...
 
template<typename T >
T & fetch (std::string key)
 Fetch piece of auxiliary data, expecting a given value type. More...
 
void no_forward_through ()
 Dissablow forwards through this node. More...
 
const node_tokenget_token () const
 Get the node_token that maps this node's ID to a pointer to this. More...
 
void set_steps (stream_size_type steps)
 Called by implementers that intend to call step(). More...
 
void step (stream_size_type steps=1)
 Step the progress indicator. More...
 
progress_indicator_baseproxy_progress_indicator ()
 Get a non-initialized progress indicator for use with external implementations. More...
 
bool can_pull () const
 For pull nodes, return true if there are more items to be pulled. More...
 
item_type pull ()
 For pull nodes, pull the next item from this node. More...
 
void push (const item_type &item)
 For push nodes, push the next item to this node. More...
 
void register_datastructure_usage (const std::string &name, double priority=1)
 Registers a datastructure. More...
 
void set_datastructure_memory_limits (const std::string &name, memory_size_type min, memory_size_type max=std::numeric_limits< memory_size_type >::max())
 Assign memory to a registered datastructure. More...
 
memory_size_type get_datastructure_memory (const std::string &name)
 Returns the memory assigned to a datastructure. More...
 
template<typename T >
void set_datastructure (const std::string &name, T datastructure)
 Returns a previously declared datastructure. More...
 
template<typename T >
T & get_datastructure (const std::string &name)
 Returns a previously declared datastructure. More...
 
void unset_datastructure (const std::string &name)
 
size_t buckets () const
 Count the number of memory buckets. More...
 
std::unique_ptr< memory_bucket > & bucket (size_t i)
 Access a memory bucket. More...
 
tpie::memory_bucket_ref allocator (size_t i=0)
 Return an allocator that counts memory usage within the node. More...
 

Protected Member Functions

 node ()
 Default constructor, using a new node_token. More...
 
 node (const node &other)=delete
 Copy constructor. More...
 
nodeoperator= (const node &other)=delete
 
 node (node &&other)
 Move constructor. More...
 
nodeoperator= (node &&other)
 
 node (const node_token &token)
 Constructor using a given fresh node_token. More...
 

Friends

class bits::memory_runtime
 
class bits::datastructure_runtime
 
class factory_base
 
class bits::pipeline_base
 
class bits::proxy_progress_indicator
 

Detailed Description

Base class of all nodes.

A node should inherit from the node class, have a single template parameter dest_t if it is not a terminus node, and implement methods begin(), push() and end(), if it is not a source node.

Definition at line 78 of file node.h.

Member Enumeration Documentation

Options for how to plot this node.

Definition at line 85 of file node.h.

85  {
86  PLOT_SIMPLIFIED_HIDE=1,
87  PLOT_BUFFERED=2,
88  PLOT_PARALLEL=4
89  };

Used internally to check order of method calls.

Definition at line 94 of file node.h.

94  {
95  STATE_FRESH,
96  STATE_IN_PREPARE,
97  STATE_AFTER_PREPARE,
98  STATE_IN_PROPAGATE,
99  STATE_AFTER_PROPAGATE,
100  STATE_IN_BEGIN,
101  STATE_AFTER_BEGIN,
102  STATE_IN_GO,
103  STATE_IN_END,
104  STATE_AFTER_END
105  };

Constructor & Destructor Documentation

virtual tpie::pipelining::node::~node ( )
inlinevirtual

Virtual dtor.

Definition at line 110 of file node.h.

110 {}
tpie::pipelining::node::node ( )
protected

Default constructor, using a new node_token.

tpie::pipelining::node::node ( const node other)
protecteddelete

Copy constructor.

tpie::pipelining::node::node ( node &&  other)
protected

Move constructor.

We need to define this explicitly since the node_token needs to know its new owner.

tpie::pipelining::node::node ( const node_token token)
protected

Constructor using a given fresh node_token.

Member Function Documentation

void tpie::pipelining::node::_internal_set_available_of_resource ( resource_type  type,
memory_size_type  available 
)

Used internally to assign the available resource to the node.

void tpie::pipelining::node::add_dependency ( const node_token dest)

Called by implementers to declare a node dependency, that is, a requirement that another node has end() called before the begin() of this node.

void tpie::pipelining::node::add_dependency ( const node dest)

Called by implementers to declare a node dependency, that is, a requirement that another node has end() called before the begin() of this node.

void tpie::pipelining::node::add_memory_share_dependency ( const node_token dest)

Called by implementers to declare a node memory share dependency, that is, a requirement that another node has end() called before the begin() of this node, and memory shared between end() and begin() unless evacuate() is called.

void tpie::pipelining::node::add_memory_share_dependency ( const node dest)

Called by implementers to declare a node memory share dependency, that is, a requirement that another node has end() called before the begin() of this node, and memory shared between end() and begin() unless evacuate() is called.

void tpie::pipelining::node::add_pull_source ( const node_token dest)

Called by implementers to declare a pull source.

Referenced by tpie::pipelining::factory_base::add_default_edge().

void tpie::pipelining::node::add_pull_source ( const node dest)

Called by implementers to declare a pull source.

void tpie::pipelining::node::add_push_destination ( const node_token dest)

Called by implementers to declare a push destination.

Referenced by tpie::pipelining::factory_base::add_default_edge(), and tpie::pipelining::parallel_bits::after< T >::set_consumer().

void tpie::pipelining::node::add_push_destination ( const node dest)

Called by implementers to declare a push destination.

tpie::memory_bucket_ref tpie::pipelining::node::allocator ( size_t  i = 0)
inline

Return an allocator that counts memory usage within the node.

Definition at line 788 of file node.h.

References bucket().

788  {
789  return tpie::memory_bucket_ref(bucket(i).get());
790  }
Class storring a reference to a memory bucket.
Definition: memory.h:366
std::unique_ptr< memory_bucket > & bucket(size_t i)
Access a memory bucket.
Definition: node.h:779
virtual void tpie::pipelining::node::begin ( )
inlinevirtual

Begin pipeline processing phase.

The implementation may pull() from a pull destination in begin(), and it may push() to a push destination.

The pipelining framework calls begin() on the nodes in the actor graph in a reverse topological order. The framework calls node::begin() on a node after calling begin() on its pull and push destinations.

The default implementation does nothing.

Reimplemented in tpie::pipelining::parallel_bits::producer< T1, T2 >, tpie::pipelining::parallel_bits::before< T >, tpie::pipelining::parallel_bits::before< push_type< dest_t >::type >, tpie::pipelining::bits::unique_t< dest_t, equal_t >, tpie::pipelining::bits::sort_input_t< T, pred_t, store_t >, tpie::pipelining::serialization_bits::sort_input_t< Traits >, tpie::pipelining::bits::named_output_t< T >, tpie::pipelining::serialization_bits::buffer_input_t< T >, tpie::pipelining::bits::sort_calc_t< T, pred_t, store_t >, tpie::pipelining::serialization_bits::sort_calc_t< Traits >, tpie::pipelining::bits::sort_output_t< pred_t, dest_t, store_t >, tpie::pipelining::bits::virtrecv< Output >, tpie::pipelining::serialization_bits::reverser_input_t< T >, tpie::pipelining::bits::sort_pull_output_t< T, pred_t, store_t >, tpie::pipelining::join< T >::sink_impl, tpie::pipelining::bits::buffer_input_t< T >, tpie::pipelining::bits::pull_peek_t< source_t >, tpie::pipelining::serialization_bits::sort_output_base< Traits >, tpie::pipelining::bits::pull_input_vector_t< T, A >, tpie::pipelining::bits::chunker_t< dest_t >, tpie::pipelining::bits::reverser_input_t< T >, tpie::pipelining::bits::ostream_logger_t< dest_t >, and tpie::pipelining::bits::ami_input_t< dest_t >.

Definition at line 299 of file node.h.

Referenced by tpie::pipelining::bits::ostream_logger_t< dest_t >::begin(), tpie::pipelining::bits::virtrecv< Output >::begin(), and tpie::pipelining::parallel_bits::before< push_type< dest_t >::type >::begin().

299  {
300  }
std::unique_ptr<memory_bucket>& tpie::pipelining::node::bucket ( size_t  i)
inline

Access a memory bucket.

Definition at line 779 of file node.h.

Referenced by allocator().

779  {
780  if (m_buckets.size() <= i) m_buckets.resize(i+1);
781  if (!m_buckets[i]) m_buckets[i].reset(new memory_bucket());
782  return m_buckets[i];
783  }
size_t tpie::pipelining::node::buckets ( ) const
inline

Count the number of memory buckets.

Definition at line 774 of file node.h.

774 {return m_buckets.size();}
virtual bool tpie::pipelining::node::can_evacuate ( )
inlinevirtual
bool tpie::pipelining::node::can_fetch ( std::string  key)
inline

Find out if there is a piece of auxiliary data forwarded with a given name.

Definition at line 589 of file node.h.

References fetch_maybe().

Referenced by tpie::pipelining::bits::sort_input_t< T, pred_t, store_t >::propagate().

589  {
590  return bool(fetch_maybe(key));
591  }
maybeany_t fetch_maybe(std::string key)
Fetch piece of auxiliary data as any_noncopyable (the internal representation) wrapped in a boost::op...
bool tpie::pipelining::node::can_pull ( ) const
inline

For pull nodes, return true if there are more items to be pulled.

virtual void tpie::pipelining::node::end ( )
inlinevirtual

End pipeline processing phase.

The implementation may pull() from a pull destination in end(), and it may push() to a push destination.

The pipelining framework calls end() on the nodes in the pipeline graph in a topological order. The framework calls node::end() on a node before its pull and push destinations.

The default implementation does nothing, so it does not matter if the implementation calls the parent end().

Reimplemented in tpie::pipelining::parallel_bits::producer< T1, T2 >, tpie::pipelining::parallel_bits::after< T >, tpie::pipelining::serialization_bits::buffer_pull_output_t< T >, tpie::pipelining::bits::sort_input_t< T, pred_t, store_t >, tpie::pipelining::serialization_bits::buffer_output_t< dest_t >, tpie::pipelining::serialization_bits::sort_input_t< Traits >, tpie::pipelining::bits::named_output_t< T >, tpie::pipelining::serialization_bits::buffer_input_t< T >, tpie::pipelining::bits::internal_reverser_pull_output_t< T >, tpie::pipelining::bits::sort_calc_t< T, pred_t, store_t >, tpie::pipelining::serialization_bits::reverser_pull_output_t< T >, tpie::pipelining::serialization_bits::sort_calc_t< Traits >, tpie::pipelining::bits::named_pull_input_t< T >, tpie::pipelining::bits::reverser_pull_output_t< T >, tpie::pipelining::serialization_bits::reverser_output_t< dest_t >, tpie::pipelining::bits::sort_output_t< pred_t, dest_t, store_t >, tpie::pipelining::bits::pull_reverse_input_t< T >, tpie::pipelining::bits::internal_reverser_output_t< dest_t >, tpie::pipelining::bits::pull_input_t< T >, tpie::pipelining::serialization_bits::reverser_input_t< T >, tpie::pipelining::bits::buffer_output_t< dest_t >, tpie::pipelining::bits::sort_pull_output_t< T, pred_t, store_t >, tpie::pipelining::bits::reverser_output_t< dest_t >, tpie::pipelining::bits::buffer_input_t< T >, tpie::pipelining::serialization_bits::sort_output_base< Traits >, tpie::pipelining::bits::input_t< dest_t >, tpie::pipelining::bits::buffer_pull_output_t< T >, tpie::pipelining::bits::chunker_t< dest_t >, tpie::pipelining::bits::internal_buffer_pull_output_t< T >, tpie::pipelining::bits::reverser_input_t< T >, tpie::pipelining::bits::ostream_logger_t< dest_t >, and tpie::pipelining::bits::count_consecutive_t< dest_t >.

Definition at line 329 of file node.h.

Referenced by tpie::pipelining::bits::count_consecutive_t< dest_t >::end(), tpie::pipelining::bits::ostream_logger_t< dest_t >::end(), and tpie::pipelining::bits::sort_input_t< T, pred_t, store_t >::end().

329  {
330  }
virtual void tpie::pipelining::node::evacuate ( )
inlinevirtual
template<typename T >
T& tpie::pipelining::node::fetch ( std::string  key)
inline

Fetch piece of auxiliary data, expecting a given value type.

Definition at line 610 of file node.h.

References fetch_any().

610  {
611  any_noncopyable &item = fetch_any(key);
612  try {
613  return any_cast<T>(item);
614  } catch (bad_any_noncopyable_cast m) {
615  std::stringstream ss;
616  ss << "Trying to fetch key '" << key << "' of type "
617  << typeid(T).name() << " but forwarded data was of type "
618  << item.type().name() << ". Message was: " << m.what();
619  throw invalid_argument_exception(ss.str());
620  }
621  }
any_noncopyable & fetch_any(std::string key)
Fetch piece of auxiliary data as any_noncopyable (the internal representation).
any_noncopyable& tpie::pipelining::node::fetch_any ( std::string  key)

Fetch piece of auxiliary data as any_noncopyable (the internal representation).

Referenced by fetch().

maybeany_t tpie::pipelining::node::fetch_maybe ( std::string  key)

Fetch piece of auxiliary data as any_noncopyable (the internal representation) wrapped in a boost::optional which is unitialized if the key is not found.

Referenced by can_fetch().

template<typename T >
void tpie::pipelining::node::forward ( std::string  key,
value,
memory_size_type  k = std::numeric_limits<memory_size_type>::max() 
)
inline

Called by implementers to forward auxiliary data to successors.

If explicitForward is false, the data will not override data forwarded with explicitForward == true.

Parameters
keyThe key of forwarded data
valueThe value of forwarded data
kThe maximum distance to forward the distance. If there are more than k nodes between the forwarding nodes and another node b. b will not be able to fetch the data. Defaults to infinity.

Definition at line 564 of file node.h.

References forward_any().

Referenced by tpie::pipelining::bits::reverser_input_t< T >::end(), tpie::pipelining::bits::buffer_input_t< T >::end(), tpie::pipelining::bits::ami_input_t< dest_t >::propagate(), tpie::pipelining::bits::input_vector_t< dest_t, T, A >::propagate(), tpie::pipelining::bits::buffer_pull_output_t< T >::propagate(), tpie::pipelining::bits::range_t< dest_t >::propagate(), tpie::pipelining::bits::sort_output_base< push_type< dest_t >::type, pred_t, store_t >::propagate(), tpie::pipelining::bits::ami_input_stack_t< dest_t >::propagate(), tpie::pipelining::serialization_bits::sort_output_base< Traits >::propagate(), tpie::pipelining::bits::pull_input_vector_t< T, A >::propagate(), tpie::pipelining::bits::internal_buffer_input_t< T >::propagate(), tpie::pipelining::bits::internal_reverser_input_t< T >::propagate(), tpie::pipelining::bits::ami_pull_input_stack_t< T >::propagate(), tpie::pipelining::bits::reverser_output_t< dest_t >::propagate(), tpie::pipelining::bits::buffer_output_t< dest_t >::propagate(), tpie::pipelining::bits::internal_reverser_output_t< dest_t >::propagate(), tpie::pipelining::bits::reverser_pull_output_t< T >::propagate(), and tpie::pipelining::bits::internal_reverser_pull_output_t< T >::propagate().

564  {
565  forward_any(key, any_noncopyable(std::move(value)), k);
566  }
void forward_any(std::string key, any_noncopyable value, memory_size_type k=std::numeric_limits< memory_size_type >::max())
See node::forward.
void tpie::pipelining::node::forward_any ( std::string  key,
any_noncopyable  value,
memory_size_type  k = std::numeric_limits< memory_size_type >::max() 
)
memory_size_type tpie::pipelining::node::get_available_memory ( ) const
inline

Get the amount of memory assigned to this node.

Definition at line 200 of file node.h.

References get_available_of_resource().

200  {
201  return get_available_of_resource(MEMORY);
202  }
memory_size_type get_available_of_resource(resource_type type) const
Get the amount of the specific resource assigned to this node.
Definition: node.h:138
memory_size_type tpie::pipelining::node::get_available_of_resource ( resource_type  type) const
inline

Get the amount of the specific resource assigned to this node.

Definition at line 138 of file node.h.

Referenced by get_available_memory().

138  {
139  return m_parameters.resource_parameters[type].available;
140  }
template<typename T >
T& tpie::pipelining::node::get_datastructure ( const std::string &  name)
inline

Returns a previously declared datastructure.

Parameters
namethe name of the datastructure
Template Parameters
thetype of the datastructure

Definition at line 738 of file node.h.

References get_node_map().

738  {
739  bits::node_map::datastructuremap_t & structures = get_node_map()->find_authority()->get_datastructures();
740  bits::node_map::datastructuremap_t::iterator i = structures.find(name);
741 
742  if(i == structures.end())
743  throw tpie::exception("attempted to get non-registered datastructure");
744 
745  return any_cast<T>(i->second.second);
746  }
bits::node_map::ptr get_node_map() const
Get the local node map, mapping node IDs to node pointers for all the nodes reachable from this one...
Definition: node.h:251
memory_size_type tpie::pipelining::node::get_datastructure_memory ( const std::string &  name)

Returns the memory assigned to a datastructure.

Parameters
namethe name of the datastructure
node_token::id_t tpie::pipelining::node::get_id ( ) const
inline

Get the internal node ID of this node (mainly for debugging purposes).

Definition at line 259 of file node.h.

Referenced by tpie::pipelining::factory_base::add_default_edge().

259  {
260  return token.id();
261  }
memory_size_type tpie::pipelining::node::get_maximum_memory ( ) const
inline

Get the maximum amount of memory declared by this node.

Defaults to maxint when no maximum has been set.

Definition at line 186 of file node.h.

References get_maximum_resource_usage().

186  {
187  return get_maximum_resource_usage(MEMORY);
188  }
memory_size_type get_maximum_resource_usage(resource_type type) const
Get the maximum amount of the resource declared by this node.
Definition: node.h:124
memory_size_type tpie::pipelining::node::get_maximum_resource_usage ( resource_type  type) const
inline

Get the maximum amount of the resource declared by this node.

Defaults to maxint when no maximum has been set.

Definition at line 124 of file node.h.

Referenced by get_maximum_memory().

124  {
125  return m_parameters.resource_parameters[type].maximum;
126  }
double tpie::pipelining::node::get_memory_fraction ( ) const
inline

Get the memory priority of this node.

Definition at line 193 of file node.h.

References get_resource_fraction().

193  {
194  return get_resource_fraction(MEMORY);
195  }
double get_resource_fraction(resource_type type) const
Get the priority for the specific resource of this node.
Definition: node.h:131
memory_size_type tpie::pipelining::node::get_minimum_memory ( ) const
inline

Get the minimum amount of memory declared by this node.

Defaults to zero when no minimum has been set.

Definition at line 178 of file node.h.

References get_minimum_resource_usage().

178  {
179  return get_minimum_resource_usage(MEMORY);
180  }
memory_size_type get_minimum_resource_usage(resource_type type) const
Get the minimum amount of the resource declared by this node.
Definition: node.h:116
memory_size_type tpie::pipelining::node::get_minimum_resource_usage ( resource_type  type) const
inline

Get the minimum amount of the resource declared by this node.

Defaults to zero when no minimum has been set.

Definition at line 116 of file node.h.

Referenced by get_minimum_memory().

116  {
117  return m_parameters.resource_parameters[type].minimum;
118  }
const std::string& tpie::pipelining::node::get_name ( )

Get this node's name.

For purposes of pipeline debugging and phase naming for progress indicator breadcrumbs.

priority_type tpie::pipelining::node::get_name_priority ( )
inline

Get the priority of this node's name.

For purposes of pipeline debugging and phase naming for progress indicator breadcrumbs.

Definition at line 349 of file node.h.

349  {
350  return m_parameters.namePriority;
351  }
bits::node_map::ptr tpie::pipelining::node::get_node_map ( ) const
inline

Get the local node map, mapping node IDs to node pointers for all the nodes reachable from this one.

Definition at line 251 of file node.h.

Referenced by tpie::pipelining::factory_base::add_default_edge(), get_datastructure(), tpie::pipelining::virtual_chunk_end< Input >::operator=(), tpie::pipelining::virtual_chunk< Input, Output >::operator=(), tpie::pipelining::virtual_chunk_begin< Output >::operator=(), and set_datastructure().

251  {
252  return token.get_map();
253  }
const std::string& tpie::pipelining::node::get_phase_name ( )

Get this node's phase name.

For purposes of pipeline debugging and phase naming for progress indicator breadcrumbs.

priority_type tpie::pipelining::node::get_phase_name_priority ( )
inline

Get the priority of this node's pdane name.

For purposes of pipeline debugging and phase naming for progress indicator breadcrumbs.

Definition at line 369 of file node.h.

369  {
370  return m_parameters.phaseNamePriority;
371  }
flags<PLOT> tpie::pipelining::node::get_plot_options ( ) const
inline

Get options specified for plot(), as a combination of node::PLOT values.

Definition at line 451 of file node.h.

451  {
452  return m_plotOptions;
453  }
progress_indicator_base* tpie::pipelining::node::get_progress_indicator ( )
inline

Used internally. Get the progress indicator used.

Definition at line 415 of file node.h.

415  {
416  return m_pi;
417  }
resource_type tpie::pipelining::node::get_resource_being_assigned ( ) const
inline

Used internally to check order of method calls.

Definition at line 436 of file node.h.

436  {
437  return m_resourceBeingAssigned;
438  }
double tpie::pipelining::node::get_resource_fraction ( resource_type  type) const
inline

Get the priority for the specific resource of this node.

Definition at line 131 of file node.h.

Referenced by get_memory_fraction().

131  {
132  return m_parameters.resource_parameters[type].fraction;
133  }
STATE tpie::pipelining::node::get_state ( ) const
inline

Used internally to check order of method calls.

Definition at line 422 of file node.h.

Referenced by step().

422  {
423  return m_state;
424  }
stream_size_type tpie::pipelining::node::get_steps ( )
inline

Used internally for progress indication.

Get the number of times the node expects to call step() at most.

Definition at line 397 of file node.h.

397  {
398  return m_parameters.stepsTotal;
399  }
const node_token& tpie::pipelining::node::get_token ( ) const
inline

Get the node_token that maps this node's ID to a pointer to this.

Definition at line 632 of file node.h.

Referenced by tpie::pipelining::factory_base::add_default_edge().

632  {
633  return token;
634  }
memory_size_type tpie::pipelining::node::get_used_memory ( ) const
inline

Get the amount of memory currently used by this node.

Definition at line 240 of file node.h.

240  {
241  memory_size_type ans=0;
242  for (const auto & p: m_buckets)
243  if (p) ans += p->count;
244  return ans;
245  }
virtual void tpie::pipelining::node::go ( )
inlinevirtual

For initiator nodes, execute this phase by pushing all items to be pushed.

For non-initiator nodes, the default implementation throws a not_initiator_node exception.

Reimplemented in tpie::pipelining::bits::pull_source_t< fact_t >::type< dest_t >, tpie::pipelining::serialization_bits::buffer_output_t< dest_t >, tpie::pipelining::bits::pull_output_t< source_t >, tpie::pipelining::bits::pull_output_iterator_t< IT >::type< dest_t >, tpie::pipelining::bits::sort_calc_t< T, pred_t, store_t >, tpie::pipelining::serialization_bits::sort_calc_t< Traits >, tpie::pipelining::bits::push_input_iterator_t< IT >::type< dest_t >, tpie::pipelining::serialization_bits::reverser_output_t< dest_t >, tpie::pipelining::bits::sort_output_t< pred_t, dest_t, store_t >, tpie::pipelining::serialization_bits::sort_output_t< Traits, dest_t >, tpie::pipelining::bits::internal_reverser_output_t< dest_t >, tpie::pipelining::bits::sort_pull_output_t< T, pred_t, store_t >, tpie::pipelining::serialization_bits::sort_pull_output_t< Traits >, tpie::pipelining::bits::buffer_output_t< dest_t >, tpie::pipelining::bits::reverser_output_t< dest_t >, tpie::pipelining::bits::named_input_t< dest_t >, tpie::pipelining::bits::ami_input_stack_t< dest_t >, tpie::pipelining::bits::input_t< dest_t >, tpie::pipelining::bits::range_t< dest_t >, tpie::pipelining::serialization_bits::input_t< dest_t >, tpie::pipelining::bits::input_vector_t< dest_t, T, A >, tpie::pipelining::bits::ami_input_t< dest_t >, and tpie::pipelining::bits::scanf_ints_t< dest_t >.

Definition at line 309 of file node.h.

References tpie::log_warning().

309  {
310  log_warning() << "node subclass " << typeid(*this).name()
311  << " is not an initiator node" << std::endl;
312  throw not_initiator_node();
313  }
logstream & log_warning()
Return logstream for writing warning log messages.
Definition: tpie_log.h:157
void tpie::pipelining::node::no_forward_through ( )

Dissablow forwards through this node.

virtual void tpie::pipelining::node::prepare ( )
inlinevirtual

Called before memory assignment but after depending phases have executed and ended.

The implementer may use fetch and forward in this phase. The implementer does not have to call the super prepare-method; its default implementation is empty.

Reimplemented in tpie::pipelining::bits::preparer_t< F >::type< dest_t >, tpie::pipelining::join< T >::source_impl< dest_t >, tpie::pipelining::split< T >::source_impl< dest_t >, and tpie::pipelining::bits::Forwarder< dest_t >.

Definition at line 269 of file node.h.

269  {
270  }
virtual void tpie::pipelining::node::propagate ( )
inlinevirtual

Propagate stream metadata.

The implementation may fetch() and forward() metadata such as number of items or the size of a single item.

The pipelining framework calls propagate() on the nodes in the item flow graph in a topological order.

The default implementation does nothing.

Reimplemented in tpie::pipelining::bits::pull_source_t< fact_t >::type< dest_t >, tpie::pipelining::serialization_bits::buffer_pull_output_t< T >, tpie::pipelining::bits::sort_input_t< T, pred_t, store_t >, tpie::pipelining::bits::propagater_t< F >::type< dest_t >, tpie::pipelining::serialization_bits::buffer_output_t< dest_t >, tpie::pipelining::serialization_bits::sort_input_t< Traits >, tpie::pipelining::serialization_bits::buffer_input_t< T >, tpie::pipelining::bits::sort_calc_t< T, pred_t, store_t >, tpie::pipelining::bits::internal_reverser_pull_output_t< T >, tpie::pipelining::serialization_bits::reverser_pull_output_t< T >, tpie::pipelining::serialization_bits::sort_calc_t< Traits >, tpie::pipelining::bits::named_pull_input_t< T >, tpie::pipelining::bits::reverser_pull_output_t< T >, tpie::pipelining::serialization_bits::reverser_output_t< dest_t >, tpie::pipelining::bits::pull_reverse_input_t< T >, tpie::pipelining::bits::internal_reverser_output_t< dest_t >, tpie::pipelining::serialization_bits::reverser_input_t< T >, tpie::pipelining::bits::pull_input_t< T >, tpie::pipelining::bits::buffer_output_t< dest_t >, tpie::pipelining::bits::reverser_output_t< dest_t >, tpie::pipelining::bits::named_input_t< dest_t >, tpie::pipelining::bits::ami_pull_input_stack_t< T >, tpie::pipelining::bits::internal_reverser_input_t< T >, tpie::pipelining::bits::internal_buffer_input_t< T >, tpie::pipelining::bits::pull_input_vector_t< T, A >, tpie::pipelining::serialization_bits::sort_output_base< Traits >, tpie::pipelining::bits::ami_input_stack_t< dest_t >, tpie::pipelining::bits::sort_output_base< T, pred_t, store_t >, tpie::pipelining::bits::sort_output_base< push_type< dest_t >::type, pred_t, store_t >, tpie::pipelining::bits::input_t< dest_t >, tpie::pipelining::bits::range_t< dest_t >, tpie::pipelining::serialization_bits::input_t< dest_t >, tpie::pipelining::bits::buffer_pull_output_t< T >, tpie::pipelining::bits::internal_buffer_pull_output_t< T >, tpie::pipelining::bits::input_vector_t< dest_t, T, A >, and tpie::pipelining::bits::ami_input_t< dest_t >.

Definition at line 283 of file node.h.

283  {
284  }
progress_indicator_base* tpie::pipelining::node::proxy_progress_indicator ( )

Get a non-initialized progress indicator for use with external implementations.

When step() is called on a proxying progress indicator, step() is called on the node according to the number of steps declared in progress_indicator_base::init() and in node::set_steps().

Referenced by tpie::pipelining::serialization_bits::sort_calc_t< Traits >::go(), and tpie::pipelining::bits::sort_calc_t< T, pred_t, store_t >::go().

item_type tpie::pipelining::node::pull ( )
inline

For pull nodes, pull the next item from this node.

void tpie::pipelining::node::push ( const item_type item)
inline

For push nodes, push the next item to this node.

void tpie::pipelining::node::register_datastructure_usage ( const std::string &  name,
double  priority = 1 
)

Registers a datastructure.

Parameters
namethe name of the datastructure
prioritythe priority that should be given to this datastructure when assigning memory
virtual void tpie::pipelining::node::resource_available_changed ( resource_type  ,
memory_size_type   
)
inlinevirtual
virtual void tpie::pipelining::node::set_available_memory ( memory_size_type  availableMemory)
inlinevirtual

Called by the memory manager to set the amount of memory assigned to this node.

Reimplemented in tpie::pipelining::serialization_bits::sort_input_t< Traits >, tpie::pipelining::serialization_bits::sort_calc_t< Traits >, and tpie::pipelining::serialization_bits::sort_output_base< Traits >.

Definition at line 233 of file node.h.

References tpie::unused().

233  {
234  unused(availableMemory);
235  }
void unused(const T &x)
Declare that a variable is unused on purpose.
Definition: util.h:42
void tpie::pipelining::node::set_breadcrumb ( const std::string &  breadcrumb)
inline

Used internally when a pair_factory has a name set.

Definition at line 389 of file node.h.

Referenced by tpie::pipelining::factory_base::init_node(), and tpie::pipelining::factory_base::init_sub_node().

389  {
390  m_parameters.name = m_parameters.name.empty() ? breadcrumb : (breadcrumb + " | " + m_parameters.name);
391  }
template<typename T >
void tpie::pipelining::node::set_datastructure ( const std::string &  name,
datastructure 
)
inline

Returns a previously declared datastructure.

Parameters
namethe name of the datastructure
datastructurethe datastructure itself

Definition at line 722 of file node.h.

References get_node_map().

722  {
723  bits::node_map::datastructuremap_t & structures = get_node_map()->find_authority()->get_datastructures();
724  bits::node_map::datastructuremap_t::iterator i = structures.find(name);
725 
726  if(i == structures.end())
727  throw tpie::exception("attempted to set non-registered datastructure");
728 
729  i->second.second = move_if_movable<T>(datastructure);
730  }
bits::node_map::ptr get_node_map() const
Get the local node map, mapping node IDs to node pointers for all the nodes reachable from this one...
Definition: node.h:251
void tpie::pipelining::node::set_datastructure_memory_limits ( const std::string &  name,
memory_size_type  min,
memory_size_type  max = std::numeric_limits< memory_size_type >::max() 
)

Assign memory to a registered datastructure.

Parameters
namethe name of the datastructure
minthe minimum amount of memory required by the datastructure
maxthe maximum amount of memory used by the datastructure
void tpie::pipelining::node::set_maximum_memory ( memory_size_type  maximumMemory)
inline

Called by implementers to declare maximum memory requirements.

To signal that you don't want any memory, set minimum memory and the memory fraction to zero.

Definition at line 217 of file node.h.

References set_maximum_resource_usage().

Referenced by tpie::pipelining::bits::sort_output_base< push_type< dest_t >::type, pred_t, store_t >::propagate(), and tpie::pipelining::serialization_bits::sort_output_base< Traits >::propagate().

217  {
218  set_maximum_resource_usage(MEMORY, maximumMemory);
219  }
void set_maximum_resource_usage(resource_type type, memory_size_type usage)
Called by implementers to declare maximum resource requirements.
void tpie::pipelining::node::set_maximum_resource_usage ( resource_type  type,
memory_size_type  usage 
)

Called by implementers to declare maximum resource requirements.

To signal that you don't want to use this resource, set minimum resource usage and the resource fraction to zero.

Referenced by set_maximum_memory().

void tpie::pipelining::node::set_memory_fraction ( double  f)
inline

Set the memory priority of this node.

Memory is distributed proportionally to the priorities of the nodes in the given phase.

Definition at line 225 of file node.h.

References set_resource_fraction().

Referenced by tpie::pipelining::bits::sort_output_base< push_type< dest_t >::type, pred_t, store_t >::propagate(), and tpie::pipelining::serialization_bits::sort_output_base< Traits >::propagate().

225  {
226  set_resource_fraction(MEMORY, f);
227  }
void set_resource_fraction(resource_type type, double f)
Set the resource priority of this node.
void tpie::pipelining::node::set_minimum_memory ( memory_size_type  minimumMemory)
inline

Called by implementers to declare minimum memory requirements.

Definition at line 207 of file node.h.

References set_minimum_resource_usage().

Referenced by tpie::pipelining::bits::sort_output_base< push_type< dest_t >::type, pred_t, store_t >::propagate(), and tpie::pipelining::serialization_bits::sort_output_base< Traits >::propagate().

207  {
208  set_minimum_resource_usage(MEMORY, minimumMemory);
209  }
void set_minimum_resource_usage(resource_type type, memory_size_type usage)
Called by implementers to declare minimum resource requirements.
void tpie::pipelining::node::set_minimum_resource_usage ( resource_type  type,
memory_size_type  usage 
)

Called by implementers to declare minimum resource requirements.

Referenced by set_minimum_memory().

void tpie::pipelining::node::set_name ( const std::string &  name,
priority_type  priority = PRIORITY_USER 
)

Set this node's name.

For purposes of pipeline debugging and phase naming for progress indicator breadcrumbs.

Referenced by tpie::pipelining::factory_base::init_node().

void tpie::pipelining::node::set_phase_name ( const std::string &  name,
priority_type  priority = PRIORITY_USER 
)

Set this node's phase name.

For purposes of pipeline debugging and phase naming for progress indicator breadcrumbs.

Referenced by tpie::pipelining::factory_base::init_node().

void tpie::pipelining::node::set_plot_options ( flags< PLOT options)
inline

Set options specified for plot(), as a combination of node::PLOT values.

Definition at line 459 of file node.h.

459  {
460  m_plotOptions = options;
461  }
void tpie::pipelining::node::set_progress_indicator ( progress_indicator_base pi)
inline

Used internally. Set the progress indicator to use.

Definition at line 408 of file node.h.

408  {
409  m_pi = pi;
410  }
void tpie::pipelining::node::set_resource_being_assigned ( resource_type  type)
inline

Used internally to check order of method calls.

Definition at line 443 of file node.h.

443  {
444  m_resourceBeingAssigned = type;
445  }
void tpie::pipelining::node::set_resource_fraction ( resource_type  type,
double  f 
)

Set the resource priority of this node.

Resources are distributed proportionally to the priorities of the nodes in the given phase.

Referenced by set_memory_fraction().

void tpie::pipelining::node::set_state ( STATE  s)
inline

Used internally to check order of method calls.

Definition at line 429 of file node.h.

429  {
430  m_state = s;
431  }
void tpie::pipelining::node::set_steps ( stream_size_type  steps)

Called by implementers that intend to call step().

Parameters
stepsThe number of times step() is called at most.

Referenced by tpie::pipelining::bits::ami_input_t< dest_t >::propagate(), tpie::pipelining::bits::input_vector_t< dest_t, T, A >::propagate(), tpie::pipelining::bits::buffer_pull_output_t< T >::propagate(), tpie::pipelining::serialization_bits::input_t< dest_t >::propagate(), tpie::pipelining::bits::range_t< dest_t >::propagate(), tpie::pipelining::bits::sort_output_base< push_type< dest_t >::type, pred_t, store_t >::propagate(), tpie::pipelining::bits::ami_input_stack_t< dest_t >::propagate(), tpie::pipelining::serialization_bits::sort_output_base< Traits >::propagate(), tpie::pipelining::bits::ami_pull_input_stack_t< T >::propagate(), tpie::pipelining::bits::reverser_output_t< dest_t >::propagate(), tpie::pipelining::bits::buffer_output_t< dest_t >::propagate(), tpie::pipelining::bits::internal_reverser_output_t< dest_t >::propagate(), tpie::pipelining::serialization_bits::reverser_output_t< dest_t >::propagate(), tpie::pipelining::serialization_bits::sort_calc_t< Traits >::propagate(), tpie::pipelining::serialization_bits::reverser_pull_output_t< T >::propagate(), tpie::pipelining::bits::sort_calc_t< T, pred_t, store_t >::propagate(), tpie::pipelining::serialization_bits::buffer_output_t< dest_t >::propagate(), tpie::pipelining::serialization_bits::buffer_pull_output_t< T >::propagate(), and tpie::pipelining::bits::pull_source_t< fact_t >::type< dest_t >::propagate().

void tpie::pipelining::node::step ( stream_size_type  steps = 1)
inline

Step the progress indicator.

Parameters
stepsHow many steps to step.

Definition at line 654 of file node.h.

References get_state(), and tpie::progress_indicator_base::step().

Referenced by tpie::pipelining::bits::ami_input_t< dest_t >::go(), tpie::pipelining::bits::input_vector_t< dest_t, T, A >::go(), tpie::pipelining::serialization_bits::input_t< dest_t >::go(), tpie::pipelining::bits::range_t< dest_t >::go(), tpie::pipelining::bits::ami_input_stack_t< dest_t >::go(), tpie::pipelining::bits::reverser_output_t< dest_t >::go(), tpie::pipelining::bits::buffer_output_t< dest_t >::go(), tpie::pipelining::bits::internal_reverser_output_t< dest_t >::go(), tpie::pipelining::serialization_bits::sort_output_t< Traits, dest_t >::go(), tpie::pipelining::bits::sort_output_t< pred_t, dest_t, store_t >::go(), tpie::pipelining::serialization_bits::reverser_output_t< dest_t >::go(), tpie::pipelining::serialization_bits::buffer_output_t< dest_t >::go(), and tpie::pipelining::bits::pull_source_t< fact_t >::type< dest_t >::go().

654  {
655  assert(get_state() == STATE_IN_END ||
656  get_state() == STATE_IN_BEGIN ||
657  get_state() == STATE_AFTER_BEGIN ||
658  get_state() == STATE_IN_END ||
659  get_state() == STATE_IN_GO);
660  if (m_stepsLeft < steps)
661  step_overflow();
662  else
663  m_stepsLeft -= steps;
664  m_pi->step(steps);
665  }
void step(stream_size_type step=1)
Record an increment to the indicator and advance the indicator.
STATE get_state() const
Used internally to check order of method calls.
Definition: node.h:422

The documentation for this class was generated from the following file: