Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::combinable< T > Class Template Reference

Thread-local storage with optional reduction. More...

#include <combinable.h>

Collaboration diagram for tbb::combinable< T >:

Public Member Functions

 combinable ()
 
template<typename finit >
 combinable (finit _finit)
 
 ~combinable ()
 destructor More...
 
 combinable (const combinable &other)
 
combinableoperator= (const combinable &other)
 
void clear ()
 
T & local ()
 
T & local (bool &exists)
 
template<typename combine_func_t >
combine (combine_func_t f_combine)
 
template<typename combine_func_t >
void combine_each (combine_func_t f_combine)
 

Private Types

typedef tbb::cache_aligned_allocator< T > my_alloc
 
typedef tbb::enumerable_thread_specific< T, my_alloc, ets_no_keymy_ets_type
 

Private Attributes

my_ets_type my_ets
 

Detailed Description

template<typename T>
class tbb::combinable< T >

Thread-local storage with optional reduction.

Definition at line 33 of file combinable.h.

Member Typedef Documentation

◆ my_alloc

template<typename T >
typedef tbb::cache_aligned_allocator<T> tbb::combinable< T >::my_alloc
private

Definition at line 36 of file combinable.h.

◆ my_ets_type

template<typename T >
typedef tbb::enumerable_thread_specific<T, my_alloc, ets_no_key> tbb::combinable< T >::my_ets_type
private

Definition at line 37 of file combinable.h.

Constructor & Destructor Documentation

◆ combinable() [1/3]

template<typename T >
tbb::combinable< T >::combinable ( )
inline

Definition at line 42 of file combinable.h.

42 { }

◆ combinable() [2/3]

template<typename T >
template<typename finit >
tbb::combinable< T >::combinable ( finit  _finit)
inlineexplicit

Definition at line 45 of file combinable.h.

45 : my_ets(_finit) { }

◆ ~combinable()

template<typename T >
tbb::combinable< T >::~combinable ( )
inline

destructor

Definition at line 48 of file combinable.h.

48 { }

◆ combinable() [3/3]

template<typename T >
tbb::combinable< T >::combinable ( const combinable< T > &  other)
inline

Definition at line 50 of file combinable.h.

50 : my_ets(other.my_ets) { }

Member Function Documentation

◆ clear()

template<typename T >
void tbb::combinable< T >::clear ( )
inline

Definition at line 68 of file combinable.h.

68 { my_ets.clear(); }

References tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >::clear(), and tbb::combinable< T >::my_ets.

Here is the call graph for this function:

◆ combine()

template<typename T >
template<typename combine_func_t >
T tbb::combinable< T >::combine ( combine_func_t  f_combine)
inline

Definition at line 76 of file combinable.h.

76 { return my_ets.combine(f_combine); }

References tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >::combine(), and tbb::combinable< T >::my_ets.

Here is the call graph for this function:

◆ combine_each()

template<typename T >
template<typename combine_func_t >
void tbb::combinable< T >::combine_each ( combine_func_t  f_combine)
inline

Definition at line 80 of file combinable.h.

80 { my_ets.combine_each(f_combine); }

References tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >::combine_each(), and tbb::combinable< T >::my_ets.

Here is the call graph for this function:

◆ local() [1/2]

template<typename T >
T& tbb::combinable< T >::local ( )
inline

Definition at line 70 of file combinable.h.

70 { return my_ets.local(); }

References tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >::local(), and tbb::combinable< T >::my_ets.

Here is the call graph for this function:

◆ local() [2/2]

template<typename T >
T& tbb::combinable< T >::local ( bool &  exists)
inline

Definition at line 72 of file combinable.h.

72 { return my_ets.local(exists); }

References tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >::local(), and tbb::combinable< T >::my_ets.

Here is the call graph for this function:

◆ operator=()

template<typename T >
combinable& tbb::combinable< T >::operator= ( const combinable< T > &  other)
inline

Definition at line 56 of file combinable.h.

56  {
57  my_ets = other.my_ets;
58  return *this;
59  }

References tbb::combinable< T >::my_ets.

Member Data Documentation

◆ my_ets


The documentation for this class was generated from the following file:
tbb::interface6::enumerable_thread_specific::local
reference local()
returns reference to local, discarding exists
Definition: enumerable_thread_specific.h:928
tbb::interface6::enumerable_thread_specific::combine
T combine(combine_func_t f_combine)
Definition: enumerable_thread_specific.h:1077
tbb::interface6::enumerable_thread_specific::combine_each
void combine_each(combine_func_t f_combine)
Definition: enumerable_thread_specific.h:1092
tbb::interface6::enumerable_thread_specific::clear
void clear()
Destroys local copies.
Definition: enumerable_thread_specific.h:963
tbb::combinable::my_ets
my_ets_type my_ets
Definition: combinable.h:38

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.