Home ⌂Doc Index ◂Up ▴
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)
 
 combinable (combinable &&other)
 
combinableoperator= (const combinable &other)
 
combinableoperator= (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/4]

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

Definition at line 42 of file combinable.h.

42 { }

◆ combinable() [2/4]

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) { }
my_ets_type my_ets
Definition: combinable.h:38

◆ ~combinable()

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

destructor

Definition at line 48 of file combinable.h.

48 { }

◆ combinable() [3/4]

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) { }
my_ets_type my_ets
Definition: combinable.h:38

◆ combinable() [4/4]

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

Definition at line 53 of file combinable.h.

53 : my_ets( std::move(other.my_ets)) { }
my_ets_type my_ets
Definition: combinable.h:38
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:319

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(); }
my_ets_type my_ets
Definition: combinable.h:38

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); }
my_ets_type my_ets
Definition: combinable.h:38

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); }
my_ets_type my_ets
Definition: combinable.h:38

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(); }
reference local()
returns reference to local, discarding exists
my_ets_type my_ets
Definition: combinable.h:38

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); }
reference local()
returns reference to local, discarding exists
my_ets_type my_ets
Definition: combinable.h:38

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=() [1/2]

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  }
my_ets_type my_ets
Definition: combinable.h:38

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

◆ operator=() [2/2]

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

Definition at line 62 of file combinable.h.

62  {
63  my_ets=std::move(other.my_ets);
64  return *this;
65  }
my_ets_type my_ets
Definition: combinable.h:38
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:319

References tbb::move(), and tbb::combinable< T >::my_ets.

Here is the call graph for this function:

Member Data Documentation

◆ my_ets


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.