Home ⌂Doc Index ◂Up ▴
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 608 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 610 of file pipeline.h.

610  : root(root_) {
611  root->add_ref();
612  }
void add_ref()
Increment reference count.
Definition: pipeline.h:542
filter_node * root
Definition: pipeline.h:609

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 620 of file pipeline.h.

620 : root(NULL) {}
filter_node * root
Definition: pipeline.h:609

◆ 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 621 of file pipeline.h.

621  : root(rhs.root) {
622  if( root ) root->add_ref();
623  }
void add_ref()
Increment reference count.
Definition: pipeline.h:542
filter_node * root
Definition: pipeline.h:609

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 625 of file pipeline.h.

625  :
626  root( new internal::filter_node_leaf<T,U,Body>(mode, body) ) {
627  root->add_ref();
628  }
void add_ref()
Increment reference count.
Definition: pipeline.h:542
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
filter_node * root
Definition: pipeline.h:609

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 638 of file pipeline.h.

638  {
639  if( root ) root->remove_ref();
640  }
void remove_ref()
Decrement reference count and delete if it becomes zero.
Definition: pipeline.h:544
filter_node * root
Definition: pipeline.h:609

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 641 of file pipeline.h.

641  {
642  // Like operator= with filter_t() on right side.
643  if( root ) {
644  filter_node* old = root;
645  root = NULL;
646  old->remove_ref();
647  }
648  }
void remove_ref()
Decrement reference count and delete if it becomes zero.
Definition: pipeline.h:544
internal::filter_node filter_node
Definition: pipeline.h:608
filter_node * root
Definition: pipeline.h:609

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 630 of file pipeline.h.

630  {
631  // Order of operations below carefully chosen so that reference counts remain correct
632  // in unlikely event that remove_ref throws exception.
633  filter_node* old = root;
634  root = rhs.root;
635  if( root ) root->add_ref();
636  if( old ) old->remove_ref();
637  }
void add_ref()
Increment reference count.
Definition: pipeline.h:542
internal::filter_node filter_node
Definition: pipeline.h:608
filter_node * root
Definition: pipeline.h:609

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 613 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 594 of file pipeline.h.

594  {
595  return new internal::filter_node_leaf<T,U,Body>(mode, body);
596 }
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

◆ 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:

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.