Pipe sorter input node. More...
#include <tpie/pipelining/serialization_sort.h>
Inherits tpie::pipelining::node.
Public Member Functions | |
sort_input_t (sort_calc_t< Traits > dest) | |
virtual void | begin () override |
Begin pipeline processing phase. More... | |
void | push (const item_type &item) |
virtual void | end () override |
End pipeline processing phase. More... | |
virtual bool | can_evacuate () override |
Overridden by nodes that have data to evacuate. More... | |
virtual void | evacuate () override |
Overridden by nodes that have data to evacuate. 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... | |
memory_size_type | get_available_memory () const |
Get the amount of memory assigned to this node. More... | |
void | set_memory_fraction (double f) |
Set the memory priority of this node. More... | |
double | get_memory_fraction () const |
Get the memory priority of 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 | go () |
For initiator nodes, execute this phase by pushing all items to be pushed. More... | |
virtual void | go (progress_indicator_base &) |
Deprecated go()-implementation signature. 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... | |
void | set_breadcrumb (const std::string &breadcrumb) |
Used internally when a pair_factory has a name set. More... | |
void | add_successor (node *succ) |
Used internally to facilitate forwarding parameters to successors in the item flow graph. More... | |
stream_size_type | get_steps () |
Used internally for progress indication. More... | |
void | set_progress_indicator (progress_indicator_base *pi) |
Used internally. Set the progress indicator to use. More... | |
progress_indicator_base * | get_progress_indicator () |
Used internally. Get the progress indicator used. More... | |
STATE | get_state () const |
void | set_state (STATE s) |
void | add_forwarded_data (std::string key, boost::any value, bool explicitForward=true) |
Called by users to add forwarded data to this node and recursively to its successors. More... | |
bool | can_fetch (std::string key) |
Find out if there is a piece of auxiliary data forwarded with a given name. More... | |
boost::any | fetch_any (std::string key) |
Fetch piece of auxiliary data as boost::any (the internal representation). More... | |
template<typename T > | |
T | fetch (std::string key) |
Fetch piece of auxiliary data, expecting a given value type. More... | |
Protected Member Functions | |
virtual void | set_available_memory (memory_size_type availableMemory) override |
Called by the memory manager to set the amount of memory assigned to this node. 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_pull_destination (const node_token &dest) |
Legacy alias of add_pull_source. More... | |
void | add_pull_destination (const node &dest) |
Legacy alias of add_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 | 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... | |
template<typename T > | |
void | forward (std::string key, T value, bool explicitForward=true) |
Called by implementers to forward auxiliary data to successors. More... | |
void | forward_any (std::string key, boost::any value, bool explicitForward=true) |
See node::forward. More... | |
const node_token & | get_token () |
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_base * | proxy_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... | |
Pipe sorter input node.
T | The type of items sorted |
pred_t | The less-than predicate |
Definition at line 48 of file serialization_sort.h.
|
inlineprotectedinherited |
Called by implementers to declare a node dependency, that is, a requirement that another node has end() called before the begin() of this node.
Definition at line 404 of file node.h.
Referenced by tpie::pipelining::node::add_dependency().
|
inlineprotectedinherited |
Called by implementers to declare a node dependency, that is, a requirement that another node has end() called before the begin() of this node.
Definition at line 414 of file node.h.
References tpie::pipelining::node::add_dependency().
|
inlineinherited |
Called by users to add forwarded data to this node and recursively to its successors.
If explicitForward is false, the data will not override data forwarded with explicitForward == true.
Definition at line 501 of file node.h.
References tpie::pipelining::node::forward_any().
|
inlineprotectedinherited |
Legacy alias of add_pull_source.
Definition at line 388 of file node.h.
References tpie::pipelining::node::add_pull_source().
|
inlineprotectedinherited |
Legacy alias of add_pull_source.
Definition at line 395 of file node.h.
References tpie::pipelining::node::add_pull_source().
|
inlineprotectedinherited |
Called by implementers to declare a pull source.
Definition at line 370 of file node.h.
Referenced by tpie::pipelining::node::add_pull_destination(), and tpie::pipelining::node::add_pull_source().
|
inlineprotectedinherited |
Called by implementers to declare a pull source.
Definition at line 381 of file node.h.
References tpie::pipelining::node::add_pull_source().
|
inlineprotectedinherited |
Called by implementers to declare a push destination.
Definition at line 352 of file node.h.
Referenced by tpie::pipelining::node::add_push_destination(), and tpie::pipelining::parallel_bits::after< T >::set_consumer().
|
inlineprotectedinherited |
Called by implementers to declare a push destination.
Definition at line 360 of file node.h.
References tpie::pipelining::node::add_push_destination().
|
inlineinherited |
|
inlineoverridevirtual |
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 from tpie::pipelining::node.
Definition at line 278 of file serialization_sort.h.
References tpie::pipelining::node::begin().
|
inlineoverridevirtual |
Overridden by nodes that have data to evacuate.
Reimplemented from tpie::pipelining::node.
Definition at line 292 of file serialization_sort.h.
|
inlineinherited |
Find out if there is a piece of auxiliary data forwarded with a given name.
Definition at line 513 of file node.h.
Referenced by tpie::pipelining::bits::sort_input_t< T, pred_t >::propagate().
|
inlineprotectedinherited |
For pull nodes, return true if there are more items to be pulled.
|
inlineoverridevirtual |
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 from tpie::pipelining::node.
Definition at line 287 of file serialization_sort.h.
References tpie::pipelining::node::end().
|
inlineoverridevirtual |
Overridden by nodes that have data to evacuate.
Reimplemented from tpie::pipelining::node.
Definition at line 296 of file serialization_sort.h.
|
inlineinherited |
|
inlineinherited |
Fetch piece of auxiliary data as boost::any (the internal representation).
|
inlineprotectedinherited |
Called by implementers to forward auxiliary data to successors.
If explicitForward is false, the data will not override data forwarded with explicitForward == true.
Definition at line 461 of file node.h.
References tpie::pipelining::node::forward_any().
Referenced by tpie::pipelining::bits::input_vector_t< dest_t >::propagate(), tpie::pipelining::bits::input_t< dest_t >::propagate(), tpie::pipelining::passive_reverser< T >::source_t< dest_t >::propagate(), tpie::pipelining::bits::buffer_pull_output_t< T >::propagate(), tpie::pipelining::bits::pull_input_t< T >::propagate(), tpie::pipelining::serialization_bits::sort_pull_output_t< Traits >::propagate(), tpie::pipelining::bits::sort_pull_output_t< item_type, pred_t >::propagate(), tpie::pipelining::bits::delayed_buffer_input_t< item_type >::propagate(), tpie::pipelining::bits::reverser_input_t< item_type >::propagate(), tpie::pipelining::bits::delayed_buffer_output_t< dest_t >::propagate(), tpie::pipelining::serialization_bits::sort_output_t< Traits, dest_t >::propagate(), tpie::pipelining::bits::reverser_output_t< dest_t >::propagate(), and tpie::pipelining::bits::sort_output_t< pred_t, dest_t >::propagate().
|
inlineprotectedinherited |
See node::forward.
Definition at line 468 of file node.h.
References tpie::log_debug().
Referenced by tpie::pipelining::node::add_forwarded_data(), and tpie::pipelining::node::forward().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get the local node map, mapping node IDs to node pointers for all the nodes reachable from this one.
Definition at line 119 of file node.h.
Referenced by tpie::pipelining::virtual_chunk_end< Input >::operator=(), tpie::pipelining::virtual_chunk< Input, Output >::operator=(), and tpie::pipelining::virtual_chunk_begin< Output >::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedinherited |
Get the node_token that maps this node's ID to a pointer to this.
|
inlinevirtualinherited |
For initiator nodes, execute this phase by pushing all items to be pushed.
For non-initiator nodes, the default implementation throws a not_initiator_segment exception.
Reimplemented in tpie::pipelining::bits::pull_output_iterator_t< IT >::type< dest_t >, tpie::pipelining::bits::push_input_iterator_t< IT >::type< dest_t >, tpie::pipelining::bits::sort_calc_t< T, pred_t >, tpie::pipelining::serialization_bits::sort_calc_t< Traits >, tpie::pipelining::bits::sort_output_t< pred_t, dest_t >, tpie::pipelining::bits::reverser_output_t< dest_t >, tpie::pipelining::serialization_bits::sort_output_t< Traits, dest_t >, tpie::pipelining::bits::delayed_buffer_output_t< dest_t >, tpie::pipelining::serialization_bits::rev_output_t< dest_t >, tpie::pipelining::serialization_bits::rev_output_t< output_dest_t >, tpie::pipelining::bits::pull_output_t< source_t >, tpie::pipelining::bits::sort_pull_output_t< T, pred_t >, tpie::pipelining::bits::sort_pull_output_t< item_type, pred_t >, tpie::pipelining::serialization_bits::sort_pull_output_t< Traits >, tpie::pipelining::bits::input_t< dest_t >, tpie::pipelining::serialization_bits::input_t< dest_t >, tpie::pipelining::bits::input_vector_t< dest_t >, and tpie::pipelining::bits::scanf_ints_t< dest_t >.
Definition at line 175 of file node.h.
References tpie::log_warning().
|
inlinevirtualinherited |
Deprecated go()-implementation signature.
The progress indicator argument does nothing. Instead, use step() and set_steps().
Reimplemented in tpie::pipelining::passive_reverser< T >::source_t< dest_t >.
Definition at line 186 of file node.h.
References tpie::log_warning().
|
inlinevirtualinherited |
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::join< T >::source_impl< dest_t >.
|
inlinevirtualinherited |
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::sort_input_t< T, pred_t >, tpie::pipelining::bits::sort_calc_t< T, pred_t >, tpie::pipelining::serialization_bits::sort_calc_t< Traits >, tpie::pipelining::bits::sort_output_t< pred_t, dest_t >, tpie::pipelining::bits::reverser_output_t< dest_t >, tpie::pipelining::serialization_bits::sort_output_t< Traits, dest_t >, tpie::pipelining::bits::delayed_buffer_output_t< dest_t >, tpie::pipelining::serialization_bits::rev_output_t< dest_t >, tpie::pipelining::serialization_bits::rev_output_t< output_dest_t >, tpie::pipelining::bits::reverser_input_t< T >, tpie::pipelining::bits::reverser_input_t< item_type >, tpie::pipelining::bits::delayed_buffer_input_t< T >, tpie::pipelining::bits::delayed_buffer_input_t< item_type >, tpie::pipelining::bits::sort_pull_output_t< T, pred_t >, tpie::pipelining::bits::sort_pull_output_t< item_type, pred_t >, tpie::pipelining::serialization_bits::sort_pull_output_t< Traits >, tpie::pipelining::bits::pull_input_t< T >, tpie::pipelining::bits::buffer_pull_output_t< T >, tpie::pipelining::passive_reverser< T >::source_t< dest_t >, tpie::pipelining::serialization_bits::input_t< dest_t >, tpie::pipelining::bits::input_t< dest_t >, and tpie::pipelining::bits::input_vector_t< dest_t >.
|
inlineprotectedinherited |
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().
Definition at line 604 of file node.h.
Referenced by tpie::pipelining::serialization_bits::sort_calc_t< Traits >::go(), and tpie::pipelining::bits::sort_calc_t< T, pred_t >::go().
|
inlineprotectedinherited |
For pull nodes, pull the next item from this node.
|
inlineprotectedinherited |
For push nodes, push the next item to this node.
|
inlineoverrideprotectedvirtual |
Called by the memory manager to set the amount of memory assigned to this node.
Reimplemented from tpie::pipelining::node.
Definition at line 301 of file serialization_sort.h.
References tpie::pipelining::node::set_available_memory().
|
inlineinherited |
|
inlineprotectedinherited |
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.
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedinherited |
Called by implementers that intend to call step().
steps | The number of times step() is called at most. |
Definition at line 566 of file node.h.
References tpie::log_error().
Referenced by tpie::pipelining::bits::input_vector_t< dest_t >::propagate(), tpie::pipelining::bits::input_t< dest_t >::propagate(), tpie::pipelining::serialization_bits::input_t< dest_t >::propagate(), tpie::pipelining::bits::pull_input_t< T >::propagate(), tpie::pipelining::serialization_bits::sort_pull_output_t< Traits >::propagate(), tpie::pipelining::bits::sort_pull_output_t< item_type, pred_t >::propagate(), tpie::pipelining::serialization_bits::rev_output_t< output_dest_t >::propagate(), tpie::pipelining::bits::delayed_buffer_output_t< dest_t >::propagate(), tpie::pipelining::serialization_bits::sort_output_t< Traits, dest_t >::propagate(), tpie::pipelining::bits::reverser_output_t< dest_t >::propagate(), tpie::pipelining::bits::sort_output_t< pred_t, dest_t >::propagate(), tpie::pipelining::serialization_bits::sort_calc_t< Traits >::propagate(), and tpie::pipelining::bits::sort_calc_t< T, pred_t >::propagate().
|
inlineprotectedinherited |
Step the progress indicator.
steps | How many steps to step. |
Definition at line 586 of file node.h.
References tpie::log_warning(), and tpie::progress_indicator_base::step().
Referenced by tpie::pipelining::bits::input_vector_t< dest_t >::go(), tpie::pipelining::bits::input_t< dest_t >::go(), tpie::pipelining::serialization_bits::input_t< dest_t >::go(), tpie::pipelining::serialization_bits::rev_output_t< output_dest_t >::go(), tpie::pipelining::bits::delayed_buffer_output_t< dest_t >::go(), tpie::pipelining::serialization_bits::sort_output_t< Traits, dest_t >::go(), tpie::pipelining::bits::reverser_output_t< dest_t >::go(), tpie::pipelining::bits::sort_output_t< pred_t, dest_t >::go(), and tpie::pipelining::bits::proxy_progress_indicator::refresh().