HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_ParallelPipeline.h File Reference
#include <tbb/pipeline.h>
+ Include dependency graph for UT_ParallelPipeline.h:

Go to the source code of this file.

Namespaces

 UT_ParallelPipeline
 

Typedefs

template<typename Receives , typename Provides >
using UT_ParallelPipeline::Filter = tbb::filter_t< Receives, Provides >
 A filter (task) that will make up part of the pipeline. More...
 
using UT_ParallelPipeline::FlowControl = tbb::flow_control
 The control to signal end-of-input for the pipeline. More...
 

Enumerations

enum  UT_ParallelPipeline::Mode { UT_ParallelPipeline::Parallel = tbb::filter::mode::parallel, UT_ParallelPipeline::SerialInOrder = tbb::filter::mode::serial_in_order, UT_ParallelPipeline::SerialOutOfOrder = tbb::filter::mode::serial_out_of_order, UT_ParallelPipeline::Serial = tbb::filter::mode::serial }
 The execution mode of a filter. More...
 

Functions

template<typename Receives , typename Provides , typename Body >
UT_ParallelPipeline::Filter
< Receives, Provides > 
UTmakeParallelPipelineFilter (UT_ParallelPipeline::Mode mode, const Body &body)
 Create a filter (task) that will make up part of the pipeline. More...
 
void UTrunParallelPipeline (size_t max_number_of_live_tokens, const UT_ParallelPipeline::Filter< void, void > &filter_chain)
 Run the pipeline. More...
 

Function Documentation

template<typename Receives , typename Provides , typename Body >
UT_ParallelPipeline::Filter<Receives, Provides> UTmakeParallelPipelineFilter ( UT_ParallelPipeline::Mode  mode,
const Body &  body 
)

Create a filter (task) that will make up part of the pipeline.

Parameters
modeThe execution mode of this filter.
bodyThe function or lambda that should be executed.

Definition at line 41 of file UT_ParallelPipeline.h.

void UTrunParallelPipeline ( size_t  max_number_of_live_tokens,
const UT_ParallelPipeline::Filter< void, void > &  filter_chain 
)
inline

Run the pipeline.

The pipeline is defined by providing a number of filters to filter_chain The pipeline will run with at most max_number_of_live_tokens items simultaneously.

Parameters
max_number_of_live_tokensThe maximum number of items to run simultaneously.
filter_chainThe filters that make up the pipeline.

Definition at line 56 of file UT_ParallelPipeline.h.