#include <pipeline.h>
Inherited by tbb::thread_bound_filter.
Inheritance diagram for tbb::filter:
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 |
True if filter must receive stream in order. | |
bool | is_bound () const |
True if filter is thread-bound. | |
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 was cancelled. | |
Protected Member Functions | |
filter (bool is_serial_) | |
filter (mode filter_mode) | |
Friends | |
class | internal::stage_task |
class | internal::pipeline_root_task |
class | pipeline |
class | thread_bound_filter |
enum tbb::filter::mode |
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 |
|
virtual __TBB_EXPORTED_METHOD tbb::filter::~filter | ( | ) | [virtual] |
Destroy filter.
If the filter was added to a pipeline, the pipeline must be destroyed first.
virtual void tbb::filter::finalize | ( | void * | ) | [inline, virtual] |
Destroys item if pipeline was 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.