Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::interface6::filter_t< T, U > Class Template Reference

Class representing a chain of type-safe pipeline filters. More...

#include <pipeline.h>

Collaboration diagram for tbb::interface6::filter_t< T, U >:

Public Member Functions

 filter_t ()
 
 filter_t (const filter_t< T, U > &rhs)
 
template<typename Body >
 filter_t (tbb::filter::mode mode, const Body &body)
 
void operator= (const filter_t< T, U > &rhs)
 
 ~filter_t ()
 
void clear ()
 

Private Types

typedef internal::filter_node filter_node
 

Private Member Functions

 filter_t (filter_node *root_)
 

Private Attributes

filter_noderoot
 

Friends

class internal::pipeline_proxy
 
template<typename T_ , typename U_ , typename Body >
filter_t< T_, U_ > make_filter (tbb::filter::mode, const Body &)
 Create a filter to participate in parallel_pipeline. More...
 
template<typename T_ , typename V_ , typename U_ >
filter_t< T_, U_ > operator& (const filter_t< T_, V_ > &, const filter_t< V_, U_ > &)
 

Detailed Description

template<typename T, typename U>
class tbb::interface6::filter_t< T, U >

Class representing a chain of type-safe pipeline filters.

Definition at line 53 of file pipeline.h.

Member Typedef Documentation

◆ filter_node

template<typename T , typename U >
typedef internal::filter_node tbb::interface6::filter_t< T, U >::filter_node
private

Definition at line 601 of file pipeline.h.

Constructor & Destructor Documentation

◆ filter_t() [1/4]

template<typename T , typename U >
tbb::interface6::filter_t< T, U >::filter_t ( filter_node root_)
inlineprivate

Definition at line 603 of file pipeline.h.

603  : root(root_) {
604  root->add_ref();
605  }

References tbb::interface6::internal::filter_node::add_ref(), and tbb::interface6::filter_t< T, U >::root.

Here is the call graph for this function:

◆ filter_t() [2/4]

template<typename T , typename U >
tbb::interface6::filter_t< T, U >::filter_t ( )
inline

Definition at line 613 of file pipeline.h.

613 : root(NULL) {}

◆ filter_t() [3/4]

template<typename T , typename U >
tbb::interface6::filter_t< T, U >::filter_t ( const filter_t< T, U > &  rhs)
inline

Definition at line 614 of file pipeline.h.

614  : root(rhs.root) {
615  if( root ) root->add_ref();
616  }

References tbb::interface6::internal::filter_node::add_ref(), and tbb::interface6::filter_t< T, U >::root.

Here is the call graph for this function:

◆ filter_t() [4/4]

template<typename T , typename U >
template<typename Body >
tbb::interface6::filter_t< T, U >::filter_t ( tbb::filter::mode  mode,
const Body &  body 
)
inline

Definition at line 618 of file pipeline.h.

618  :
619  root( new internal::filter_node_leaf<T,U,Body>(mode, body) ) {
620  root->add_ref();
621  }

References tbb::interface6::internal::filter_node::add_ref(), and tbb::interface6::filter_t< T, U >::root.

Here is the call graph for this function:

◆ ~filter_t()

template<typename T , typename U >
tbb::interface6::filter_t< T, U >::~filter_t ( )
inline

Definition at line 631 of file pipeline.h.

631  {
632  if( root ) root->remove_ref();
633  }

References tbb::interface6::internal::filter_node::remove_ref(), and tbb::interface6::filter_t< T, U >::root.

Here is the call graph for this function:

Member Function Documentation

◆ clear()

template<typename T , typename U >
void tbb::interface6::filter_t< T, U >::clear ( )
inline

Definition at line 634 of file pipeline.h.

634  {
635  // Like operator= with filter_t() on right side.
636  if( root ) {
637  filter_node* old = root;
638  root = NULL;
639  old->remove_ref();
640  }
641  }

References tbb::interface6::internal::filter_node::remove_ref(), and tbb::interface6::filter_t< T, U >::root.

Here is the call graph for this function:

◆ operator=()

template<typename T , typename U >
void tbb::interface6::filter_t< T, U >::operator= ( const filter_t< T, U > &  rhs)
inline

Definition at line 623 of file pipeline.h.

623  {
624  // Order of operations below carefully chosen so that reference counts remain correct
625  // in unlikely event that remove_ref throws exception.
626  filter_node* old = root;
627  root = rhs.root;
628  if( root ) root->add_ref();
629  if( old ) old->remove_ref();
630  }

References tbb::interface6::internal::filter_node::add_ref(), tbb::interface6::internal::filter_node::remove_ref(), and tbb::interface6::filter_t< T, U >::root.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ internal::pipeline_proxy

template<typename T , typename U >
friend class internal::pipeline_proxy
friend

Definition at line 606 of file pipeline.h.

◆ make_filter

template<typename T , typename U >
template<typename T_ , typename U_ , typename Body >
filter_t<T_,U_> make_filter ( tbb::filter::mode  mode,
const Body &  body 
)
friend

Create a filter to participate in parallel_pipeline.

Definition at line 587 of file pipeline.h.

587  {
588  return new internal::filter_node_leaf<T,U,Body>(mode, body);
589 }

◆ operator&

template<typename T , typename U >
template<typename T_ , typename V_ , typename U_ >
filter_t<T_,U_> operator& ( const filter_t< T_, V_ > &  ,
const filter_t< V_, U_ > &   
)
friend

Member Data Documentation

◆ root


The documentation for this class was generated from the following file:
mode
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t mode
Definition: ittnotify_static.h:109
tbb::interface6::filter_t::filter_node
internal::filter_node filter_node
Definition: pipeline.h:601
tbb::interface6::filter_t::root
filter_node * root
Definition: pipeline.h:602
tbb::interface6::internal::filter_node::remove_ref
void remove_ref()
Decrement reference count and delete if it becomes zero.
Definition: pipeline.h:537
tbb::interface6::internal::filter_node::add_ref
void add_ref()
Increment reference count.
Definition: pipeline.h:535

Copyright © 2005-2020 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.