19 #ifndef __TPIE_PIPELINING_SUBPIPELINE_H__
20 #define __TPIE_PIPELINING_SUBPIPELINE_H__
22 #include <tpie/pipelining/pipeline.h>
23 #include <tpie/pipelining/runtime.h>
26 namespace pipelining {
32 memory_size_type filesAvailable, memory_size_type mem,
33 const char *
file,
const char *
function);
36 const char * file,
const char *
function) {
45 std::unique_ptr<runtime> rt;
48 template <
typename item_type>
55 template <
typename item_type,
typename fact_t>
57 typename fact_t::constructed_type front;
60 this->m_nodeMap = front.get_node_map();
61 this->frontNode = &front;
69 void push(
const item_type & item)
override {
81 template <
typename item_type>
92 *
this = std::move(from);
101 void clear() {p.reset();}
103 void push(
const item_type & item) {p->push(item);}
105 void begin(
size_t filesAvailable,
size_t memory) {
106 p->begin(1, p->pi, filesAvailable, memory,
nullptr,
nullptr);
109 void begin(
size_t memory) {
114 memory_size_type filesAvailable, memory_size_type mem,
115 const char *
file,
const char *
function) {
116 p->begin(items, pi, filesAvailable, mem, file,
function);
120 memory_size_type mem,
121 const char * file,
const char *
function) {
125 void end() {p->end();}
127 void plot(std::ostream & os = std::cout) {
131 void plot_full(std::ostream & os = std::cout) {
135 bits::node_map::ptr get_node_map()
const {
136 return p->get_node_map();
139 bool can_fetch(std::string key) {
140 return p->can_fetch(key);
144 return p->fetch_any(key);
147 template <
typename T>
148 T & fetch(std::string key) {
150 return any_cast<T>(a);
154 return p->forward_any(key, std::move(value));
157 template <
typename T>
158 void forward(std::string key, T value) {
162 void output_memory(std::ostream & o)
const {p->output_memory(o);}
164 std::shared_ptr<bits::subpipeline_virt<item_type>> p;
170 #endif //__TPIE_PIPELINING_SUBPIPELINE_H__
The base class for indicating the progress of some task.
Central file abstraction.
a dummy progress indicator that produces no output
file_manager & get_file_manager()
Return a reference to the file manager.
pipe_middle< tempfactory< bits::item_type_t< T > > > item_type()
Create item type defining identity pipe node.