All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Methods | Public Members | List of all members
nvbio::Pipeline Struct Reference

Detailed description

A class implementing a parallel CPU task-pipeline. The pipeline can be composed by any number of user-defined stages connected as a DAG and terminating into a sink (i.e. a task with no output). At run-time, each stage of the pipeline can be executed in parallel by separate threads, and the run-time takes care of managing the dependencies and performing multiple-buffering for each of the stages.

Definition at line 58 of file pipeline.h.

#include <pipeline.h>

Public Methods

 Pipeline ()
 ~Pipeline ()
template<typename StageType >
uint32 append_stage (StageType *stage, const uint32 buffers=4)
template<typename SinkType >
uint32 append_sink (SinkType *sink)
void add_dependency (const uint32 in, const uint32 out)
void run ()

Public Members

< priv::PipelineThreadBase * > 

Constructor & Destructor Documentation

nvbio::Pipeline::Pipeline ( )


Definition at line 62 of file pipeline.h.

nvbio::Pipeline::~Pipeline ( )


Definition at line 343 of file pipeline_inl.h.

Member Function Documentation

void nvbio::Pipeline::add_dependency ( const uint32  in,
const uint32  out 

add a dependency

inthe id of the producer stage
outthe id of the consumer stage

Definition at line 384 of file pipeline_inl.h.

template<typename SinkType >
uint32 nvbio::Pipeline::append_sink ( SinkType *  sink)

append the pipeline sink

sinkthe sink stage

Definition at line 369 of file pipeline_inl.h.

template<typename StageType >
uint32 nvbio::Pipeline::append_stage ( StageType *  stage,
const uint32  buffers = 4 

append a new pipeline stage

stagethe stage to be added
buffersthe number of output buffers for multiple buffering
the stage id

Definition at line 353 of file pipeline_inl.h.

void nvbio::Pipeline::run ( )

run the pipeline to completion

Definition at line 392 of file pipeline_inl.h.

Member Data Documentation

std::vector<priv::PipelineThreadBase*> nvbio::Pipeline::m_stages

Definition at line 95 of file pipeline.h.

The documentation for this struct was generated from the following files: