You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
236 lines
15 KiB
236 lines
15 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>tbb::filter Class Reference</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.4.7 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
</ul></div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul></div>
|
|
<div class="nav">
|
|
<a class="el" href="a00428.html">tbb</a>::<a class="el" href="a00294.html">filter</a></div>
|
|
<h1>tbb::filter Class Reference<br>
|
|
<small>
|
|
[<a class="el" href="a00441.html">Algorithms</a>]</small>
|
|
</h1><!-- doxytag: class="tbb::filter" -->A stage in a pipeline.
|
|
<a href="#_details">More...</a>
|
|
<p>
|
|
<code>#include <pipeline.h></code>
|
|
<p>
|
|
<p>Inheritance diagram for tbb::filter:
|
|
<p><center><img src="a00294.png" usemap="#tbb::filter_map" border="0" alt=""></center>
|
|
<map name="tbb::filter_map">
|
|
<area href="a00361.html" alt="tbb::thread_bound_filter" shape="rect" coords="0,56,145,80">
|
|
</map>
|
|
<a href="a00107.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fcfec27656a69ff2072802ac001e936f"></a><!-- doxytag: member="tbb::filter::is_serial" ref="fcfec27656a69ff2072802ac001e936f" args="() const " -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#fcfec27656a69ff2072802ac001e936f">is_serial</a> () const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">True if filter is serial. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cd53206c4795ef2df5df26b795caf692"></a><!-- doxytag: member="tbb::filter::is_ordered" ref="cd53206c4795ef2df5df26b795caf692" args="() const " -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#cd53206c4795ef2df5df26b795caf692">is_ordered</a> () const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">True if filter must receive stream in order. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="15c29cae5d237e6d63dbfe5c94af89d5"></a><!-- doxytag: member="tbb::filter::is_bound" ref="15c29cae5d237e6d63dbfe5c94af89d5" args="() const " -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#15c29cae5d237e6d63dbfe5c94af89d5">is_bound</a> () const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">True if filter is thread-bound. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8ec4dfe053e94a2349d56781ddea8477"></a><!-- doxytag: member="tbb::filter::object_may_be_null" ref="8ec4dfe053e94a2349d56781ddea8477" args="()" -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#8ec4dfe053e94a2349d56781ddea8477">object_may_be_null</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">true if an input filter can emit null <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#fa1b3dc1f4f47563ccab7f4d92f5b543">operator()</a> (void *item)=0</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Operate on an item from the input stream, and return item for output stream. <a href="#fa1b3dc1f4f47563ccab7f4d92f5b543"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#66d159f362293e3964ba3da8bc1d2604">~filter</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy filter. <a href="#66d159f362293e3964ba3da8bc1d2604"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#56275eb889c77c4807967133e21401bd">finalize</a> (void *)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys item if pipeline was cancelled. <a href="#56275eb889c77c4807967133e21401bd"></a><br></td></tr>
|
|
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1edba30e1e64e82ee4b7c6f227825817"></a><!-- doxytag: member="tbb::filter::x1" ref="1edba30e1e64e82ee4b7c6f227825817" args="((is_serial_?serial:parallel)|exact_exception_propagation))" -->
|
|
</td><td class="memItemRight" valign="bottom"><b>x1</b> ((is_serial_?serial:parallel)|<a class="el" href="a00294.html#f17200974c33be21f42a5f00893de028">exact_exception_propagation</a>))</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a06145c3e7ad273ece95eb8be642b0a2"></a><!-- doxytag: member="tbb::filter::prev_filter_in_pipeline" ref="a06145c3e7ad273ece95eb8be642b0a2" args="(not_in_pipeline())" -->
|
|
</td><td class="memItemRight" valign="bottom"><b>prev_filter_in_pipeline</b> (not_in_pipeline())</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7a54082a9165275bf7725970d756f132"></a><!-- doxytag: member="tbb::filter::my_pipeline" ref="7a54082a9165275bf7725970d756f132" args="(NULL)" -->
|
|
</td><td class="memItemRight" valign="bottom"><b>my_pipeline</b> (NULL)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d66d6e9e27b1be74fdb9c07f899d4837"></a><!-- doxytag: member="tbb::filter::next_segment" ref="d66d6e9e27b1be74fdb9c07f899d4837" args="(NULL)" -->
|
|
</td><td class="memItemRight" valign="bottom"><b>next_segment</b> (NULL)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3f49df3c34a3e5a8884001c30230a94"></a><!-- doxytag: member="tbb::filter::filter" ref="a3f49df3c34a3e5a8884001c30230a94" args="(mode filter_mode)" -->
|
|
</td><td class="memItemRight" valign="bottom"><b>filter</b> (mode filter_mode)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2b9c0dd8123a8186b46bc100d9469f5"></a><!-- doxytag: member="tbb::filter::set_end_of_input" ref="b2b9c0dd8123a8186b46bc100d9469f5" args="()" -->
|
|
void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><b>set_end_of_input</b> ()</td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Static Protected Attributes</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4b7de3a76e744f3d9c1bc5d437ea851d"></a><!-- doxytag: member="tbb::filter::filter_is_serial" ref="4b7de3a76e744f3d9c1bc5d437ea851d" args="" -->
|
|
static const unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#4b7de3a76e744f3d9c1bc5d437ea851d">filter_is_serial</a> = 0x1</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">The lowest bit 0 is for parallel vs. serial. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static const unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#2e5eb65f95d8050186278077e433c5b1">filter_is_out_of_order</a> = 0x1<<4</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">4th bit distinguishes ordered vs unordered filters. <a href="#2e5eb65f95d8050186278077e433c5b1"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd6a6e7210efc9bcaf2c5e08767d92b5"></a><!-- doxytag: member="tbb::filter::filter_is_bound" ref="dd6a6e7210efc9bcaf2c5e08767d92b5" args="" -->
|
|
static const unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#dd6a6e7210efc9bcaf2c5e08767d92b5">filter_is_bound</a> = 0x1<<5</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">5th bit distinguishes thread-bound and regular filters. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bdd02a434a6e7499dd1e8f43aae96793"></a><!-- doxytag: member="tbb::filter::filter_may_emit_null" ref="bdd02a434a6e7499dd1e8f43aae96793" args="" -->
|
|
static const unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#bdd02a434a6e7499dd1e8f43aae96793">filter_may_emit_null</a> = 0x1<<6</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">6th bit marks input filters emitting small objects <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static const unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="a00294.html#f17200974c33be21f42a5f00893de028">exact_exception_propagation</a></td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">7th bit defines exception propagation mode expected by the application. <a href="#f17200974c33be21f42a5f00893de028"></a><br></td></tr>
|
|
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8228ce0751009045e8158d2e642715a6"></a><!-- doxytag: member="tbb::filter::internal::stage_task" ref="8228ce0751009045e8158d2e642715a6" args="" -->
|
|
class </td><td class="memItemRight" valign="bottom"><b>internal::stage_task</b></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05d67150ca324698ba852553e223d3eb"></a><!-- doxytag: member="tbb::filter::internal::pipeline_root_task" ref="05d67150ca324698ba852553e223d3eb" args="" -->
|
|
class </td><td class="memItemRight" valign="bottom"><b>internal::pipeline_root_task</b></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b211ee58bada099e24280d478017cbff"></a><!-- doxytag: member="tbb::filter::pipeline" ref="b211ee58bada099e24280d478017cbff" args="" -->
|
|
class </td><td class="memItemRight" valign="bottom"><b>pipeline</b></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e43b69a482df8e053cb199af69eb5139"></a><!-- doxytag: member="tbb::filter::thread_bound_filter" ref="e43b69a482df8e053cb199af69eb5139" args="" -->
|
|
class </td><td class="memItemRight" valign="bottom"><b>thread_bound_filter</b></td></tr>
|
|
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
A stage in a pipeline.
|
|
<p>
|
|
<hr><h2>Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" name="66d159f362293e3964ba3da8bc1d2604"></a><!-- doxytag: member="tbb::filter::~filter" ref="66d159f362293e3964ba3da8bc1d2604" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual __TBB_EXPORTED_METHOD tbb::filter::~filter </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Destroy filter.
|
|
<p>
|
|
If the filter was added to a pipeline, the pipeline must be destroyed first.
|
|
</div>
|
|
</div><p>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="56275eb889c77c4807967133e21401bd"></a><!-- doxytag: member="tbb::filter::finalize" ref="56275eb889c77c4807967133e21401bd" args="(void *)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void tbb::filter::finalize </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [inline, virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Destroys item if pipeline was cancelled.
|
|
<p>
|
|
Required to prevent memory leaks. Note it can be called concurrently even for serial filters.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="fa1b3dc1f4f47563ccab7f4d92f5b543"></a><!-- doxytag: member="tbb::filter::operator()" ref="fa1b3dc1f4f47563ccab7f4d92f5b543" args="(void *item)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void* tbb::filter::operator() </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"> <em>item</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Operate on an item from the input stream, and return item for output stream.
|
|
<p>
|
|
Returns NULL if filter is a sink.
|
|
</div>
|
|
</div><p>
|
|
<hr><h2>Member Data Documentation</h2>
|
|
<a class="anchor" name="f17200974c33be21f42a5f00893de028"></a><!-- doxytag: member="tbb::filter::exact_exception_propagation" ref="f17200974c33be21f42a5f00893de028" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const unsigned char <a class="el" href="a00294.html#f17200974c33be21f42a5f00893de028">tbb::filter::exact_exception_propagation</a><code> [static, protected]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
<b>Initial value:</b><div class="fragment"><pre class="fragment">
|
|
<span class="preprocessor">#if TBB_USE_CAPTURED_EXCEPTION</span>
|
|
<span class="preprocessor"> 0x0</span>
|
|
</pre></div>7th bit defines exception propagation mode expected by the application.
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="2e5eb65f95d8050186278077e433c5b1"></a><!-- doxytag: member="tbb::filter::filter_is_out_of_order" ref="2e5eb65f95d8050186278077e433c5b1" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const unsigned char <a class="el" href="a00294.html#2e5eb65f95d8050186278077e433c5b1">tbb::filter::filter_is_out_of_order</a> = 0x1<<4<code> [static, protected]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
4th bit distinguishes ordered vs unordered filters.
|
|
<p>
|
|
The bit was not set for parallel filters in TBB 2.1 and earlier, but <a class="el" href="a00294.html#cd53206c4795ef2df5df26b795caf692">is_ordered()</a> function always treats parallel filters as out of order.
|
|
</div>
|
|
</div><p>
|
|
<hr>The documentation for this class was generated from the following file:<ul>
|
|
<li>pipeline.h</ul>
|
|
<hr>
|
|
<p></p>
|
|
Copyright © 2005-2013 Intel Corporation. All Rights Reserved.
|
|
<p></p>
|
|
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.
|
|
<p></p>
|
|
* Other names and brands may be claimed as the property of others.
|