Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
The enumerable_thread_specific container.
More...
#include <enumerable_thread_specific.h>
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 63 of file enumerable_thread_specific.h.
◆ allocator_type
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ array_allocator_type
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ const_iterator
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ const_range_type
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ difference_type
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ internal_collection_type
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ iterator
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ padded_allocator_type
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ padded_element
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ pointer
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ range_type
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ reference
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ size_type
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ value_type
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ enumerable_thread_specific() [1/5]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
Default constructor. Each local instance of T is default constructed.
Definition at line 885 of file enumerable_thread_specific.h.
886 internal::callback_leaf<T,internal::construct_by_default<T> >::make(0)
◆ enumerable_thread_specific() [2/5]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
template<typename Finit >
Constructor with initializer functor. Each local instance of T is constructed by T(finit()).
Definition at line 895 of file enumerable_thread_specific.h.
896 internal::callback_leaf<T,internal::construct_by_finit<T,Finit> >::make(
tbb::internal::move(finit) )
◆ enumerable_thread_specific() [3/5]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
Constructor with exemplar. Each local instance of T is copy-constructed from the exemplar.
Definition at line 900 of file enumerable_thread_specific.h.
901 internal::callback_leaf<T,internal::construct_by_exemplar<T> >::make( exemplar )
◆ ~enumerable_thread_specific()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ enumerable_thread_specific() [4/5]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ enumerable_thread_specific() [5/5]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
template<typename Alloc , ets_key_usage_type Cachetype>
◆ begin() [1/2]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ begin() [2/2]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ clear()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ combine()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
template<typename combine_func_t >
◆ combine_each()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
template<typename combine_func_t >
◆ create_array()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ create_local()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ create_local_by_copy()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ empty()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ end() [1/2]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ end() [2/2]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ free_array()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ internal_copy()
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>
◆ internal_swap()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ local() [1/2]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ local() [2/2]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
Returns reference to calling thread's local copy, creating one if necessary.
Definition at line 934 of file enumerable_thread_specific.h.
935 void* ptr = this->table_lookup(exists);
◆ operator=() [1/2]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ operator=() [2/2]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
template<typename Alloc , ets_key_usage_type Cachetype>
◆ range() [1/2]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ range() [2/2]
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ size()
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ enumerable_thread_specific
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
template<typename U , typename A , ets_key_usage_type C>
◆ const_pointer
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ const_reference
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ my_construct_callback
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
◆ my_locals
template<typename T , typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key>
The documentation for this class was generated from the following file:
Strips its template type argument from cv- and ref-qualifiers.
reference local()
returns reference to local, discarding exists
void internal_copy(const enumerable_thread_specific< T, A2, C2 > &other)
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
void swap(atomic< T > &lhs, atomic< T > &rhs)
void reserve(size_type n)
Allocate enough space to grow to size n without having to allocate more memory later.
size_type size() const
Return size of vector. It may include elements under construction.
internal::enumerable_thread_specific_iterator< internal_collection_type, const value_type > const_iterator
bool empty() const
Return false if vector is not empty or has elements under construction at least.
iterator end()
end iterator
#define __TBB_STATIC_ASSERT(condition, msg)
internal::callback_base< T > * my_construct_callback
void move(tbb_thread &t1, tbb_thread &t2)
void clear()
Clear container while keeping memory allocated.
iterator grow_by(size_type delta)
Grow by "delta" elements.
static void * create_local_by_copy(internal::ets_base< ETS_key_type > &base, void *p)
void clear()
Destroys local copies.
generic_range_type< iterator > range_type
internal::enumerable_thread_specific_iterator< internal_collection_type, value_type > iterator
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 p
Allocator::template rebind< uintptr_t >::other array_allocator_type
void swap(concurrent_hash_map< Key, T, HashCompare, A > &a, concurrent_hash_map< Key, T, HashCompare, A > &b)
iterator begin()
begin iterator
internal::padded< internal::ets_element< T > > padded_element
friend class enumerable_thread_specific
internal_collection_type my_locals
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
generic_range_type< const_iterator > const_range_type
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.