tbb::filter Class Reference
[Algorithms]

A stage in a pipeline. More...

#include <pipeline.h>

List of all members.

Public Types

 parallel = current_version | filter_is_out_of_order
 processes multiple items in parallel and in no particular order
 serial_in_order = current_version | filter_is_serial
 processes items one at a time; all such filters process items in the same order
 serial_out_of_order = current_version | filter_is_serial | filter_is_out_of_order
 processes items one at a time and in no particular order
 serial = serial_in_order
enum  mode { parallel = current_version | filter_is_out_of_order, serial_in_order = current_version | filter_is_serial, serial_out_of_order = current_version | filter_is_serial | filter_is_out_of_order, serial = serial_in_order }

Public Member Functions

bool is_serial () const
 True if filter is serial.
bool is_ordered () const
virtual void * operator() (void *item)=0
 Operate on an item from the input stream, and return item for output stream.
virtual __TBB_EXPORTED_METHOD ~filter ()
 Destroy filter.
virtual void finalize (void *)
 Destroys item if pipeline is cancelled.

Protected Member Functions

 filter (bool is_serial_)
 filter (mode filter_mode)

Friends

class internal::stage_task
class pipeline


Detailed Description

A stage in a pipeline.


Member Enumeration Documentation

enum tbb::filter::mode

Enumerator:
parallel  processes multiple items in parallel and in no particular order
serial_in_order  processes items one at a time; all such filters process items in the same order
serial_out_of_order  processes items one at a time and in no particular order
serial 
Deprecated:
use serial_in_order instead


Constructor & Destructor Documentation

virtual __TBB_EXPORTED_METHOD tbb::filter::~filter (  )  [virtual]

Destroy filter.

If the filter was added to a pipeline, the pipeline must be destroyed first.


Member Function Documentation

virtual void tbb::filter::finalize ( void *   )  [inline, virtual]

Destroys item if pipeline is cancelled.

Required to prevent memory leaks Note it can be called concurrently even for serial filters.

virtual void* tbb::filter::operator() ( void *  item  )  [pure virtual]

Operate on an item from the input stream, and return item for output stream.

Returns NULL if filter is a sink.


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

Copyright © 2005-2009 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.