|
| enumerable_thread_specific () |
| Default constructor. Each local instance of T is default constructed. More...
|
|
template<typename Finit , typename = typename internal::enable_if<internal::is_callable_no_args<typename internal::strip<Finit>::type>::value>::type> |
| enumerable_thread_specific (Finit finit) |
| Constructor with initializer functor. Each local instance of T is constructed by T(finit()). More...
|
|
| enumerable_thread_specific (const T &exemplar) |
| Constructor with exemplar. Each local instance of T is copy-constructed from the exemplar. More...
|
|
| enumerable_thread_specific (T &&exemplar) |
|
template<typename P1 , typename... P, typename = typename internal::enable_if<!internal::is_callable_no_args<typename internal::strip<P1>::type>::value && !internal::is_compatible_ets<T, typename internal::strip<P1>::type>::value && !internal::is_same_type<T, typename internal::strip<P1>::type>::value >::type> |
| enumerable_thread_specific (P1 &&arg1, P &&... args) |
| Variadic constructor with initializer arguments. Each local instance of T is constructed by T(args...) More...
|
|
| ~enumerable_thread_specific () |
| Destructor. More...
|
|
reference | local () |
| returns reference to local, discarding exists More...
|
|
reference | local (bool &exists) |
| Returns reference to calling thread's local copy, creating one if necessary. More...
|
|
size_type | size () const |
| Get the number of local copies. More...
|
|
bool | empty () const |
| true if there have been no local copies created More...
|
|
iterator | begin () |
| begin iterator More...
|
|
iterator | end () |
| end iterator More...
|
|
const_iterator | begin () const |
| begin const iterator More...
|
|
const_iterator | end () const |
| end const iterator More...
|
|
range_type | range (size_t grainsize=1) |
| Get range for parallel algorithms. More...
|
|
const_range_type | range (size_t grainsize=1) const |
| Get const range for parallel algorithms. More...
|
|
void | clear () |
| Destroys local copies. More...
|
|
| enumerable_thread_specific (const enumerable_thread_specific &other) |
|
template<typename Alloc , ets_key_usage_type Cachetype> |
| enumerable_thread_specific (const enumerable_thread_specific< T, Alloc, Cachetype > &other) |
|
| enumerable_thread_specific (enumerable_thread_specific &&other) |
|
template<typename Alloc , ets_key_usage_type Cachetype> |
| enumerable_thread_specific (enumerable_thread_specific< T, Alloc, Cachetype > &&other) |
|
enumerable_thread_specific & | operator= (const enumerable_thread_specific &other) |
|
template<typename Alloc , ets_key_usage_type Cachetype> |
enumerable_thread_specific & | operator= (const enumerable_thread_specific< T, Alloc, Cachetype > &other) |
|
enumerable_thread_specific & | operator= (enumerable_thread_specific &&other) |
|
template<typename Alloc , ets_key_usage_type Cachetype> |
enumerable_thread_specific & | operator= (enumerable_thread_specific< T, Alloc, Cachetype > &&other) |
|
template<typename combine_func_t > |
T | combine (combine_func_t f_combine) |
|
template<typename combine_func_t > |
void | combine_each (combine_func_t f_combine) |
|
template<typename T, typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
class tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >
The enumerable_thread_specific container.
enumerable_thread_specific has the following properties:
- thread-local copies are lazily created, with default, exemplar or function initialization.
- thread-local copies do not move (during lifetime, and excepting clear()) so the address of a copy is invariant.
- the contained objects need not have operator=() defined if combine is not used.
- enumerable_thread_specific containers may be copy-constructed or assigned.
- thread-local copies can be managed by hash-table, or can be accessed via TLS storage for speed.
- outside of parallel contexts, the contents of all thread-local copies are accessible by iterator or using combine or combine_each methods
- Segmented iterator
- When the thread-local objects are containers with input_iterators defined, a segmented iterator may be used to iterate over all the elements of all thread-local copies.
- combine and combine_each
- Both methods are defined for enumerable_thread_specific.
- combine() requires the type T have operator=() defined.
- neither method modifies the contents of the object (though there is no guarantee that the applied methods do not modify the object.)
- Both are evaluated in serial context (the methods are assumed to be non-benign.)
Definition at line 799 of file enumerable_thread_specific.h.
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
template<typename P1 , typename... P, typename = typename internal::enable_if<!internal::is_callable_no_args<typename internal::strip<P1>::type>::value && !internal::is_compatible_ets<T, typename internal::strip<P1>::type>::value && !internal::is_same_type<T, typename internal::strip<P1>::type>::value >::type>
Variadic constructor with initializer arguments. Each local instance of T is constructed by T(args...)
Definition at line 915 of file enumerable_thread_specific.h.
916 internal::callback_leaf<T,internal::construct_by_args<T,P1,P...> >::make( std::forward<P1>(arg1), std::forward<P>(args)... )
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
template<typename A2 , ets_key_usage_type C2>
Definition at line 972 of file enumerable_thread_specific.h.
973 #if __TBB_ETS_USE_CPP11 && TBB_USE_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
#define __TBB_STATIC_ASSERT(condition, msg)
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 unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
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 unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
void reserve(size_type n)
Allocate enough space to grow to size n without having to allocate more memory later.
static void * create_local_by_copy(internal::ets_base< ETS_key_type > &base, void *p)
Strips its template type argument from cv- and ref-qualifiers.
References __TBB_ASSERT, __TBB_STATIC_ASSERT, tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >::my_construct_callback, tbb::concurrent_vector< T, A >::reserve(), tbb::concurrent_vector< T, A >::size(), tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >::size(), type, and value.
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
template<typename A2 , ets_key_usage_type C2>