Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::internal Namespace Reference

Identifiers declared inside namespace internal should never be used directly by client code. More...

Namespaces

 gcc_builtins
 
 icc_intrinsics_port
 
 msvc_inline_asm
 
 msvc_intrinsics
 
 rml
 

Classes

class  __TBB_InitOnce
 Class that supports TBB initialization. More...
 
class  affinity_helper
 
class  affinity_partitioner_base_v3
 Defines entry point for affinity partitioner into tbb run-time library. More...
 
struct  aligned_storage
 
struct  aligned_storage< value_type, 1 >
 
class  allocate_additional_child_of_proxy
 
class  allocate_child_proxy
 
class  allocate_continuation_proxy
 
class  allocate_root_proxy
 
class  allocate_root_with_context_proxy
 
class  allocator_base
 
struct  allocator_rebind
 
struct  allocator_traits
 
struct  allocator_type
 Class for determining type of std::allocator<T>::value_type. More...
 
class  allowed_parallelism_control
 
class  arena
 
struct  arena_base
 The structure of an arena, except the array of slots. More...
 
struct  arena_slot
 
struct  arena_slot_line1
 
struct  arena_slot_line2
 
class  atomic_backoff
 Class that implements exponential backoff. More...
 
struct  atomic_impl
 Base class that provides basic functionality for atomic<T> without fetch_and_add. More...
 
struct  atomic_impl_with_arithmetic
 Base class that provides basic functionality for atomic<T> with fetch_and_add. More...
 
struct  atomic_load_store_traits
 
struct  atomic_rep
 
struct  atomic_rep< 1 >
 
struct  atomic_rep< 2 >
 
struct  atomic_rep< 4 >
 
struct  atomic_rep< 8 >
 
struct  atomic_selector
 
struct  atomic_selector< 1 >
 
struct  atomic_selector< 2 >
 
struct  atomic_selector< 4 >
 
struct  atomic_selector< 8 >
 
struct  atomic_traits
 
class  auto_empty_task
 Smart holder for the empty task class with automatic destruction. More...
 
class  basic_tls
 Basic cross-platform wrapper class for TLS operations. More...
 
class  binary_semaphore
 binary_semaphore for concurrent monitor More...
 
class  blocked_rangeNd_impl
 
struct  bool_constant
 
class  circular_doubly_linked_list_with_sentinel
 Circular doubly-linked list with sentinel. More...
 
class  concurrent_monitor
 concurrent_monitor More...
 
class  concurrent_queue_base_v3
 For internal use only. More...
 
class  concurrent_queue_base_v8
 For internal use only. More...
 
class  concurrent_queue_iterator
 Meets requirements of a forward iterator for STL. More...
 
class  concurrent_queue_iterator_base_v3
 Type-independent portion of concurrent_queue_iterator. More...
 
class  concurrent_queue_iterator_rep
 
class  concurrent_queue_rep
 Internal representation of a ConcurrentQueue. More...
 
class  concurrent_vector_base_v3
 Base class of concurrent vector implementation. More...
 
struct  context_guard_helper
 
struct  context_list_node_t
 
class  control_storage
 
class  cpu_ctl_env
 
struct  cpu_ctl_env_space
 
class  critical_section_v4
 
class  custom_scheduler
 A scheduler with a customized evaluation loop. More...
 
struct  DefaultSchedulerTraits
 Traits classes for scheduler. More...
 
struct  enable_if
 Enables one or the other code branches. More...
 
struct  enable_if< true, T >
 
class  fast_reverse_vector
 Vector that grows without reallocations, and stores items in the reverse order. More...
 
class  FastRandom
 A fast random number generator. More...
 
struct  fgt_internal_input_alias_helper
 
struct  fgt_internal_output_alias_helper
 
class  final_sum
 Performs final scan for a leaf. More...
 
class  finish_scan
 Combine partial results. More...
 
class  function_invoker
 
class  function_task
 
class  generic_scheduler
 Work stealing task scheduler. More...
 
class  governor
 The class handles access to the single instance of market, and to TLS to keep scheduler instances. More...
 
struct  hash_map_segment_base
 
class  index_sequence
 
class  input_buffer
 A buffer of input items for a filter. More...
 
struct  int_to_type
 Utility helper structure to ease overload resolution. More...
 
struct  IntelSchedulerTraits
 
class  intrusive_list
 Double linked list of items of type T that is derived from intrusive_list_node class. More...
 
class  intrusive_list_base
 List of element of type T, where T is derived from intrusive_list_node. More...
 
struct  intrusive_list_node
 Data structure to be inherited by the types that can form intrusive lists. More...
 
struct  is_ref
 
struct  is_ref< U & >
 
struct  is_same_type
 Detects whether two given types are the same. More...
 
struct  is_same_type< W, W >
 
class  lambda_reduce_body
 Auxiliary class for parallel_reduce; for internal use only. More...
 
class  lambda_scan_body
 
struct  lane_selector_base
 
struct  machine_load_store
 
struct  machine_load_store_relaxed
 
struct  machine_load_store_seq_cst
 
class  mail_inbox
 Class representing source of mail. More...
 
class  mail_outbox
 Class representing where mail is put. More...
 
struct  make_index_sequence_impl
 
struct  make_index_sequence_impl< 0, S... >
 
class  market
 
class  memptr_intrusive_list
 Double linked list of items of type T containing a member of type intrusive_list_node. More...
 
struct  micro_queue
 A queue using simple locking. More...
 
class  micro_queue_pop_finalizer
 
class  mutex_copy_deprecated_and_disabled
 
class  nested_arena_context
 
class  no_assign
 Base class for types that should not be assigned. More...
 
class  no_copy
 Base class for types that should not be copied or assigned. More...
 
struct  padded
 Pads type T to fill out to a multiple of cache line size. More...
 
struct  padded_base
 
struct  padded_base< T, S, 0 >
 
class  parallel_for_body
 Calls the function with values from range [begin, end) with a step provided. More...
 
class  parallel_for_each_body_do
 
class  parallel_for_each_body_for
 
struct  parallel_for_each_impl
 
struct  parallel_for_each_impl< Iterator, Function, std::random_access_iterator_tag >
 
class  parallel_invoke_cleaner
 
class  parallel_invoke_helper
 
class  partition_type_base
 Provides backward-compatible methods for partition objects without affinity. More...
 
class  pipeline_cleaner
 
class  pipeline_root_task
 
struct  preceding_lane_selector
 
struct  predicate_leq
 
struct  queue_and_mutex
 Essentially, this is just a pair of a queue and a mutex to protect the queue. More...
 
struct  random_lane_selector
 
struct  reverse
 
class  scheduler
 
struct  scheduler_properties
 Bit-field representing properties of a sheduler. More...
 
struct  scheduler_state
 
struct  select_size_t_constant
 A template to select either 32-bit or 64-bit constant as compile time, depending on machine word size. More...
 
class  semaphore
 Edsger Dijkstra's counting semaphore. More...
 
class  spawner
 
class  stack_size_control
 
class  stage_task
 
class  start_scan
 Initial task to split the work. More...
 
struct  STATIC_ASSERTION_FAILED
 
struct  STATIC_ASSERTION_FAILED< false >
 
struct  stored_pack
 Allows to store a function parameter pack as a variable and later pass it to another function. More...
 
struct  stored_pack< T, Types... >
 
struct  stored_pack<>
 
struct  strip
 Strips its template type argument from cv- and ref-qualifiers. More...
 
struct  strip< const T & >
 
struct  strip< const T && >
 
struct  strip< const T >
 
struct  strip< const T(&)[N]>
 
struct  strip< const volatile T & >
 
struct  strip< const volatile T && >
 
struct  strip< const volatile T >
 
struct  strip< const volatile T(&)[N]>
 
struct  strip< T & >
 
struct  strip< T && >
 
struct  strip< T(&)()>
 Specialization for function pointers. More...
 
struct  strip< T(&)[N]>
 Specialization for arrays converts to a corresponding pointer. More...
 
struct  strip< volatile T & >
 
struct  strip< volatile T && >
 
struct  strip< volatile T >
 
struct  strip< volatile T(&)[N]>
 
struct  subsequent_lane_selector
 
class  sum_node
 Split work to be done in the scan. More...
 
struct  supports_impl
 
struct  supports_impl< T, typename void_t< Checks< T >... >::type, Checks... >
 
class  task_group_base
 
class  task_handle_task
 
struct  task_info
 This structure is used to store task information in a input buffer. More...
 
class  task_prefix
 Memory prefix to a task object. More...
 
struct  task_proxy
 
class  task_scheduler_observer_v3
 
class  task_stream
 The container for "fairness-oriented" aka "enqueued" tasks. More...
 
class  task_stream_accessor
 
class  task_stream_accessor< back_nonnull_accessor >
 
class  task_stream_base
 
class  tbb_exception_ptr
 Exception container that preserves the exact copy of the original exception. More...
 
class  tbb_thread_v3
 Versioned thread class. More...
 
struct  thread_closure_0
 
struct  thread_closure_1
 Structure used to pass user function with 1 argument to thread. More...
 
struct  thread_closure_2
 
struct  thread_closure_base
 
class  tls
 More advanced TLS support template class. More...
 
class  tls< T * >
 
struct  type_with_alignment
 
struct  type_with_alignment< 1 >
 
struct  type_with_alignment< 16 >
 
struct  type_with_alignment< 2 >
 
struct  type_with_alignment< 32 >
 
struct  type_with_alignment< 4 >
 
struct  type_with_alignment< 64 >
 
struct  type_with_alignment< 8 >
 
class  unpadded_mail_outbox
 Internal representation of mail_outbox, without padding. More...
 
class  vector_iterator
 Meets requirements of a forward iterator for STL and a Value for a blocked_range.*/. More...
 
struct  version_tag_v3
 
struct  void_t
 std::void_t internal implementation (to avoid GCC < 4.7 "template aliases" absence) More...
 
class  while_group_task
 For internal use only. More...
 
class  while_iteration_task
 For internal use only. More...
 
class  while_task
 For internal use only. More...
 

Typedefs

typedef concurrent_vector_base_v3 concurrent_vector_base
 
typedef tbb::internal::true_type traits_true_type
 
typedef tbb::internal::false_type traits_false_type
 
typedef concurrent_queue_iterator_base_v3 concurrent_queue_iterator_base
 
template<typename T , template< typename > class... Checks>
using supports = typename supports_impl< T, void, Checks... >::type
 
template<std::size_t N>
using make_index_sequence = typename tbb::internal::make_index_sequence_impl< N >::type
 
typedef uint64_t machine_tsc_t
 
typedef enum tbb::internal::memory_order memory_order
 
typedef unsigned long Token
 
typedef long tokendiff_t
 
typedef intptr_t reference_count
 A reference count. More...
 
typedef unsigned short affinity_id
 An id as used for specifying affinity. More...
 
typedef intptr_t isolation_tag
 A tag for task isolation. More...
 
typedef version_tag_v3 version_tag
 
typedef bool_constant< true > true_type
 
typedef bool_constant< false > false_type
 
typedef pthread_t thread_id_type
 
typedef circular_doubly_linked_list_with_sentinel waitset_t
 
typedef circular_doubly_linked_list_with_sentinel::node_t waitset_node_t
 
typedef concurrent_queue_base_v3 concurrent_queue_base
 
typedef size_t ticket
 
typedef __TBB_SCHEDULER_MUTEX_TYPE scheduler_mutex_type
 Mutex type for global locks in the scheduler. More...
 
typedef uint32_t sem_count_t
 for performance reasons, we want specialized binary_semaphore More...
 
typedef uintptr_t population_t
 
typedef void(* tls_dtor_t) (void *)
 

Enumerations

enum  memory_order {
  memory_order_relaxed, memory_order_consume, memory_order_acquire, memory_order_release,
  memory_order_acq_rel, memory_order_seq_cst
}
 
enum  exception_id {
  eid_bad_alloc = 1, eid_bad_last_alloc, eid_nonpositive_step, eid_out_of_range,
  eid_segment_range_error, eid_index_range_error, eid_missing_wait, eid_invalid_multiple_scheduling,
  eid_improper_lock, eid_possible_deadlock, eid_operation_not_permitted, eid_condvar_wait_failed,
  eid_invalid_load_factor, eid_reserved, eid_invalid_swap, eid_reservation_length_error,
  eid_invalid_key, eid_user_abort, eid_reserved1, eid_bad_tagged_msg_cast,
  eid_max
}
 
enum  string_index { TBB_STRING_RESOURCE }
 
enum  itt_relation {
  __itt_relation_is_unknown = 0, __itt_relation_is_dependent_on, __itt_relation_is_sibling_of, __itt_relation_is_parent_of,
  __itt_relation_is_continuation_of, __itt_relation_is_child_of, __itt_relation_is_continued_by, __itt_relation_is_predecessor_to
}
 
enum  notify_type { prepare =0, cancel, acquired, releasing }
 
enum  itt_domain_enum { ITT_DOMAIN_FLOW =0, ITT_DOMAIN_MAIN =1, ITT_DOMAIN_ALGO =2, ITT_NUM_DOMAINS }
 
enum  task_extra_state {
  es_version_1_task = 0, es_version_3_task = 1, es_task_enqueued = 0x10, es_task_proxy = 0x20,
  es_ref_count_active = 0x40, es_task_is_stolen = 0x80
}
 Definitions for bits in task_prefix::extra_state. More...
 
enum  free_task_hint {
  no_hint =0, local_task =1, small_task =2, small_local_task =3,
  no_cache = 4, no_cache_small_task = no_cache | small_task
}
 Optimization hint to free_task that enables it omit unnecessary tests and code. More...
 
enum  task_stream_accessor_type { front_accessor = 0, back_nonnull_accessor }
 
enum  do_once_state { do_once_uninitialized = 0, do_once_pending, do_once_executed, initialization_complete = do_once_executed }
 One-time initialization states. More...
 

Functions

 __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES (full_fence)
 
 __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES (acquire)
 
 __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES (release)
 
 __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES (relaxed)
 
template<memory_semantics M, typename T >
void swap (atomic< T > &lhs, atomic< T > &rhs)
 
template<typename T >
atomic< T > & as_atomic (T &t)
 
size_t __TBB_EXPORTED_FUNC NFS_GetLineSize ()
 Cache/sector line size. More...
 
void *__TBB_EXPORTED_FUNC NFS_Allocate (size_t n_element, size_t element_size, void *hint)
 Allocate memory on cache/sector line boundary. More...
 
void __TBB_EXPORTED_FUNC NFS_Free (void *)
 Free memory allocated by NFS_Allocate. More...
 
template<typename T >
void handle_unconstructed_elements (T *array, size_t n_of_elements)
 Exception helper function. More...
 
void swap (concurrent_vector_base_v3::segment_t &lhs, concurrent_vector_base_v3::segment_t &rhs) __TBB_NOEXCEPT(true)
 
template<typename Container , typename T >
vector_iterator< Container, T > operator+ (ptrdiff_t offset, const vector_iterator< Container, T > &v)
 
template<typename Container , typename T , typename U >
bool operator== (const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
 
template<typename Container , typename T , typename U >
bool operator!= (const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
 
template<typename Container , typename T , typename U >
bool operator< (const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
 
template<typename Container , typename T , typename U >
bool operator> (const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
 
template<typename Container , typename T , typename U >
bool operator>= (const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
 
template<typename Container , typename T , typename U >
bool operator<= (const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
 
template<typename Container , typename T , typename U >
ptrdiff_t operator- (const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
 
template<typename MyAlloc , typename OtherAlloc >
void allocator_move_assignment (MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
 
template<typename MyAlloc , typename OtherAlloc >
void allocator_move_assignment (MyAlloc &, OtherAlloc &, traits_false_type)
 
template<typename MyAlloc , typename OtherAlloc >
void allocator_swap (MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
 
template<typename MyAlloc , typename OtherAlloc >
void allocator_swap (MyAlloc &, OtherAlloc &, traits_false_type)
 
template<typename C , typename T , typename U >
bool operator== (const concurrent_queue_iterator< C, T > &i, const concurrent_queue_iterator< C, U > &j)
 
template<typename C , typename T , typename U >
bool operator!= (const concurrent_queue_iterator< C, T > &i, const concurrent_queue_iterator< C, U > &j)
 
static void fgt_alias_port (void *, void *, bool)
 
static void fgt_composite (void *, void *)
 
static void fgt_graph (void *)
 
template<typename NodeType >
static void fgt_multioutput_node_desc (const NodeType *, const char *)
 
template<typename NodeType >
static void fgt_node_desc (const NodeType *, const char *)
 
static void fgt_graph_desc (void *, const char *)
 
static void fgt_body (void *, void *)
 
template<int N, typename PortsTuple >
static void fgt_multioutput_node (string_index, void *, void *, PortsTuple &)
 
template<int N, typename PortsTuple >
static void fgt_multioutput_node_with_body (string_index, void *, void *, PortsTuple &, void *)
 
template<int N, typename PortsTuple >
static void fgt_multiinput_node (string_index, void *, PortsTuple &, void *)
 
static void fgt_multiinput_multioutput_node (string_index, void *, void *)
 
static void fgt_node (string_index, void *, void *)
 
static void fgt_node (string_index, void *, void *, void *)
 
static void fgt_node (string_index, void *, void *, void *, void *)
 
static void fgt_node_with_body (string_index, void *, void *, void *)
 
static void fgt_node_with_body (string_index, void *, void *, void *, void *)
 
static void fgt_make_edge (void *, void *)
 
static void fgt_remove_edge (void *, void *)
 
static void fgt_begin_body (void *)
 
static void fgt_end_body (void *)
 
static void fgt_async_try_put_begin (void *, void *)
 
static void fgt_async_try_put_end (void *, void *)
 
static void fgt_async_reserve (void *, void *)
 
static void fgt_async_commit (void *, void *)
 
static void fgt_reserve_wait (void *)
 
static void fgt_release_wait (void *)
 
template<typename NodeType >
void fgt_multiinput_multioutput_node_desc (const NodeType *, const char *)
 
template<typename Container >
auto first (Container &c) -> decltype(begin(c))
 
template<typename Container >
auto first (const Container &c) -> decltype(begin(c))
 
template<typename Container >
auto last (Container &c) -> decltype(begin(c))
 
template<typename Container >
auto last (const Container &c) -> decltype(begin(c))
 
template<typename T , size_t size>
T * first (T(&arr) [size])
 
template<typename T , size_t size>
T * last (T(&arr) [size])
 
static void fgt_algorithm (string_index, void *, void *)
 
static void fgt_begin_algorithm (string_index, void *)
 
static void fgt_end_algorithm (void *)
 
static void fgt_alg_begin_body (string_index, void *, void *)
 
static void fgt_alg_end_body (void *)
 
template<typename F , typename Pack >
void call (F &&f, Pack &&p)
 Calls the given function with arguments taken from a stored_pack. More...
 
template<typename Ret , typename F , typename Pack >
Ret call_and_return (F &&f, Pack &&p)
 
template<typename... Types>
stored_pack< Types... > save_pack (Types &&... types)
 
 __TBB_MACHINE_DEFINE_ATOMICS (1, int8_t)
 
 __TBB_MACHINE_DEFINE_ATOMICS (2, int16_t)
 
 __TBB_MACHINE_DEFINE_ATOMICS (4, int32_t)
 
 __TBB_MACHINE_DEFINE_ATOMICS (8, int64_t)
 
namespace msvc_inline_asm static inline void pause (uintptr_t delay)
 
size_t __TBB_EXPORTED_FUNC get_initial_auto_partitioner_divisor ()
 
void make_critical (task &t)
 
bool is_critical (task &t)
 
void __TBB_EXPORTED_FUNC deallocate_via_handler_v3 (void *p)
 Deallocates memory using FreeHandler. More...
 
void *__TBB_EXPORTED_FUNC allocate_via_handler_v3 (size_t n)
 Allocates memory using MallocHandler. More...
 
bool __TBB_EXPORTED_FUNC is_malloc_used_v3 ()
 Returns true if standard malloc/free are used to work with memory. More...
 
void __TBB_EXPORTED_FUNC throw_bad_last_alloc_exception_v4 ()
 Obsolete. More...
 
void __TBB_EXPORTED_FUNC throw_exception_v4 (exception_id)
 Gathers all throw operators in one place. More...
 
void throw_exception (exception_id eid)
 Versionless convenience wrapper for throw_exception_v4() More...
 
template<typename T , typename U >
void spin_wait_while_eq (const volatile T &location, U value)
 Spin WHILE the value of the variable is equal to a given value. More...
 
template<typename T , typename U >
void spin_wait_until_eq (const volatile T &location, const U value)
 Spin UNTIL the value of the variable is equal to a given value. More...
 
template<typename predicate_type >
void spin_wait_while (predicate_type condition)
 
template<typename T >
__TBB_MaskedCompareAndSwap (volatile T *const ptr, const T value, const T comparand)
 
template<size_t S, typename T >
__TBB_CompareAndSwapGeneric (volatile void *ptr, T value, T comparand)
 
template<>
int8_t __TBB_CompareAndSwapGeneric< 1, int8_t > (volatile void *ptr, int8_t value, int8_t comparand)
 
template<>
int16_t __TBB_CompareAndSwapGeneric< 2, int16_t > (volatile void *ptr, int16_t value, int16_t comparand)
 
template<>
int32_t __TBB_CompareAndSwapGeneric< 4, int32_t > (volatile void *ptr, int32_t value, int32_t comparand)
 
template<>
int64_t __TBB_CompareAndSwapGeneric< 8, int64_t > (volatile void *ptr, int64_t value, int64_t comparand)
 
template<size_t S, typename T >
__TBB_FetchAndAddGeneric (volatile void *ptr, T addend)
 
template<size_t S, typename T >
__TBB_FetchAndStoreGeneric (volatile void *ptr, T value)
 
template<typename T >
__TBB_load_with_acquire (const volatile T &location)
 
template<typename T , typename V >
void __TBB_store_with_release (volatile T &location, V value)
 
void __TBB_store_with_release (volatile size_t &location, size_t value)
 Overload that exists solely to avoid /Wp64 warnings. More...
 
template<typename T >
__TBB_load_full_fence (const volatile T &location)
 
template<typename T , typename V >
void __TBB_store_full_fence (volatile T &location, V value)
 
void __TBB_store_full_fence (volatile size_t &location, size_t value)
 Overload that exists solely to avoid /Wp64 warnings. More...
 
template<typename T >
__TBB_load_relaxed (const volatile T &location)
 
template<typename T , typename V >
void __TBB_store_relaxed (volatile T &location, V value)
 
void __TBB_store_relaxed (volatile size_t &location, size_t value)
 Overload that exists solely to avoid /Wp64 warnings. More...
 
 __TBB_DefineTypeWithAlignment (8) __TBB_DefineTypeWithAlignment(16) __TBB_DefineTypeWithAlignment(32) __TBB_DefineTypeWithAlignment(64) typedef __TBB_machine_type_with_alignment_64 __TBB_machine_type_with_strictest_alignment
 
void __TBB_EXPORTED_FUNC call_itt_notify_v5 (int t, void *ptr)
 
void __TBB_EXPORTED_FUNC itt_store_pointer_with_release_v3 (void *dst, void *src)
 
void *__TBB_EXPORTED_FUNC itt_load_pointer_with_acquire_v3 (const void *src)
 
void *__TBB_EXPORTED_FUNC itt_load_pointer_v3 (const void *src)
 
void __TBB_EXPORTED_FUNC itt_make_task_group_v7 (itt_domain_enum domain, void *group, unsigned long long group_extra, void *parent, unsigned long long parent_extra, string_index name_index)
 
void __TBB_EXPORTED_FUNC itt_metadata_str_add_v7 (itt_domain_enum domain, void *addr, unsigned long long addr_extra, string_index key, const char *value)
 
void __TBB_EXPORTED_FUNC itt_relation_add_v7 (itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, itt_relation relation, void *addr1, unsigned long long addr1_extra)
 
void __TBB_EXPORTED_FUNC itt_task_begin_v7 (itt_domain_enum domain, void *task, unsigned long long task_extra, void *parent, unsigned long long parent_extra, string_index name_index)
 
void __TBB_EXPORTED_FUNC itt_task_end_v7 (itt_domain_enum domain)
 
void __TBB_EXPORTED_FUNC itt_region_begin_v9 (itt_domain_enum domain, void *region, unsigned long long region_extra, void *parent, unsigned long long parent_extra, string_index name_index)
 
void __TBB_EXPORTED_FUNC itt_region_end_v9 (itt_domain_enum domain, void *region, unsigned long long region_extra)
 
template<typename T , typename U >
void itt_store_word_with_release (tbb::atomic< T > &dst, U src)
 
template<typename T >
itt_load_word_with_acquire (const tbb::atomic< T > &src)
 
template<typename T >
void itt_store_word_with_release (T &dst, T src)
 
template<typename T >
itt_load_word_with_acquire (const T &src)
 
template<typename T >
void itt_hide_store_word (T &dst, T src)
 
template<typename T >
itt_hide_load_word (const T &src)
 
void call_itt_notify (notify_type, void *)
 
void itt_make_task_group (itt_domain_enum, void *, unsigned long long, void *, unsigned long long, string_index)
 
void itt_metadata_str_add (itt_domain_enum, void *, unsigned long long, string_index, const char *)
 
void itt_relation_add (itt_domain_enum, void *, unsigned long long, itt_relation, void *, unsigned long long)
 
void itt_task_begin (itt_domain_enum, void *, unsigned long long, void *, unsigned long long, string_index)
 
void itt_task_end (itt_domain_enum)
 
void itt_region_begin (itt_domain_enum, void *, unsigned long long, void *, unsigned long long, string_index)
 
void itt_region_end (itt_domain_enum, void *, unsigned long long)
 
void __TBB_EXPORTED_FUNC handle_perror (int error_code, const char *aux_info)
 Throws std::runtime_error with what() returning error_code description prefixed with aux_info. More...
 
bool __TBB_false ()
 
void __TBB_EXPORTED_FUNC runtime_warning (const char *format,...)
 Report a runtime warning. More...
 
template<typename T >
void poison_pointer (T *__TBB_atomic &)
 
template<typename T , typename U >
punned_cast (U *ptr)
 Cast between unrelated pointer types. More...
 
template<typename T >
bool is_aligned (T *pointer, uintptr_t alignment)
 A function to check if passed in pointer is aligned on a specific border. More...
 
template<typename integer_type >
bool is_power_of_two (integer_type arg)
 A function to check if passed integer is a power of 2. More...
 
template<typename argument_integer_type , typename divisor_integer_type >
argument_integer_type modulo_power_of_two (argument_integer_type arg, divisor_integer_type divisor)
 A function to compute arg modulo divisor where divisor is a power of 2. More...
 
template<typename argument_integer_type , typename power2_integer_type >
bool is_power_of_two_at_least (argument_integer_type arg, power2_integer_type power2)
 A function to determine if arg is a power of 2 at least as big as another power of 2. More...
 
template<typename T1 >
void suppress_unused_warning (const T1 &)
 Utility template function to prevent "unused" warnings by various compilers. More...
 
template<typename T1 , typename T2 >
void suppress_unused_warning (const T1 &, const T2 &)
 
template<typename T1 , typename T2 , typename T3 >
void suppress_unused_warning (const T1 &, const T2 &, const T3 &)
 
void *__TBB_EXPORTED_FUNC allocate_closure_v3 (size_t size)
 Allocate a closure. More...
 
void __TBB_EXPORTED_FUNC free_closure_v3 (void *)
 Free a closure allocated by allocate_closure_v3. More...
 
void __TBB_EXPORTED_FUNC move_v3 (tbb_thread_v3 &t1, tbb_thread_v3 &t2)
 
tbb_thread_v3::id __TBB_EXPORTED_FUNC thread_get_id_v3 ()
 
void __TBB_EXPORTED_FUNC thread_yield_v3 ()
 
void __TBB_EXPORTED_FUNC thread_sleep_v3 (const tick_count::interval_t &i)
 
bool operator== (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
bool operator!= (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
bool operator< (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
bool operator<= (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
bool operator> (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
bool operator>= (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
static bool occupy_slot (generic_scheduler *&slot, generic_scheduler &s)
 
static voidDummyMalloc (size_t size)
 Dummy routine used for first indirect call via MallocHandler. More...
 
static void DummyFree (void *ptr)
 Dummy routine used for first indirect call via FreeHandler. More...
 
static voiddummy_padded_allocate (size_t bytes, size_t alignment)
 Dummy routine used for first indirect call via padded_allocate_handler. More...
 
static void dummy_padded_free (void *ptr)
 Dummy routine used for first indirect call via padded_free_handler. More...
 
static voidpadded_allocate (size_t bytes, size_t alignment)
 
static void padded_free (void *p)
 
void initialize_handler_pointers ()
 Initialize the allocation/free handler pointers. More...
 
void initialize_cache_aligned_allocator ()
 Defined in cache_aligned_allocator.cpp. More...
 
int __TBB_load_ittnotify ()
 
static unsigned calc_workers_soft_limit (unsigned workers_soft_limit, unsigned workers_hard_limit)
 
generic_schedulerallocate_scheduler (market &m)
 
void Scheduler_OneTimeInitialization (bool itt_present)
 Defined in scheduler.cpp. More...
 
void reset_extra_state (task *t)
 
void assert_task_valid (const task *)
 
bool ConcurrentWaitsEnabled (task &t)
 
void prolonged_pause ()
 
void set_one_bit (population_t &dest, int pos)
 
void clear_one_bit (population_t &dest, int pos)
 
bool is_bit_set (population_t val, int pos)
 
static bool GetBoolEnvironmentVariable (const char *name)
 
void DoOneTimeInitializations ()
 Performs thread-safe lazy one-time general TBB initialization. More...
 
void itt_set_sync_name_v3 (void *obj, const tchar *name)
 
void fix_broken_rethrow ()
 
bool gcc_rethrow_exception_broken ()
 
void PrintVersion ()
 Prints TBB version information on stderr. More...
 
void PrintExtraVersionInfo (const char *category, const char *format,...)
 Prints arbitrary extra TBB version information on stderr. More...
 
void PrintRMLVersionInfo (void *arg, const char *server_info)
 A callback routine to print RML version information on stderr. More...
 
bool cpu_has_speculation ()
 check for transaction support. More...
 
int AvailableHwConcurrency ()
 Returns maximal parallelism level supported by the current OS configuration. More...
 
void handle_win_error (int error_code)
 Throws std::runtime_error with what() returning error_code description prefixed with aux_info. More...
 
template<typename T >
min (const T &val1, const T &val2)
 Utility template function returning lesser of the two values. More...
 
template<typename T >
max (const T &val1, const T &val2)
 Utility template function returning greater of the two values. More...
 
unsigned GetPrime (unsigned seed)
 
template<typename T1 , typename T2 , class Pred >
T1 atomic_update (tbb::atomic< T1 > &dst, T2 newValue, Pred compare)
 Atomically replaces value of dst with newValue if they satisfy condition of compare predicate. More...
 
template<typename F >
void atomic_do_once (const F &initializer, atomic< do_once_state > &state)
 One-time initialization function. More...
 
void run_initializer (void(*f)(), atomic< do_once_state > &state)
 
void run_initializer (bool(*f)(), atomic< do_once_state > &state)
 
void destroy_process_mask ()
 

Variables

static void *const vector_allocation_error_flag = reinterpret_cast<void*>(size_t(63))
 Bad allocation marker. More...
 
const isolation_tag no_isolation = 0
 
static const int priority_stride_v4 = INT_MAX / 4
 
static const int priority_critical = priority_stride_v4 * 3 + priority_stride_v4 / 3 * 2
 
const uintptr_t NUM_NOTIFY_TYPES = 4
 
const size_t NFS_MaxLineSize = 128
 Compile-time constant that is upper bound on cache line/sector size. More...
 
static void *(* MallocHandler )(size_t size) = &DummyMalloc
 Handler for memory allocation. More...
 
static void(* FreeHandler )(void *pointer) = &DummyFree
 Handler for memory deallocation. More...
 
static void *(* padded_allocate_handler )(size_t bytes, size_t alignment) = &dummy_padded_allocate
 Handler for padded memory allocation. More...
 
static void(* padded_free_handler )(void *p) = &dummy_padded_free
 Handler for padded memory deallocation. More...
 
static const dynamic_link_descriptor MallocLinkTable []
 Table describing how to link the handlers. More...
 
static tbb::atomic< do_once_stateinitialization_state
 
static size_t NFS_LineSize = 128
 
static voidstatic_invalid_page
 
generic_scheduler *(* AllocateSchedulerPtr )(market &)
 Pointer to the scheduler factory function. More...
 
static const intptr_t num_priority_levels = 1
 
const size_t task_alignment = 32
 Alignment for a task object. More...
 
const size_t task_prefix_reservation_size = ((sizeof(internal::task_prefix)-1)/task_alignment+1)*task_alignment
 Number of bytes reserved for a task prefix. More...
 
const population_t one = 1
 
static const char _pad [NFS_MaxLineSize - sizeof(int)] = {}
 Padding in order to prevent false sharing. More...
 
static __TBB_InitOnce __TBB_InitOnceHiddenInstance
 
static allowed_parallelism_control allowed_parallelism_ctl
 
static stack_size_control stack_size_ctl
 
static control_storagecontrols [] = {&allowed_parallelism_ctl, &stack_size_ctl}
 
static const char VersionString [] = "\0" TBB_VERSION_STRINGS
 
static bool PrintVersionFlag = false
 
const size_t MByte = 1024*1024
 
const size_t ThreadStackSize = (sizeof(uintptr_t) <= 4 ? 2 : 4 )*MByte
 

Detailed Description

Identifiers declared inside namespace internal should never be used directly by client code.

Typedef Documentation

◆ affinity_id

typedef unsigned short tbb::internal::affinity_id

An id as used for specifying affinity.

Definition at line 124 of file task.h.

◆ concurrent_queue_base

◆ concurrent_queue_iterator_base

◆ concurrent_vector_base

◆ false_type

Definition at line 473 of file tbb_stddef.h.

◆ isolation_tag

typedef intptr_t tbb::internal::isolation_tag

A tag for task isolation.

Definition at line 128 of file task.h.

◆ machine_tsc_t

typedef uint64_t tbb::internal::machine_tsc_t

Definition at line 57 of file gcc_ia32_common.h.

◆ make_index_sequence

template<std::size_t N>
using tbb::internal::make_index_sequence = typedef typename tbb::internal::make_index_sequence_impl<N>::type

Definition at line 196 of file _template_helpers.h.

◆ memory_order

◆ population_t

typedef uintptr_t tbb::internal::population_t

Definition at line 50 of file task_stream.h.

◆ reference_count

A reference count.

Should always be non-negative. A signed type is used so that underflow can be detected.

Definition at line 121 of file task.h.

◆ scheduler_mutex_type

Mutex type for global locks in the scheduler.

Definition at line 137 of file scheduler_common.h.

◆ sem_count_t

typedef uint32_t tbb::internal::sem_count_t

for performance reasons, we want specialized binary_semaphore

Definition at line 96 of file semaphore.h.

◆ supports

template<typename T , template< typename > class... Checks>
using tbb::internal::supports = typedef typename supports_impl<T, void, Checks...>::type

Definition at line 85 of file _template_helpers.h.

◆ thread_id_type

typedef pthread_t tbb::internal::thread_id_type

Definition at line 42 of file tbb_thread.h.

◆ ticket

typedef size_t tbb::internal::ticket

Definition at line 46 of file concurrent_queue.cpp.

◆ tls_dtor_t

typedef void(* tbb::internal::tls_dtor_t) (void *)

Definition at line 34 of file tls.h.

◆ Token

typedef unsigned long tbb::internal::Token

Definition at line 44 of file pipeline.h.

◆ tokendiff_t

Definition at line 45 of file pipeline.h.

◆ traits_false_type

◆ traits_true_type

Internal implementation of allocator traits, propagate_on_* use internal boolean_constant. In order to avoid code duplication, check what implementation of boolean constant will likely be passed.

Definition at line 46 of file _allocator_traits.h.

◆ true_type

Definition at line 472 of file tbb_stddef.h.

◆ version_tag

Definition at line 390 of file tbb_stddef.h.

◆ waitset_node_t

◆ waitset_t

Enumeration Type Documentation

◆ do_once_state

One-time initialization states.

Enumerator
do_once_uninitialized 

No execution attempts have been undertaken yet.

do_once_pending 

A thread is executing associated do-once routine.

do_once_executed 

Do-once routine has been executed.

initialization_complete 

Convenience alias.

Definition at line 194 of file tbb_misc.h.

194  {
199 };
Do-once routine has been executed.
Definition: tbb_misc.h:197
No execution attempts have been undertaken yet.
Definition: tbb_misc.h:195
A thread is executing associated do-once routine.
Definition: tbb_misc.h:196

◆ exception_id

Enumerator
eid_bad_alloc 
eid_bad_last_alloc 
eid_nonpositive_step 
eid_out_of_range 
eid_segment_range_error 
eid_index_range_error 
eid_missing_wait 
eid_invalid_multiple_scheduling 
eid_improper_lock 
eid_possible_deadlock 
eid_operation_not_permitted 
eid_condvar_wait_failed 
eid_invalid_load_factor 
eid_reserved 
eid_invalid_swap 
eid_reservation_length_error 
eid_invalid_key 
eid_user_abort 
eid_reserved1 
eid_bad_tagged_msg_cast 
eid_max 

The last enumerator tracks the number of defined IDs. It must remain the last one.

When adding new IDs, place them immediately before this comment (that is after all the existing IDs. NEVER insert new IDs between the existing ones.

Definition at line 68 of file tbb_exception.h.

68  {
69  eid_bad_alloc = 1,
82  eid_reserved, // free slot for backward compatibility, can be reused.
88 #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE
89  // This id is used only from inside the library and only for support of CPF functionality.
90  // So, if we drop the functionality, eid_reserved1 can be safely renamed and reused.
91  eid_blocking_thread_join_impossible = eid_reserved1,
92 #endif
95 
97  eid_max
98 };
The last enumerator tracks the number of defined IDs. It must remain the last one.
Definition: tbb_exception.h:97

◆ free_task_hint

Optimization hint to free_task that enables it omit unnecessary tests and code.

Enumerator
no_hint 

No hint.

local_task 

Task is known to have been allocated by this scheduler.

small_task 

Task is known to be a small task.

Task should be returned to the free list of some scheduler, possibly not this scheduler.

small_local_task 

Bitwise-OR of local_task and small_task.

Task should be returned to free list of this scheduler.

no_cache 

Disable caching for a small task.

no_cache_small_task 

Task is known to be a small task and must not be cached.

Definition at line 190 of file scheduler_common.h.

190  {
192  no_hint=0,
194  local_task=1,
196 
197  small_task=2,
199 
202  no_cache = 4,
205 };
Disable caching for a small task.
Task is known to have been allocated by this scheduler.
Task is known to be a small task and must not be cached.
Task is known to be a small task.
Bitwise-OR of local_task and small_task.

◆ itt_domain_enum

◆ itt_relation

Enumerator
__itt_relation_is_unknown 
__itt_relation_is_dependent_on 

"A is dependent on B" means that A cannot start until B completes

__itt_relation_is_sibling_of 

"A is sibling of B" means that A and B were created as a group

__itt_relation_is_parent_of 

"A is parent of B" means that A created B

__itt_relation_is_continuation_of 

"A is continuation of B" means that A assumes the dependencies of B

__itt_relation_is_child_of 

"A is child of B" means that A was created by B (inverse of is_parent_of)

__itt_relation_is_continued_by 

"A is continued by B" means that B assumes the dependencies of A (inverse of is_continuation_of)

__itt_relation_is_predecessor_to 

"A is predecessor to B" means that B cannot start until A completes (inverse of is_dependent_on)

Definition at line 35 of file tbb_profiling.h.

◆ memory_order

Enumerator
memory_order_relaxed 
memory_order_consume 
memory_order_acquire 
memory_order_release 
memory_order_acq_rel 
memory_order_seq_cst 

Definition at line 78 of file icc_generic.h.

◆ notify_type

◆ string_index

Enumerator
TBB_STRING_RESOURCE 

Definition at line 29 of file tbb_profiling.h.

29  {
30  #include "internal/_tbb_strings.h"
31  NUM_STRINGS
32  };

◆ task_extra_state

Definitions for bits in task_prefix::extra_state.

Enumerator
es_version_1_task 

Tag for v1 tasks (i.e. tasks in TBB 1.0 and 2.0)

es_version_3_task 

Tag for v3 tasks (i.e. tasks in TBB 2.1-2.2)

es_task_enqueued 

Tag for enqueued tasks.

es_task_proxy 

Tag for v3 task_proxy.

es_ref_count_active 

Set if ref_count might be changed by another thread. Used for debugging.

es_task_is_stolen 

Set if the task has been stolen.

Definition at line 166 of file scheduler_common.h.

166  {
168  es_version_1_task = 0,
170  es_version_3_task = 1,
171 #if __TBB_PREVIEW_CRITICAL_TASKS
172  es_task_critical = 0x8,
174 #endif
175  es_task_enqueued = 0x10,
178  es_task_proxy = 0x20,
180  es_ref_count_active = 0x40,
182  es_task_is_stolen = 0x80
183 };
Tag for v3 tasks (i.e. tasks in TBB 2.1-2.2)
Set if ref_count might be changed by another thread. Used for debugging.
Tag for v3 task_proxy.
Set if the task has been stolen.
Tag for v1 tasks (i.e. tasks in TBB 1.0 and 2.0)

◆ task_stream_accessor_type

Function Documentation

◆ __TBB_CompareAndSwapGeneric()

template<size_t S, typename T >
T tbb::internal::__TBB_CompareAndSwapGeneric ( volatile void ptr,
value,
comparand 
)
inline

◆ __TBB_CompareAndSwapGeneric< 1, int8_t >()

template<>
int8_t tbb::internal::__TBB_CompareAndSwapGeneric< 1, int8_t > ( volatile void ptr,
int8_t  value,
int8_t  comparand 
)
inline

Definition at line 480 of file tbb_machine.h.

480  {
481 #if __TBB_USE_GENERIC_PART_WORD_CAS
482  return __TBB_MaskedCompareAndSwap<int8_t>((volatile int8_t *)ptr,value,comparand);
483 #else
484  return __TBB_machine_cmpswp1(ptr,value,comparand);
485 #endif
486 }
__int8 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp1(volatile void *ptr, __int8 value, __int8 comparand)
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

References __TBB_machine_cmpswp1(), and value.

Here is the call graph for this function:

◆ __TBB_CompareAndSwapGeneric< 2, int16_t >()

template<>
int16_t tbb::internal::__TBB_CompareAndSwapGeneric< 2, int16_t > ( volatile void ptr,
int16_t  value,
int16_t  comparand 
)
inline

Definition at line 489 of file tbb_machine.h.

489  {
490 #if __TBB_USE_GENERIC_PART_WORD_CAS
491  return __TBB_MaskedCompareAndSwap<int16_t>((volatile int16_t *)ptr,value,comparand);
492 #else
493  return __TBB_machine_cmpswp2(ptr,value,comparand);
494 #endif
495 }
__int16 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp2(volatile void *ptr, __int16 value, __int16 comparand)
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

References __TBB_machine_cmpswp2(), and value.

Here is the call graph for this function:

◆ __TBB_CompareAndSwapGeneric< 4, int32_t >()

template<>
int32_t tbb::internal::__TBB_CompareAndSwapGeneric< 4, int32_t > ( volatile void ptr,
int32_t  value,
int32_t  comparand 
)
inline

Definition at line 498 of file tbb_machine.h.

498  {
499  // Cast shuts up /Wp64 warning
500  return (int32_t)__TBB_machine_cmpswp4(ptr,value,comparand);
501 }
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
#define __TBB_machine_cmpswp4
Definition: ibm_aix51.h:45

References __TBB_machine_cmpswp4, and value.

◆ __TBB_CompareAndSwapGeneric< 8, int64_t >()

template<>
int64_t tbb::internal::__TBB_CompareAndSwapGeneric< 8, int64_t > ( volatile void ptr,
int64_t  value,
int64_t  comparand 
)
inline

Definition at line 505 of file tbb_machine.h.

505  {
506  return __TBB_machine_cmpswp8(ptr,value,comparand);
507 }
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
#define __TBB_machine_cmpswp8
Definition: ibm_aix51.h:46

References __TBB_machine_cmpswp8, and value.

◆ __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES() [1/4]

tbb::internal::__TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES ( full_fence  )

◆ __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES() [2/4]

tbb::internal::__TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES ( acquire  )

◆ __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES() [3/4]

tbb::internal::__TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES ( release  )

◆ __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES() [4/4]

tbb::internal::__TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES ( relaxed  )

◆ __TBB_DefineTypeWithAlignment()

tbb::internal::__TBB_DefineTypeWithAlignment ( )

◆ __TBB_false()

bool tbb::internal::__TBB_false ( )
inline

Definition at line 286 of file tbb_stddef.h.

286 { return false; }

◆ __TBB_FetchAndAddGeneric()

template<size_t S, typename T >
T tbb::internal::__TBB_FetchAndAddGeneric ( volatile void ptr,
addend 
)
inline

Definition at line 511 of file tbb_machine.h.

511  {
512  T result;
513  for( atomic_backoff b;;b.pause() ) {
514  result = *reinterpret_cast<volatile T *>(ptr);
515  // __TBB_CompareAndSwapGeneric presumed to have full fence.
516  if( __TBB_CompareAndSwapGeneric<S,T> ( ptr, result+addend, result )==result )
517  break;
518  }
519  return result;
520 }

References tbb::internal::atomic_backoff::pause().

Here is the call graph for this function:

◆ __TBB_FetchAndStoreGeneric()

template<size_t S, typename T >
T tbb::internal::__TBB_FetchAndStoreGeneric ( volatile void ptr,
value 
)
inline

Definition at line 523 of file tbb_machine.h.

523  {
524  T result;
525  for( atomic_backoff b;;b.pause() ) {
526  result = *reinterpret_cast<volatile T *>(ptr);
527  // __TBB_CompareAndSwapGeneric presumed to have full fence.
528  if( __TBB_CompareAndSwapGeneric<S,T> ( ptr, value, result )==result )
529  break;
530  }
531  return result;
532 }
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

References tbb::internal::atomic_backoff::pause(), and value.

Here is the call graph for this function:

◆ __TBB_load_full_fence()

template<typename T >
T tbb::internal::__TBB_load_full_fence ( const volatile T &  location)
inline

Definition at line 726 of file tbb_machine.h.

726  {
727  return machine_load_store_seq_cst<T,sizeof(T)>::load( location );
728 }
T load(const atomic< T > &a)
Definition: atomic.h:521

References tbb::load().

Here is the call graph for this function:

◆ __TBB_load_ittnotify()

int tbb::internal::__TBB_load_ittnotify ( )

◆ __TBB_load_relaxed()

template<typename T >
T tbb::internal::__TBB_load_relaxed ( const volatile T &  location)
inline

Definition at line 739 of file tbb_machine.h.

739  {
740  return machine_load_store_relaxed<T,sizeof(T)>::load( const_cast<T&>(location) );
741 }
T load(const atomic< T > &a)
Definition: atomic.h:521

References tbb::load().

Referenced by tbb::internal::concurrent_monitor::abort_all_relaxed(), tbb::queuing_rw_mutex::scoped_lock::acquire(), tbb::internal::circular_doubly_linked_list_with_sentinel::add(), tbb::internal::generic_scheduler::cleanup_master(), tbb::internal::concurrent_monitor::commit_wait(), tbb::queuing_rw_mutex::scoped_lock::downgrade_to_reader(), tbb::internal::mail_outbox::empty(), tbb::internal::circular_doubly_linked_list_with_sentinel::flush_to(), tbb::internal::generic_scheduler::get_task(), tbb::internal::mail_outbox::internal_pop(), tbb::internal::arena::is_out_of_work(), tbb::internal::generic_scheduler::is_quiescent_local_task_pool_empty(), tbb::internal::generic_scheduler::is_quiescent_local_task_pool_reset(), tbb::internal::concurrent_monitor::notify_all_relaxed(), tbb::internal::concurrent_monitor::notify_one_relaxed(), tbb::internal::concurrent_monitor::notify_relaxed(), tbb::internal::generic_scheduler::prepare_task_pool(), tbb::internal::concurrent_monitor::prepare_wait(), tbb::internal::generic_scheduler::publish_task_pool(), tbb::queuing_rw_mutex::scoped_lock::release(), tbb::internal::circular_doubly_linked_list_with_sentinel::remove(), tbb::internal::generic_scheduler::steal_task_from(), and tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __TBB_load_with_acquire()

◆ __TBB_MACHINE_DEFINE_ATOMICS() [1/4]

tbb::internal::__TBB_MACHINE_DEFINE_ATOMICS ( ,
int8_t   
)

◆ __TBB_MACHINE_DEFINE_ATOMICS() [2/4]

tbb::internal::__TBB_MACHINE_DEFINE_ATOMICS ( ,
int16_t   
)

◆ __TBB_MACHINE_DEFINE_ATOMICS() [3/4]

tbb::internal::__TBB_MACHINE_DEFINE_ATOMICS ( ,
int32_t   
)

◆ __TBB_MACHINE_DEFINE_ATOMICS() [4/4]

tbb::internal::__TBB_MACHINE_DEFINE_ATOMICS ( ,
int64_t   
)

◆ __TBB_MaskedCompareAndSwap()

template<typename T >
T tbb::internal::__TBB_MaskedCompareAndSwap ( volatile T *const  ptr,
const T  value,
const T  comparand 
)
inline

Definition at line 436 of file tbb_machine.h.

436  {
437  struct endianness{ static bool is_big_endian(){
438  #if __TBB_ENDIANNESS==__TBB_ENDIAN_DETECT
439  const uint32_t probe = 0x03020100;
440  return (((const char*)(&probe))[0]==0x03);
441  #elif __TBB_ENDIANNESS==__TBB_ENDIAN_BIG || __TBB_ENDIANNESS==__TBB_ENDIAN_LITTLE
443  #else
444  #error Unexpected value of __TBB_ENDIANNESS
445  #endif
446  }};
447 
448  const uint32_t byte_offset = (uint32_t) ((uintptr_t)ptr & 0x3);
449  volatile uint32_t * const aligned_ptr = (uint32_t*)((uintptr_t)ptr - byte_offset );
450 
451  // location of T within uint32_t for a C++ shift operation
452  const uint32_t bits_to_shift = 8*(endianness::is_big_endian() ? (4 - sizeof(T) - (byte_offset)) : byte_offset);
453  const uint32_t mask = (((uint32_t)1<<(sizeof(T)*8)) - 1 )<<bits_to_shift;
454  // for signed T, any sign extension bits in cast value/comparand are immediately clipped by mask
455  const uint32_t shifted_comparand = ((uint32_t)comparand << bits_to_shift)&mask;
456  const uint32_t shifted_value = ((uint32_t)value << bits_to_shift)&mask;
457 
458  for( atomic_backoff b;;b.pause() ) {
459  const uint32_t surroundings = *aligned_ptr & ~mask ; // may have changed during the pause
460  const uint32_t big_comparand = surroundings | shifted_comparand ;
461  const uint32_t big_value = surroundings | shifted_value ;
462  // __TBB_machine_cmpswp4 presumed to have full fence.
463  // Cast shuts up /Wp64 warning
464  const uint32_t big_result = (uint32_t)__TBB_machine_cmpswp4( aligned_ptr, big_value, big_comparand );
465  if( big_result == big_comparand // CAS succeeded
466  || ((big_result ^ big_comparand) & mask) != 0) // CAS failed and the bits of interest have changed
467  {
468  return T((big_result & mask) >> bits_to_shift);
469  }
470  else continue; // CAS failed but the bits of interest were not changed
471  }
472 }
#define __TBB_ENDIAN_BIG
Definition: tbb_machine.h:188
#define __TBB_ENDIANNESS
Definition: tbb_machine.h:418
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 mask
#define __TBB_machine_cmpswp4
Definition: ibm_aix51.h:45

References __TBB_ENDIAN_BIG, __TBB_ENDIANNESS, __TBB_machine_cmpswp4, mask, tbb::internal::atomic_backoff::pause(), and value.

Here is the call graph for this function:

◆ __TBB_store_full_fence() [1/2]

template<typename T , typename V >
void tbb::internal::__TBB_store_full_fence ( volatile T &  location,
value 
)
inline

Definition at line 730 of file tbb_machine.h.

730  {
731  machine_load_store_seq_cst<T,sizeof(T)>::store( location, T(value) );
732 }
void store(atomic< T > &a, T value)
Definition: atomic.h:524
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

References tbb::store(), and value.

Here is the call graph for this function:

◆ __TBB_store_full_fence() [2/2]

void tbb::internal::__TBB_store_full_fence ( volatile size_t &  location,
size_t  value 
)
inline

Overload that exists solely to avoid /Wp64 warnings.

Definition at line 734 of file tbb_machine.h.

734  {
735  machine_load_store_seq_cst<size_t,sizeof(size_t)>::store( location, value );
736 }
void store(atomic< T > &a, T value)
Definition: atomic.h:524
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

References tbb::store(), and value.

Here is the call graph for this function:

◆ __TBB_store_relaxed() [1/2]

template<typename T , typename V >
void tbb::internal::__TBB_store_relaxed ( volatile T &  location,
value 
)
inline

Definition at line 743 of file tbb_machine.h.

743  {
744  machine_load_store_relaxed<T,sizeof(T)>::store( const_cast<T&>(location), T(value) );
745 }
void store(atomic< T > &a, T value)
Definition: atomic.h:524
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

References tbb::store(), and value.

Referenced by tbb::internal::concurrent_monitor::abort_all_relaxed(), tbb::queuing_rw_mutex::scoped_lock::acquire(), tbb::internal::circular_doubly_linked_list_with_sentinel::add(), tbb::internal::circular_doubly_linked_list_with_sentinel::clear(), tbb::internal::generic_scheduler::commit_relocated_tasks(), tbb::internal::concurrent_monitor::concurrent_monitor(), tbb::internal::circular_doubly_linked_list_with_sentinel::flush_to(), tbb::internal::generic_scheduler::get_task(), tbb::internal::generic_scheduler::leave_task_pool(), tbb::internal::concurrent_monitor::notify_all_relaxed(), tbb::internal::concurrent_monitor::notify_one_relaxed(), tbb::internal::concurrent_monitor::notify_relaxed(), tbb::internal::concurrent_monitor::prepare_wait(), tbb::internal::mail_outbox::push(), tbb::queuing_rw_mutex::scoped_lock::release(), tbb::internal::circular_doubly_linked_list_with_sentinel::remove(), tbb::internal::generic_scheduler::reset_task_pool_and_leave(), tbb::internal::generic_scheduler::steal_task_from(), tbb::queuing_rw_mutex::scoped_lock::try_acquire(), and tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __TBB_store_relaxed() [2/2]

void tbb::internal::__TBB_store_relaxed ( volatile size_t &  location,
size_t  value 
)
inline

Overload that exists solely to avoid /Wp64 warnings.

Definition at line 747 of file tbb_machine.h.

747  {
748  machine_load_store_relaxed<size_t,sizeof(size_t)>::store( const_cast<size_t&>(location), value );
749 }
void store(atomic< T > &a, T value)
Definition: atomic.h:524
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

References tbb::store(), and value.

Here is the call graph for this function:

◆ __TBB_store_with_release() [1/2]

template<typename T , typename V >
void tbb::internal::__TBB_store_with_release ( volatile T &  location,
value 
)
inline

Definition at line 717 of file tbb_machine.h.

717  {
718  machine_load_store<T,sizeof(T)>::store_with_release( location, T(value) );
719 }
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

References value.

Referenced by tbb::queuing_rw_mutex::scoped_lock::acquire(), tbb::internal::generic_scheduler::cleanup_master(), tbb::internal::generic_scheduler::commit_spawned_tasks(), tbb::queuing_rw_mutex::scoped_lock::downgrade_to_reader(), tbb::internal::generic_scheduler::get_task(), internal::indexer_node_base< InputTuple, OutputType, StructTypes >::handle_operations(), internal::reserving_port< T >::handle_operations(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::handle_operations(), tbb::interface5::concurrent_priority_queue< graph_task *, graph_task_comparator >::handle_operations(), internal::queueing_port< T >::handle_operations(), internal::key_matching_port< TraitsType >::handle_operations(), internal::join_node_FE< key_matching< K, KHash >, InputTuple, OutputTuple >::handle_operations(), internal::join_node_base< JP, InputTuple, OutputTuple >::handle_operations(), tbb::flow::interface10::queue_node< T, A >::internal_consume(), tbb::flow::interface10::priority_queue_node< T, Compare, A >::internal_consume(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_forward(), tbb::flow::interface10::buffer_node< T, A >::internal_forward_task_impl(), tbb::flow::interface10::queue_node< T, A >::internal_pop(), tbb::flow::interface10::priority_queue_node< T, Compare, A >::internal_pop(), tbb::flow::interface10::sequencer_node< T, A >::internal_push(), tbb::flow::interface10::priority_queue_node< T, Compare, A >::internal_push(), tbb::flow::interface10::buffer_node< T, A >::internal_release(), tbb::flow::interface10::priority_queue_node< T, Compare, A >::internal_release(), tbb::flow::interface10::queue_node< T, A >::internal_reserve(), tbb::flow::interface10::priority_queue_node< T, Compare, A >::internal_reserve(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_try_put_task(), itt_store_pointer_with_release_v3(), itt_store_word_with_release(), tbb::internal::generic_scheduler::nested_arena_exit(), tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::operator[](), tbb::internal::arena::process(), tbb::internal::generic_scheduler::publish_task_pool(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::rehash_bucket(), tbb::queuing_mutex::scoped_lock::release(), tbb::queuing_rw_mutex::scoped_lock::release(), tbb::queuing_rw_mutex::scoped_lock::release_internal_lock(), tbb::internal::generic_scheduler::release_task_pool(), tbb::interface6::internal::aggregator_generic< aggregated_operation_type >::start_handle_operations(), tbb::interface6::aggregator_ext< internal::basic_handler >::start_handle_operations(), tbb::internal::atomic_impl< tbb::interface9::global_control * >::store_with_release(), tbb::flow::interface10::internal::unfolded_join_node< 5, key_matching_port, OutputTuple, key_matching< K, KHash > >::unfolded_join_node(), tbb::flow::interface10::internal::unfolded_join_node< 6, key_matching_port, OutputTuple, key_matching< K, KHash > >::unfolded_join_node(), tbb::flow::interface10::internal::unfolded_join_node< 7, key_matching_port, OutputTuple, key_matching< K, KHash > >::unfolded_join_node(), tbb::internal::generic_scheduler::unlock_task_pool(), tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer(), and tbb::interface7::internal::delegated_task::~delegated_task().

Here is the caller graph for this function:

◆ __TBB_store_with_release() [2/2]

void tbb::internal::__TBB_store_with_release ( volatile size_t &  location,
size_t  value 
)
inline

Overload that exists solely to avoid /Wp64 warnings.

Definition at line 721 of file tbb_machine.h.

721  {
722  machine_load_store<size_t,sizeof(size_t)>::store_with_release( location, value );
723 }
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

References value.

◆ allocate_closure_v3()

void * tbb::internal::allocate_closure_v3 ( size_t  size)

Allocate a closure.

Definition at line 39 of file tbb_thread.cpp.

40 {
41  return allocate_via_handler_v3( size );
42 }
void *__TBB_EXPORTED_FUNC allocate_via_handler_v3(size_t n)
Allocates memory using MallocHandler.
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 size

References allocate_via_handler_v3(), and size.

Referenced by tbb::internal::thread_closure_base::operator new().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocate_scheduler()

generic_scheduler* tbb::internal::allocate_scheduler ( market m)
inline

Definition at line 41 of file scheduler.cpp.

41  {
42  return AllocateSchedulerPtr( m );
43 }
generic_scheduler *(* AllocateSchedulerPtr)(market &)
Pointer to the scheduler factory function.
Definition: tbb_main.cpp:78

References AllocateSchedulerPtr.

Referenced by tbb::internal::generic_scheduler::create_master(), and tbb::internal::generic_scheduler::create_worker().

Here is the caller graph for this function:

◆ allocate_via_handler_v3()

void *__TBB_EXPORTED_FUNC tbb::internal::allocate_via_handler_v3 ( size_t  n)

Allocates memory using MallocHandler.

The function uses scalable_malloc if scalable allocator is available and malloc if not

Definition at line 228 of file cache_aligned_allocator.cpp.

228  {
229  void* result = (*MallocHandler) (n);
230  if (!result) {
232  }
233  return result;
234 }
void throw_exception(exception_id eid)
Versionless convenience wrapper for throw_exception_v4()

References eid_bad_alloc, and throw_exception().

Referenced by tbb::tbb_allocator< T >::allocate(), allocate_closure_v3(), tbb::movable_exception< ExceptionData >::move(), tbb::interface5::reader_writer_lock::scoped_lock::operator new(), and tbb::interface5::reader_writer_lock::scoped_lock_read::operator new().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocator_move_assignment() [1/2]

template<typename MyAlloc , typename OtherAlloc >
void tbb::internal::allocator_move_assignment ( MyAlloc &  my_allocator,
OtherAlloc &  other_allocator,
traits_true_type   
)
inline

Move assignment implementation for allocator if propagate_on_container_move_assignment == true_type. Noop if pocma == false_type.

Definition at line 54 of file _allocator_traits.h.

54  {
55  my_allocator = std::move(other_allocator);
56 }
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:309

References tbb::move().

Referenced by tbb::concurrent_vector< padded_element, padded_allocator_type >::operator=(), and tbb::interface5::internal::node_handle_base< Key, Allocator >::operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocator_move_assignment() [2/2]

template<typename MyAlloc , typename OtherAlloc >
void tbb::internal::allocator_move_assignment ( MyAlloc &  ,
OtherAlloc &  ,
traits_false_type   
)
inline

Definition at line 58 of file _allocator_traits.h.

58 { /* NO MOVE */ }

◆ allocator_swap() [1/2]

template<typename MyAlloc , typename OtherAlloc >
void tbb::internal::allocator_swap ( MyAlloc &  my_allocator,
OtherAlloc &  other_allocator,
traits_true_type   
)
inline

Swap implementation for allocators if propagate_on_container_swap == true_type. Noop if pocs == false_type.

Definition at line 64 of file _allocator_traits.h.

64  {
65  using std::swap;
66  swap(my_allocator, other_allocator);
67 }
void swap(atomic< T > &lhs, atomic< T > &rhs)
Definition: atomic.h:539

References swap().

Referenced by tbb::concurrent_vector< padded_element, padded_allocator_type >::swap(), and tbb::interface5::internal::node_handle_base< Key, Allocator >::swap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocator_swap() [2/2]

template<typename MyAlloc , typename OtherAlloc >
void tbb::internal::allocator_swap ( MyAlloc &  ,
OtherAlloc &  ,
traits_false_type   
)
inline

Definition at line 69 of file _allocator_traits.h.

69 { /* NO SWAP */ }

◆ as_atomic()

◆ assert_task_valid()

void tbb::internal::assert_task_valid ( const task )
inline

◆ atomic_do_once()

template<typename F >
void tbb::internal::atomic_do_once ( const F &  initializer,
atomic< do_once_state > &  state 
)

One-time initialization function.

/param initializer Pointer to function without arguments The variant that returns bool is used for cases when initialization can fail and it is OK to continue execution, but the state should be reset so that the initialization attempt was repeated the next time. /param state Shared state associated with initializer that specifies its initialization state. Must be initially set to #uninitialized value (e.g. by means of default static zero initialization).

Definition at line 210 of file tbb_misc.h.

210  {
211  // tbb::atomic provides necessary acquire and release fences.
212  // The loop in the implementation is necessary to avoid race when thread T2
213  // that arrived in the middle of initialization attempt by another thread T1
214  // has just made initialization possible.
215  // In such a case T2 has to rely on T1 to initialize, but T1 may already be past
216  // the point where it can recognize the changed conditions.
217  while ( state != do_once_executed ) {
218  if( state == do_once_uninitialized ) {
219  if( state.compare_and_swap( do_once_pending, do_once_uninitialized ) == do_once_uninitialized ) {
220  run_initializer( initializer, state );
221  break;
222  }
223  }
225  }
226 }
Do-once routine has been executed.
Definition: tbb_misc.h:197
void run_initializer(bool(*f)(), atomic< do_once_state > &state)
Definition: tbb_misc.h:235
void spin_wait_while_eq(const volatile T &location, U value)
Spin WHILE the value of the variable is equal to a given value.
Definition: tbb_machine.h:395
No execution attempts have been undertaken yet.
Definition: tbb_misc.h:195
A thread is executing associated do-once routine.
Definition: tbb_misc.h:196

References tbb::internal::atomic_impl< T >::compare_and_swap(), do_once_executed, do_once_pending, do_once_uninitialized, run_initializer(), and spin_wait_while_eq().

Referenced by initialize_cache_aligned_allocator(), and tbb::internal::governor::one_time_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atomic_update()

template<typename T1 , typename T2 , class Pred >
T1 tbb::internal::atomic_update ( tbb::atomic< T1 > &  dst,
T2  newValue,
Pred  compare 
)

Atomically replaces value of dst with newValue if they satisfy condition of compare predicate.

Return value semantics is the same as for CAS.

Definition at line 183 of file tbb_misc.h.

183  {
184  T1 oldValue = dst;
185  while ( compare(oldValue, newValue) ) {
186  if ( dst.compare_and_swap((T1)newValue, oldValue) == oldValue )
187  break;
188  oldValue = dst;
189  }
190  return oldValue;
191 }
value_type compare_and_swap(value_type value, value_type comparand)
Definition: atomic.h:289

References tbb::internal::atomic_impl< T >::compare_and_swap().

Referenced by tbb::internal::arena::is_out_of_work(), and tbb::internal::arena::occupy_free_slot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AvailableHwConcurrency()

int tbb::internal::AvailableHwConcurrency ( )

Returns maximal parallelism level supported by the current OS configuration.

Referenced by tbb::internal::governor::default_num_threads().

Here is the caller graph for this function:

◆ calc_workers_soft_limit()

static unsigned tbb::internal::calc_workers_soft_limit ( unsigned  workers_soft_limit,
unsigned  workers_hard_limit 
)
static

Definition at line 90 of file market.cpp.

90  {
91  if( int soft_limit = market::app_parallelism_limit() )
92  workers_soft_limit = soft_limit-1;
93  else // if user set no limits (yet), use market's parameter
94  workers_soft_limit = max( governor::default_num_threads() - 1, workers_soft_limit );
95  if( workers_soft_limit >= workers_hard_limit )
96  workers_soft_limit = workers_hard_limit-1;
97  return workers_soft_limit;
98 }
T max(const T &val1, const T &val2)
Utility template function returning greater of the two values.
Definition: tbb_misc.h:116

References tbb::internal::market::app_parallelism_limit(), tbb::internal::governor::default_num_threads(), and max().

Referenced by tbb::internal::market::global_market().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ call()

template<typename F , typename Pack >
void tbb::internal::call ( F &&  f,
Pack &&  p 
)

Calls the given function with arguments taken from a stored_pack.

Definition at line 162 of file _template_helpers.h.

162  {
163  strip<Pack>::type::template call<void>( std::forward<F>(f), std::forward<Pack>(p) );
164 }
void const char const char int ITT_FORMAT __itt_group_sync p

References p.

Referenced by streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::enqueue(), and streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::send().

Here is the caller graph for this function:

◆ call_and_return()

template<typename Ret , typename F , typename Pack >
Ret tbb::internal::call_and_return ( F &&  f,
Pack &&  p 
)

Definition at line 167 of file _template_helpers.h.

167  {
168  return strip<Pack>::type::template call<Ret>( std::forward<F>(f), std::forward<Pack>(p) );
169 }
void const char const char int ITT_FORMAT __itt_group_sync p

References p.

◆ call_itt_notify()

◆ call_itt_notify_v5()

void tbb::internal::call_itt_notify_v5 ( int  t,
void ptr 
)

Definition at line 293 of file tbb_main.cpp.

293 {}

◆ clear_one_bit()

void tbb::internal::clear_one_bit ( population_t dest,
int  pos 
)
inline

Definition at line 59 of file task_stream.h.

59  {
60  __TBB_ASSERT( pos>=0, NULL );
61  __TBB_ASSERT( pos<int(sizeof(population_t)*CHAR_BIT), NULL );
62  __TBB_AtomicAND( &dest, ~(one<<pos) );
63 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void __TBB_AtomicAND(volatile void *operand, uintptr_t addend)
Definition: tbb_machine.h:892
uintptr_t population_t
Definition: task_stream.h:50
const population_t one
Definition: task_stream.h:51

References __TBB_ASSERT, __TBB_AtomicAND(), and one.

Referenced by tbb::internal::task_stream< num_priority_levels >::drain(), tbb::internal::task_stream< num_priority_levels >::pop(), tbb::internal::task_stream< num_priority_levels >::pop_specific(), and tbb::internal::task_stream< num_priority_levels >::try_pop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConcurrentWaitsEnabled()

bool tbb::internal::ConcurrentWaitsEnabled ( task t)
inline

Definition at line 296 of file scheduler_common.h.

296 { return false; }

Referenced by tbb::internal::custom_scheduler< SchedulerTraits >::local_wait_for_all().

Here is the caller graph for this function:

◆ cpu_has_speculation()

bool tbb::internal::cpu_has_speculation ( )

check for transaction support.

Definition at line 221 of file tbb_misc.cpp.

221  {
222 #if __TBB_TSX_AVAILABLE
223 #if (__INTEL_COMPILER || __GNUC__ || _MSC_VER || __SUNPRO_CC)
224  bool result = false;
225  const int rtm_ebx_mask = 1<<11;
226 #if _MSC_VER
227  int info[4] = {0,0,0,0};
228  const int reg_ebx = 1;
229  __cpuidex(info, 7, 0);
230  result = (info[reg_ebx] & rtm_ebx_mask)!=0;
231 #elif __GNUC__ || __SUNPRO_CC
232  int32_t reg_ebx = 0;
233  int32_t reg_eax = 7;
234  int32_t reg_ecx = 0;
235  __asm__ __volatile__ ( "movl %%ebx, %%esi\n"
236  "cpuid\n"
237  "movl %%ebx, %0\n"
238  "movl %%esi, %%ebx\n"
239  : "=a"(reg_ebx) : "0" (reg_eax), "c" (reg_ecx) : "esi",
240 #if __TBB_x86_64
241  "ebx",
242 #endif
243  "edx"
244  );
245  result = (reg_ebx & rtm_ebx_mask)!=0 ;
246 #endif
247  return result;
248 #else
249  #error Speculation detection not enabled for compiler
250 #endif /* __INTEL_COMPILER || __GNUC__ || _MSC_VER */
251 #else /* __TBB_TSX_AVAILABLE */
252  return false;
253 #endif /* __TBB_TSX_AVAILABLE */
254 }

Referenced by tbb::internal::governor::acquire_resources().

Here is the caller graph for this function:

◆ deallocate_via_handler_v3()

void __TBB_EXPORTED_FUNC tbb::internal::deallocate_via_handler_v3 ( void p)

Deallocates memory using FreeHandler.

The function uses scalable_free if scalable allocator is available and free if not

Definition at line 236 of file cache_aligned_allocator.cpp.

236  {
237  if( p ) {
238  (*FreeHandler)( p );
239  }
240 }
void const char const char int ITT_FORMAT __itt_group_sync p

References p.

Referenced by tbb::tbb_allocator< T >::deallocate(), tbb::movable_exception< ExceptionData >::destroy(), free_closure_v3(), tbb::interface5::reader_writer_lock::scoped_lock::operator delete(), tbb::interface5::reader_writer_lock::scoped_lock_read::operator delete(), and tbb::tbb_exception::operator delete().

Here is the caller graph for this function:

◆ destroy_process_mask()

void tbb::internal::destroy_process_mask ( )
inline

Definition at line 263 of file tbb_misc.h.

263 {}

Referenced by tbb::internal::governor::release_resources().

Here is the caller graph for this function:

◆ DoOneTimeInitializations()

void tbb::internal::DoOneTimeInitializations ( )

Performs thread-safe lazy one-time general TBB initialization.

Definition at line 218 of file tbb_main.cpp.

218  {
221  // No fence required for load of InitializationDone, because we are inside a critical section.
222  if( !__TBB_InitOnce::InitializationDone ) {
223  __TBB_InitOnce::add_ref();
224  if( GetBoolEnvironmentVariable("TBB_VERSION") )
225  PrintVersion();
226  bool itt_present = false;
227 #if DO_ITT_NOTIFY
228  ITT_DoUnsafeOneTimeInitialization();
229  itt_present = ITT_Present;
230 #endif /* DO_ITT_NOTIFY */
232  governor::initialize_rml_factory();
233  Scheduler_OneTimeInitialization( itt_present );
234  // Force processor groups support detection
235  governor::default_num_threads();
236  // Dump version data
237  governor::print_version_info();
238  PrintExtraVersionInfo( "Tools support", itt_present ? "enabled" : "disabled" );
239  __TBB_InitOnce::InitializationDone = true;
240  }
241  __TBB_InitOnce::unlock();
242 }
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
Definition: tbb_stddef.h:381
void PrintExtraVersionInfo(const char *category, const char *format,...)
Prints arbitrary extra TBB version information on stderr.
Definition: tbb_misc.cpp:202
static const char _pad[NFS_MaxLineSize - sizeof(int)]
Padding in order to prevent false sharing.
Definition: tbb_main.cpp:38
void PrintVersion()
Prints TBB version information on stderr.
Definition: tbb_misc.cpp:197
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 * lock
void initialize_cache_aligned_allocator()
Defined in cache_aligned_allocator.cpp.
void Scheduler_OneTimeInitialization(bool itt_present)
Defined in scheduler.cpp.
Definition: scheduler.cpp:56
static bool GetBoolEnvironmentVariable(const char *name)

References _pad, tbb::internal::__TBB_InitOnce::add_ref(), tbb::internal::governor::default_num_threads(), GetBoolEnvironmentVariable(), tbb::internal::__TBB_InitOnce::InitializationDone, initialize_cache_aligned_allocator(), tbb::internal::governor::initialize_rml_factory(), tbb::internal::__TBB_InitOnce::lock(), tbb::internal::governor::print_version_info(), PrintExtraVersionInfo(), PrintVersion(), Scheduler_OneTimeInitialization(), suppress_unused_warning(), and tbb::internal::__TBB_InitOnce::unlock().

Referenced by tbb::internal::governor::one_time_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dummy_padded_allocate()

static void * tbb::internal::dummy_padded_allocate ( size_t  bytes,
size_t  alignment 
)
static

Dummy routine used for first indirect call via padded_allocate_handler.

Executed on very first call through padded_allocate_handler.

Definition at line 155 of file cache_aligned_allocator.cpp.

155  {
158  return (*padded_allocate_handler)(bytes, alignment);
159 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
static void *(* padded_allocate_handler)(size_t bytes, size_t alignment)
Handler for padded memory allocation.
static void * dummy_padded_allocate(size_t bytes, size_t alignment)
Dummy routine used for first indirect call via padded_allocate_handler.
void initialize_cache_aligned_allocator()
Defined in cache_aligned_allocator.cpp.

References __TBB_ASSERT, initialize_cache_aligned_allocator(), and padded_allocate_handler.

Here is the call graph for this function:

◆ dummy_padded_free()

static void tbb::internal::dummy_padded_free ( void ptr)
static

Dummy routine used for first indirect call via padded_free_handler.

Executed on very first call through padded_free_handler.

Definition at line 162 of file cache_aligned_allocator.cpp.

162  {
165  (*padded_free_handler)( ptr );
166 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
static void(* padded_free_handler)(void *p)
Handler for padded memory deallocation.
void initialize_cache_aligned_allocator()
Defined in cache_aligned_allocator.cpp.
static void dummy_padded_free(void *ptr)
Dummy routine used for first indirect call via padded_free_handler.

References __TBB_ASSERT, initialize_cache_aligned_allocator(), and padded_free_handler.

Here is the call graph for this function:

◆ DummyFree()

static void tbb::internal::DummyFree ( void ptr)
static

Dummy routine used for first indirect call via FreeHandler.

Executed on very first call through FreeHandler.

Definition at line 148 of file cache_aligned_allocator.cpp.

148  {
151  (*FreeHandler)( ptr );
152 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void initialize_cache_aligned_allocator()
Defined in cache_aligned_allocator.cpp.
static void(* FreeHandler)(void *pointer)
Handler for memory deallocation.
static void DummyFree(void *ptr)
Dummy routine used for first indirect call via FreeHandler.

References __TBB_ASSERT, FreeHandler, and initialize_cache_aligned_allocator().

Referenced by is_malloc_used_v3().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DummyMalloc()

static void * tbb::internal::DummyMalloc ( size_t  size)
static

Dummy routine used for first indirect call via MallocHandler.

Executed on very first call through MallocHandler.

Definition at line 141 of file cache_aligned_allocator.cpp.

141  {
144  return (*MallocHandler)( size );
145 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void initialize_cache_aligned_allocator()
Defined in cache_aligned_allocator.cpp.
static void * DummyMalloc(size_t size)
Dummy routine used for first indirect call via MallocHandler.
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 size
static void *(* MallocHandler)(size_t size)
Handler for memory allocation.

References __TBB_ASSERT, initialize_cache_aligned_allocator(), MallocHandler, and size.

Referenced by initialize_handler_pointers(), and is_malloc_used_v3().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fgt_alg_begin_body()

static void tbb::internal::fgt_alg_begin_body ( string_index  ,
void ,
void  
)
inlinestatic

Definition at line 51 of file _tbb_trace_impl.h.

51 { }

◆ fgt_alg_end_body()

static void tbb::internal::fgt_alg_end_body ( void )
inlinestatic

Definition at line 52 of file _tbb_trace_impl.h.

52 { }

◆ fgt_algorithm()

static void tbb::internal::fgt_algorithm ( string_index  ,
void ,
void  
)
inlinestatic

Definition at line 48 of file _tbb_trace_impl.h.

48 { }

Referenced by tbb::interface9::internal::start_for< Range, Body, Partitioner >::start_for().

Here is the caller graph for this function:

◆ fgt_alias_port()

static void tbb::internal::fgt_alias_port ( void ,
void ,
bool   
)
inlinestatic

Definition at line 270 of file _flow_graph_trace_impl.h.

270 { }

Referenced by add_nodes_impl().

Here is the caller graph for this function:

◆ fgt_async_commit()

static void tbb::internal::fgt_async_commit ( void ,
void  
)
inlinestatic

Definition at line 313 of file _flow_graph_trace_impl.h.

313 { }

Referenced by tbb::flow::interface10::async_node< Input, Output, Policy, Allocator >::receiver_gateway_impl::release_wait().

Here is the caller graph for this function:

◆ fgt_async_reserve()

static void tbb::internal::fgt_async_reserve ( void ,
void  
)
inlinestatic

Definition at line 312 of file _flow_graph_trace_impl.h.

312 { }

Referenced by tbb::flow::interface10::async_node< Input, Output, Policy, Allocator >::receiver_gateway_impl::reserve_wait().

Here is the caller graph for this function:

◆ fgt_async_try_put_begin()

static void tbb::internal::fgt_async_try_put_begin ( void ,
void  
)
inlinestatic

Definition at line 310 of file _flow_graph_trace_impl.h.

310 { }

Referenced by tbb::flow::interface10::async_node< Input, Output, Policy, Allocator >::try_put_impl().

Here is the caller graph for this function:

◆ fgt_async_try_put_end()

static void tbb::internal::fgt_async_try_put_end ( void ,
void  
)
inlinestatic

Definition at line 311 of file _flow_graph_trace_impl.h.

311 { }

Referenced by tbb::flow::interface10::async_node< Input, Output, Policy, Allocator >::try_put_impl().

Here is the caller graph for this function:

◆ fgt_begin_algorithm()

static void tbb::internal::fgt_begin_algorithm ( string_index  ,
void  
)
inlinestatic

Definition at line 49 of file _tbb_trace_impl.h.

49 { }

Referenced by tbb::interface9::internal::start_for< Range, Body, Partitioner >::run().

Here is the caller graph for this function:

◆ fgt_begin_body()

◆ fgt_body()

static void tbb::internal::fgt_body ( void ,
void  
)
inlinestatic

Definition at line 284 of file _flow_graph_trace_impl.h.

284 { }

◆ fgt_composite()

◆ fgt_end_algorithm()

static void tbb::internal::fgt_end_algorithm ( void )
inlinestatic

Definition at line 50 of file _tbb_trace_impl.h.

50 { }

Referenced by tbb::interface9::internal::start_for< Range, Body, Partitioner >::run().

Here is the caller graph for this function:

◆ fgt_end_body()

◆ fgt_graph()

static void tbb::internal::fgt_graph ( void )
inlinestatic

Definition at line 274 of file _flow_graph_trace_impl.h.

274 { }

Referenced by tbb::flow::interface10::internal::key_matching_port< TraitsType >::try_put_task().

Here is the caller graph for this function:

◆ fgt_graph_desc()

static void tbb::internal::fgt_graph_desc ( void ,
const char *   
)
inlinestatic

Definition at line 282 of file _flow_graph_trace_impl.h.

282 { }

◆ fgt_make_edge()

static void tbb::internal::fgt_make_edge ( void ,
void  
)
inlinestatic

Definition at line 304 of file _flow_graph_trace_impl.h.

304 { }

Referenced by tbb::flow::interface10::internal_make_edge().

Here is the caller graph for this function:

◆ fgt_multiinput_multioutput_node()

static void tbb::internal::fgt_multiinput_multioutput_node ( string_index  ,
void ,
void  
)
inlinestatic

◆ fgt_multiinput_multioutput_node_desc()

template<typename NodeType >
void tbb::internal::fgt_multiinput_multioutput_node_desc ( const NodeType *  ,
const char *   
)

Definition at line 318 of file _flow_graph_trace_impl.h.

318 { }

◆ fgt_multiinput_node()

template<int N, typename PortsTuple >
static void tbb::internal::fgt_multiinput_node ( string_index  ,
void ,
PortsTuple &  ,
void  
)
inlinestatic

Definition at line 293 of file _flow_graph_trace_impl.h.

293 { }

◆ fgt_multioutput_node()

template<int N, typename PortsTuple >
static void tbb::internal::fgt_multioutput_node ( string_index  ,
void ,
void ,
PortsTuple &   
)
inlinestatic

Definition at line 287 of file _flow_graph_trace_impl.h.

287 { }

◆ fgt_multioutput_node_desc()

template<typename NodeType >
static void tbb::internal::fgt_multioutput_node_desc ( const NodeType *  ,
const char *   
)
inlinestatic

Definition at line 277 of file _flow_graph_trace_impl.h.

277 { }

◆ fgt_multioutput_node_with_body()

template<int N, typename PortsTuple >
static void tbb::internal::fgt_multioutput_node_with_body ( string_index  ,
void ,
void ,
PortsTuple &  ,
void  
)
inlinestatic

Definition at line 290 of file _flow_graph_trace_impl.h.

290 { }

◆ fgt_node() [1/3]

◆ fgt_node() [2/3]

static void tbb::internal::fgt_node ( string_index  ,
void ,
void ,
void  
)
inlinestatic

Definition at line 298 of file _flow_graph_trace_impl.h.

298 { }

◆ fgt_node() [3/3]

static void tbb::internal::fgt_node ( string_index  ,
void ,
void ,
void ,
void  
)
inlinestatic

Definition at line 299 of file _flow_graph_trace_impl.h.

299 { }

◆ fgt_node_desc()

template<typename NodeType >
static void tbb::internal::fgt_node_desc ( const NodeType *  ,
const char *   
)
inlinestatic

Definition at line 280 of file _flow_graph_trace_impl.h.

280 { }

Referenced by tbb::flow::interface10::internal::join_node_FE< reserving, InputTuple, OutputTuple >::input_ports().

Here is the caller graph for this function:

◆ fgt_node_with_body() [1/2]

◆ fgt_node_with_body() [2/2]

static void tbb::internal::fgt_node_with_body ( string_index  ,
void ,
void ,
void ,
void  
)
inlinestatic

Definition at line 302 of file _flow_graph_trace_impl.h.

302 { }

◆ fgt_release_wait()

static void tbb::internal::fgt_release_wait ( void )
inlinestatic

Definition at line 315 of file _flow_graph_trace_impl.h.

315 { }

◆ fgt_remove_edge()

static void tbb::internal::fgt_remove_edge ( void ,
void  
)
inlinestatic

Definition at line 305 of file _flow_graph_trace_impl.h.

305 { }

Referenced by tbb::flow::interface10::internal_remove_edge().

Here is the caller graph for this function:

◆ fgt_reserve_wait()

static void tbb::internal::fgt_reserve_wait ( void )
inlinestatic

Definition at line 314 of file _flow_graph_trace_impl.h.

314 { }

Referenced by tbb::flow::interface10::internal::key_matching_port< TraitsType >::key_matching_port().

Here is the caller graph for this function:

◆ first() [1/3]

template<typename Container >
auto tbb::internal::first ( Container &  c) -> decltype(begin(c))

Definition at line 38 of file _range_iterator.h.

38 {return begin(c);}
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 begin

References begin.

Referenced by tbb::concurrent_vector< padded_element, padded_allocator_type >::assign(), tbb::interface5::internal::split_ordered_list< value_type, typename Traits::allocator_type >::check_range(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::clear(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::concurrent_hash_map(), tbb::interface5::concurrent_unordered_map< Key, T, Hasher, Key_equality, Allocator >::concurrent_unordered_map(), tbb::interface5::concurrent_unordered_multimap< Key, T, Hasher, Key_equality, Allocator >::concurrent_unordered_multimap(), tbb::interface5::concurrent_unordered_multiset< Key, Hasher, Key_equality, Allocator >::concurrent_unordered_multiset(), tbb::interface5::concurrent_unordered_set< Key, Hasher, Key_equality, Allocator >::concurrent_unordered_set(), tbb::concurrent_vector< padded_element, padded_allocator_type >::concurrent_vector(), internal::item_buffer< OutputTuple >::destroy_item(), tbb::internal::parallel_for_each_impl< Iterator, Function, Generic >::doit(), tbb::internal::parallel_for_each_impl< Iterator, Function, std::random_access_iterator_tag >::doit(), internal::item_buffer< OutputTuple >::get_my_item(), tbb::concurrent_vector< padded_element, padded_allocator_type >::grow_by(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::insert(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::insert(), tbb::concurrent_vector< padded_element, padded_allocator_type >::internal_assign_iterators(), tbb::concurrent_vector< padded_element, padded_allocator_type >::internal_assign_range(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_distance(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_equal_range(), internal::item_buffer< OutputTuple >::item(), tbb::internal::generic_scheduler::local_spawn(), tbb::internal::generic_scheduler::local_spawn_root_and_wait(), tbb::interface5::internal::split_ordered_list< value_type, typename Traits::allocator_type >::move_all(), tbb::parallel_do(), tbb::serial::interface9::parallel_for(), tbb::strict_ppl::parallel_for(), tbb::parallel_for_each(), tbb::serial::interface9::parallel_for_impl(), tbb::strict_ppl::parallel_for_impl(), tbb::parallel_sort(), tbb::internal::pipeline_root_task::pipeline_root_task(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::rehash(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::rehash_bucket(), tbb::interface9::internal::do_task_iter< Iterator, Body, Item >::run_for_forward_iterator(), tbb::interface9::internal::run_parallel_do(), tbb::interface9::internal::select_parallel_do(), tbb::internal::generic_scheduler::spawn(), tbb::internal::generic_scheduler::spawn_root_and_wait(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_erase().

Here is the caller graph for this function:

◆ first() [2/3]

template<typename Container >
auto tbb::internal::first ( const Container &  c) -> decltype(begin(c))

Definition at line 41 of file _range_iterator.h.

41 {return begin(c);}
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 begin

References begin.

◆ first() [3/3]

template<typename T , size_t size>
T* tbb::internal::first ( T(&)  arr[size])

Definition at line 63 of file _range_iterator.h.

63 {return arr;}

◆ fix_broken_rethrow()

void tbb::internal::fix_broken_rethrow ( )

Definition at line 188 of file tbb_misc.cpp.

188 {}

◆ free_closure_v3()

void tbb::internal::free_closure_v3 ( void ptr)

Free a closure allocated by allocate_closure_v3.

Definition at line 45 of file tbb_thread.cpp.

46 {
48 }
void __TBB_EXPORTED_FUNC deallocate_via_handler_v3(void *p)
Deallocates memory using FreeHandler.

References deallocate_via_handler_v3().

Referenced by tbb::internal::thread_closure_base::operator delete().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gcc_rethrow_exception_broken()

bool tbb::internal::gcc_rethrow_exception_broken ( )

Definition at line 189 of file tbb_misc.cpp.

189 { return false; }

Referenced by tbb::internal::governor::acquire_resources().

Here is the caller graph for this function:

◆ get_initial_auto_partitioner_divisor()

size_t tbb::internal::get_initial_auto_partitioner_divisor ( )

Definition at line 153 of file task.cpp.

153  {
154  const size_t X_FACTOR = 4;
155  return X_FACTOR * governor::local_scheduler()->max_threads_in_arena();
156 }

References tbb::internal::governor::local_scheduler(), and tbb::internal::generic_scheduler::max_threads_in_arena().

Here is the call graph for this function:

◆ GetBoolEnvironmentVariable()

static bool tbb::internal::GetBoolEnvironmentVariable ( const char *  name)
inlinestatic

Definition at line 36 of file tbb_environment.h.

36  {
37  if( const char* s = std::getenv(name) )
38  {
39  // The result is defined as true only if the environment variable contains
40  // no characters except one '1' character and an arbitrary number of spaces
41  // (including the absence of spaces).
42  size_t index = std::strspn(s, " ");
43  if (s[index] != '1') return false;
44  index++;
45  // Memory access after incrementing is safe, since the getenv() returns a
46  // NULL terminated string, and even if the character getting by index is '1',
47  // and this character is the end of string, after incrementing we will get
48  // an index of character, that contains '\0'
49  index += std::strspn(&s[index], " ");
50  return !s[index];
51  }
52  return false;
53 }
void const char const char int ITT_FORMAT __itt_group_sync s
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name

References name, and s.

Referenced by DoOneTimeInitializations().

Here is the caller graph for this function:

◆ GetPrime()

unsigned tbb::internal::GetPrime ( unsigned  seed)

Defined in tbb_main.cpp

Referenced by tbb::internal::FastRandom::init().

Here is the caller graph for this function:

◆ handle_perror()

void tbb::internal::handle_perror ( int  error_code,
const char *  aux_info 
)

Throws std::runtime_error with what() returning error_code description prefixed with aux_info.

Definition at line 78 of file tbb_misc.cpp.

78  {
79  char buf[256];
80 #if _MSC_VER
81  #define snprintf _snprintf
82 #endif
83  int written = snprintf(buf, sizeof(buf), "%s: %s", what, strerror( error_code ));
84  // On overflow, the returned value exceeds sizeof(buf) (for GLIBC) or is negative (for MSVC).
85  __TBB_ASSERT_EX( written>0 && written<(int)sizeof(buf), "Error description is too long" );
86  // Ensure that buffer ends in terminator.
87  buf[sizeof(buf)-1] = 0;
88 #if TBB_USE_EXCEPTIONS
89  throw std::runtime_error(buf);
90 #else
91  PRINT_ERROR_AND_ABORT( "runtime_error", buf);
92 #endif /* !TBB_USE_EXCEPTIONS */
93 }
#define __TBB_ASSERT_EX(predicate, comment)
"Extended" version is useful to suppress warnings if a variable is only used with an assert
Definition: tbb_stddef.h:171
#define PRINT_ERROR_AND_ABORT(exc_name, msg)
Definition: tbb_misc.cpp:62

References __TBB_ASSERT_EX, and PRINT_ERROR_AND_ABORT.

Referenced by tbb::internal::governor::acquire_resources(), tbb::internal::input_buffer::create_my_tls(), tbb::internal::input_buffer::destroy_my_tls(), tbb::internal::tbb_thread_v3::detach(), tbb::mutex::scoped_lock::internal_acquire(), tbb::recursive_mutex::scoped_lock::internal_acquire(), tbb::mutex::internal_construct(), tbb::recursive_mutex::internal_construct(), tbb::internal::tbb_thread_v3::internal_start(), tbb::internal::tbb_thread_v3::join(), tbb::mutex::lock(), tbb::recursive_mutex::lock(), tbb::mutex::mutex(), and tbb::recursive_mutex::recursive_mutex().

Here is the caller graph for this function:

◆ handle_unconstructed_elements()

template<typename T >
void tbb::internal::handle_unconstructed_elements ( T *  array,
size_t  n_of_elements 
)

Exception helper function.

Definition at line 78 of file concurrent_vector.h.

78  {
79  std::memset( static_cast<void*>(array), 0, n_of_elements * sizeof( T ) );
80  }

Referenced by tbb::concurrent_vector< T, A >::push_back_helper::element_construction_guard::~element_construction_guard(), and tbb::concurrent_vector< T, A >::internal_loop_guide::~internal_loop_guide().

Here is the caller graph for this function:

◆ handle_win_error()

void tbb::internal::handle_win_error ( int  error_code)

Throws std::runtime_error with what() returning error_code description prefixed with aux_info.

Referenced by tbb::internal::tbb_thread_v3::detach(), and tbb::internal::tbb_thread_v3::join().

Here is the caller graph for this function:

◆ initialize_cache_aligned_allocator()

void tbb::internal::initialize_cache_aligned_allocator ( )

Defined in cache_aligned_allocator.cpp.

Definition at line 136 of file cache_aligned_allocator.cpp.

136  {
138 }
static tbb::atomic< do_once_state > initialization_state
void initialize_handler_pointers()
Initialize the allocation/free handler pointers.
void atomic_do_once(const F &initializer, atomic< do_once_state > &state)
One-time initialization function.
Definition: tbb_misc.h:210

References atomic_do_once(), initialization_state, and initialize_handler_pointers().

Referenced by DoOneTimeInitializations(), dummy_padded_allocate(), dummy_padded_free(), DummyFree(), and DummyMalloc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize_handler_pointers()

void tbb::internal::initialize_handler_pointers ( )

Initialize the allocation/free handler pointers.

Caller is responsible for ensuring this routine is called exactly once. The routine attempts to dynamically link with the TBB memory allocator. If that allocator is not found, it links to malloc and free.

Definition at line 117 of file cache_aligned_allocator.cpp.

117  {
119  bool success = dynamic_link( MALLOCLIB_NAME, MallocLinkTable, 4 );
120  if( !success ) {
121  // If unsuccessful, set the handlers to the default routines.
122  // This must be done now, and not before FillDynamicLinks runs, because if other
123  // threads call the handlers, we want them to go through the DoOneTimeInitializations logic,
124  // which forces them to wait.
125  FreeHandler = &std::free;
126  MallocHandler = &std::malloc;
129  }
130 #if !__TBB_RML_STATIC
131  PrintExtraVersionInfo( "ALLOCATOR", success?"scalable_malloc":"malloc" );
132 #endif
133 }
static const dynamic_link_descriptor MallocLinkTable[]
Table describing how to link the handlers.
static void padded_free(void *p)
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void PrintExtraVersionInfo(const char *category, const char *format,...)
Prints arbitrary extra TBB version information on stderr.
Definition: tbb_misc.cpp:202
OPEN_INTERNAL_NAMESPACE bool dynamic_link(const char *, const dynamic_link_descriptor *, size_t, dynamic_link_handle *handle, int)
static void * padded_allocate(size_t bytes, size_t alignment)
static void(* padded_free_handler)(void *p)
Handler for padded memory deallocation.
static void *(* padded_allocate_handler)(size_t bytes, size_t alignment)
Handler for padded memory allocation.
static void(* FreeHandler)(void *pointer)
Handler for memory deallocation.
static void * DummyMalloc(size_t size)
Dummy routine used for first indirect call via MallocHandler.
static void *(* MallocHandler)(size_t size)
Handler for memory allocation.

References __TBB_ASSERT, DummyMalloc(), dynamic_link(), FreeHandler, MallocHandler, MallocLinkTable, padded_allocate(), padded_allocate_handler, padded_free(), padded_free_handler, and PrintExtraVersionInfo().

Referenced by initialize_cache_aligned_allocator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_aligned()

template<typename T >
bool tbb::internal::is_aligned ( T *  pointer,
uintptr_t  alignment 
)
inline

A function to check if passed in pointer is aligned on a specific border.

Definition at line 353 of file tbb_stddef.h.

353  {
354  return 0==((uintptr_t)pointer & (alignment-1));
355 }

Referenced by __TBB_machine_aligned_load8(), __TBB_machine_aligned_store8(), __TBB_machine_cmpswp4(), __TBB_machine_cmpswp8_OsX(), __TBB_machine_fetchadd4(), __TBB_machine_fetchadd8(), __TBB_machine_load8(), __TBB_machine_store8(), tbb::internal::concurrent_queue_base_v3::concurrent_queue_base_v3(), and NFS_Allocate().

Here is the caller graph for this function:

◆ is_bit_set()

bool tbb::internal::is_bit_set ( population_t  val,
int  pos 
)
inline

Definition at line 65 of file task_stream.h.

65  {
66  __TBB_ASSERT( pos>=0, NULL );
67  __TBB_ASSERT( pos<int(sizeof(population_t)*CHAR_BIT), NULL );
68  return (val & (one<<pos)) != 0;
69 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
uintptr_t population_t
Definition: task_stream.h:50
const population_t one
Definition: task_stream.h:51

References __TBB_ASSERT, and one.

Referenced by tbb::internal::task_stream< num_priority_levels >::drain(), tbb::internal::task_stream< num_priority_levels >::pop(), tbb::internal::task_stream< num_priority_levels >::pop_specific(), and tbb::internal::task_stream< num_priority_levels >::try_pop().

Here is the caller graph for this function:

◆ is_critical()

bool tbb::internal::is_critical ( task t)
inline

Definition at line 953 of file task.h.

953 { return bool((t.prefix().extra_state & 0x8) != 0); }

References tbb::task::prefix().

Referenced by tbb::internal::arena::enqueue_task(), tbb::internal::custom_scheduler< SchedulerTraits >::local_wait_for_all(), tbb::internal::custom_scheduler< SchedulerTraits >::receive_or_steal_task(), and tbb::internal::custom_scheduler< SchedulerTraits >::tally_completion_of_predecessor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_malloc_used_v3()

bool __TBB_EXPORTED_FUNC tbb::internal::is_malloc_used_v3 ( )

Returns true if standard malloc/free are used to work with memory.

Definition at line 242 of file cache_aligned_allocator.cpp.

242  {
243  if (MallocHandler == &DummyMalloc) {
244  void* void_ptr = (*MallocHandler)(1);
245  (*FreeHandler)(void_ptr);
246  }
248  // Cast to void avoids type mismatch errors on some compilers (e.g. __IBMCPP__)
249  __TBB_ASSERT( !(((void*)MallocHandler==(void*)&std::malloc) ^ ((void*)FreeHandler==(void*)&std::free)),
250  "Both shim pointers must refer to routines from the same package (either TBB or CRT)" );
251  return (void*)MallocHandler == (void*)&std::malloc;
252 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
static void(* FreeHandler)(void *pointer)
Handler for memory deallocation.
static void DummyFree(void *ptr)
Dummy routine used for first indirect call via FreeHandler.
static void * DummyMalloc(size_t size)
Dummy routine used for first indirect call via MallocHandler.
static void *(* MallocHandler)(size_t size)
Handler for memory allocation.

References __TBB_ASSERT, DummyFree(), DummyMalloc(), FreeHandler, and MallocHandler.

Referenced by tbb::tbb_allocator< T >::allocator_type().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_power_of_two()

template<typename integer_type >
bool tbb::internal::is_power_of_two ( integer_type  arg)
inline

A function to check if passed integer is a power of 2.

Definition at line 359 of file tbb_stddef.h.

359  {
360  return arg && (0 == (arg & (arg - 1)));
361 }

Referenced by is_power_of_two_at_least(), modulo_power_of_two(), and NFS_Allocate().

Here is the caller graph for this function:

◆ is_power_of_two_at_least()

template<typename argument_integer_type , typename power2_integer_type >
bool tbb::internal::is_power_of_two_at_least ( argument_integer_type  arg,
power2_integer_type  power2 
)
inline

A function to determine if arg is a power of 2 at least as big as another power of 2.

Definition at line 375 of file tbb_stddef.h.

375  {
376  __TBB_ASSERT( is_power_of_two(power2), "Divisor should be a power of two" );
377  return 0 == (arg & (arg - power2));
378 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
bool is_power_of_two(integer_type arg)
A function to check if passed integer is a power of 2.
Definition: tbb_stddef.h:359

References __TBB_ASSERT, and is_power_of_two().

Referenced by tbb::internal::concurrent_vector_base_v3::is_first_element_in_segment().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ itt_hide_load_word()

template<typename T >
T tbb::internal::itt_hide_load_word ( const T &  src)
inline

Definition at line 220 of file tbb_profiling.h.

220  {
221 #if TBB_USE_THREADING_TOOLS
222  //TODO: This assertion should be replaced with static_assert
223  __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized.");
224  return (T)itt_load_pointer_v3(&src);
225 #else
226  return src;
227 #endif
228  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void *__TBB_EXPORTED_FUNC itt_load_pointer_v3(const void *src)
Definition: tbb_main.cpp:421

References __TBB_ASSERT, and itt_load_pointer_v3().

Referenced by tbb::interface5::concurrent_priority_queue< graph_task *, graph_task_comparator >::handle_operations(), tbb::interface5::internal::hash_map_base::insert_new_node(), and tbb::interface6::aggregator_operation::next().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ itt_hide_store_word()

template<typename T >
void tbb::internal::itt_hide_store_word ( T &  dst,
src 
)
inline

Definition at line 208 of file tbb_profiling.h.

208  {
209 #if TBB_USE_THREADING_TOOLS
210  //TODO: This assertion should be replaced with static_assert
211  __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized");
212  itt_store_pointer_with_release_v3(&dst, (void *)src);
213 #else
214  dst = src;
215 #endif
216  }
void __TBB_EXPORTED_FUNC itt_store_pointer_with_release_v3(void *dst, void *src)
Definition: tbb_main.cpp:272
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169

References __TBB_ASSERT, and itt_store_pointer_with_release_v3().

Referenced by tbb::interface5::internal::hash_map_base::enable_segment(), tbb::interface5::concurrent_priority_queue< graph_task *, graph_task_comparator >::handle_operations(), tbb::strict_ppl::internal::micro_queue< Value >::push(), and tbb::interface6::aggregator_operation::set_next().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ itt_load_pointer_v3()

void * tbb::internal::itt_load_pointer_v3 ( const void src)

Definition at line 421 of file tbb_main.cpp.

421  {
422  //TODO: replace this with __TBB_load_relaxed
423  void* result = *static_cast<void*const*>(src);
424  return result;
425 }

Referenced by itt_hide_load_word().

Here is the caller graph for this function:

◆ itt_load_pointer_with_acquire_v3()

void * tbb::internal::itt_load_pointer_with_acquire_v3 ( const void src)

Definition at line 277 of file tbb_main.cpp.

277  {
278  void* result = __TBB_load_with_acquire(*static_cast<void*const*>(src));
279  ITT_NOTIFY(sync_acquired, const_cast<void*>(src));
280  return result;
281 }
T __TBB_load_with_acquire(const volatile T &location)
Definition: tbb_machine.h:713
#define ITT_NOTIFY(name, obj)
Definition: itt_notify.h:120

References __TBB_load_with_acquire(), and ITT_NOTIFY.

Referenced by itt_load_word_with_acquire().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ itt_load_word_with_acquire() [1/2]

template<typename T >
T tbb::internal::itt_load_word_with_acquire ( const tbb::atomic< T > &  src)
inline

Definition at line 166 of file tbb_profiling.h.

166  {
167 #if TBB_USE_THREADING_TOOLS
168  // This assertion should be replaced with static_assert
169  __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized.");
170 #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
171  // Workaround for overzealous compiler warnings
172  #pragma warning (push)
173  #pragma warning (disable: 4311)
174 #endif
175  T result = (T)itt_load_pointer_with_acquire_v3(&src);
176 #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
177  #pragma warning (pop)
178 #endif
179  return result;
180 #else
181  return src;
182 #endif // TBB_USE_THREADING_TOOLS
183  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void *__TBB_EXPORTED_FUNC itt_load_pointer_with_acquire_v3(const void *src)
Definition: tbb_main.cpp:277

References __TBB_ASSERT, and itt_load_pointer_with_acquire_v3().

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor::acquire(), tbb::interface5::internal::hash_map_base::check_mask_race(), tbb::interface5::internal::hash_map_base::check_rehashing_collision(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::erase(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::exclude(), tbb::interface6::internal::aggregator_generic< aggregated_operation_type >::execute(), tbb::interface9::internal::start_reduce< Range, Body, Partitioner >::execute(), tbb::interface6::aggregator_ext< internal::basic_handler >::execute_impl(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_fast_find(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::lookup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ itt_load_word_with_acquire() [2/2]

template<typename T >
T tbb::internal::itt_load_word_with_acquire ( const T &  src)
inline

Definition at line 197 of file tbb_profiling.h.

197  {
198 #if TBB_USE_THREADING_TOOLS
199  // This assertion should be replaced with static_assert
200  __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized");
201  return (T)itt_load_pointer_with_acquire_v3(&src);
202 #else
203  return __TBB_load_with_acquire(src);
204 #endif // TBB_USE_THREADING_TOOLS
205  }
T __TBB_load_with_acquire(const volatile T &location)
Definition: tbb_machine.h:713
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void *__TBB_EXPORTED_FUNC itt_load_pointer_with_acquire_v3(const void *src)
Definition: tbb_main.cpp:277

References __TBB_ASSERT, __TBB_load_with_acquire(), and itt_load_pointer_with_acquire_v3().

Here is the call graph for this function:

◆ itt_make_task_group()

void tbb::internal::itt_make_task_group ( itt_domain_enum  ,
void ,
unsigned long long  ,
void ,
unsigned long long  ,
string_index   
)
inline

Definition at line 270 of file tbb_profiling.h.

271  {}

◆ itt_make_task_group_v7()

void tbb::internal::itt_make_task_group_v7 ( itt_domain_enum  domain,
void group,
unsigned long long  group_extra,
void parent,
unsigned long long  parent_extra,
string_index  name_index 
)

Definition at line 400 of file tbb_main.cpp.

401  { }

◆ itt_metadata_str_add()

void tbb::internal::itt_metadata_str_add ( itt_domain_enum  ,
void ,
unsigned long long  ,
string_index  ,
const char *   
)
inline

Definition at line 273 of file tbb_profiling.h.

274  {}

◆ itt_metadata_str_add_v7()

void tbb::internal::itt_metadata_str_add_v7 ( itt_domain_enum  domain,
void addr,
unsigned long long  addr_extra,
string_index  key,
const char *  value 
)

Definition at line 403 of file tbb_main.cpp.

404  { }

◆ itt_region_begin()

void tbb::internal::itt_region_begin ( itt_domain_enum  ,
void ,
unsigned long long  ,
void ,
unsigned long long  ,
string_index   
)
inline

Definition at line 284 of file tbb_profiling.h.

285  {}

◆ itt_region_begin_v9()

void tbb::internal::itt_region_begin_v9 ( itt_domain_enum  domain,
void region,
unsigned long long  region_extra,
void parent,
unsigned long long  parent_extra,
string_index  name_index 
)

Definition at line 414 of file tbb_main.cpp.

415  { }

◆ itt_region_end()

void tbb::internal::itt_region_end ( itt_domain_enum  ,
void ,
unsigned long long   
)
inline

Definition at line 287 of file tbb_profiling.h.

287 {}

◆ itt_region_end_v9()

void tbb::internal::itt_region_end_v9 ( itt_domain_enum  domain,
void region,
unsigned long long  region_extra 
)

Definition at line 417 of file tbb_main.cpp.

417 { }

◆ itt_relation_add()

void tbb::internal::itt_relation_add ( itt_domain_enum  ,
void ,
unsigned long long  ,
itt_relation  ,
void ,
unsigned long long   
)
inline

Definition at line 276 of file tbb_profiling.h.

277  {}

◆ itt_relation_add_v7()

void tbb::internal::itt_relation_add_v7 ( itt_domain_enum  domain,
void addr0,
unsigned long long  addr0_extra,
itt_relation  relation,
void addr1,
unsigned long long  addr1_extra 
)

Definition at line 406 of file tbb_main.cpp.

407  { }

◆ itt_set_sync_name_v3()

void tbb::internal::itt_set_sync_name_v3 ( void obj,
const tchar name 
)

Definition at line 427 of file tbb_main.cpp.

427  {
428  ITT_SYNC_RENAME(obj, name);
430 }
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
Definition: tbb_stddef.h:381
#define ITT_SYNC_RENAME(obj, name)
Definition: itt_notify.h:124
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name

References ITT_SYNC_RENAME, name, and suppress_unused_warning().

Here is the call graph for this function:

◆ itt_store_pointer_with_release_v3()

void tbb::internal::itt_store_pointer_with_release_v3 ( void dst,
void src 
)

Definition at line 272 of file tbb_main.cpp.

272  {
274  __TBB_store_with_release(*static_cast<void**>(dst),src);
275 }
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 sync_releasing
#define ITT_NOTIFY(name, obj)
Definition: itt_notify.h:120
void __TBB_store_with_release(volatile T &location, V value)
Definition: tbb_machine.h:717

References __TBB_store_with_release(), ITT_NOTIFY, and sync_releasing.

Referenced by itt_hide_store_word(), and itt_store_word_with_release().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ itt_store_word_with_release() [1/2]

template<typename T , typename U >
void tbb::internal::itt_store_word_with_release ( tbb::atomic< T > &  dst,
src 
)
inline

Definition at line 155 of file tbb_profiling.h.

155  {
156 #if TBB_USE_THREADING_TOOLS
157  // This assertion should be replaced with static_assert
158  __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized.");
159  itt_store_pointer_with_release_v3(&dst, (void *)uintptr_t(src));
160 #else
161  dst = src;
162 #endif // TBB_USE_THREADING_TOOLS
163  }
void __TBB_EXPORTED_FUNC itt_store_pointer_with_release_v3(void *dst, void *src)
Definition: tbb_main.cpp:272
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169

References __TBB_ASSERT, and itt_store_pointer_with_release_v3().

Referenced by tbb::interface5::internal::hash_map_base::enable_segment(), tbb::interface9::internal::finish_reduce< Body >::execute(), tbb::interface9::internal::start_reduce< Range, Body, Partitioner >::execute(), tbb::interface6::aggregator_operation::finish(), tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_operations(), tbb::interface5::concurrent_priority_queue< graph_task *, graph_task_comparator >::handle_operations(), tbb::strict_ppl::internal::micro_queue< Value >::invalidate_page_and_rethrow(), tbb::interface6::internal::aggregator_generic< aggregated_operation_type >::start_handle_operations(), tbb::interface6::aggregator_ext< internal::basic_handler >::start_handle_operations(), and tbb::strict_ppl::internal::micro_queue_pop_finalizer< T >::~micro_queue_pop_finalizer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ itt_store_word_with_release() [2/2]

template<typename T >
void tbb::internal::itt_store_word_with_release ( T &  dst,
src 
)
inline

Definition at line 186 of file tbb_profiling.h.

186  {
187 #if TBB_USE_THREADING_TOOLS
188  // This assertion should be replaced with static_assert
189  __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized.");
190  itt_store_pointer_with_release_v3(&dst, (void *)src);
191 #else
192  __TBB_store_with_release(dst, src);
193 #endif // TBB_USE_THREADING_TOOLS
194  }
void __TBB_EXPORTED_FUNC itt_store_pointer_with_release_v3(void *dst, void *src)
Definition: tbb_main.cpp:272
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void __TBB_store_with_release(volatile T &location, V value)
Definition: tbb_machine.h:717

References __TBB_ASSERT, __TBB_store_with_release(), and itt_store_pointer_with_release_v3().

Here is the call graph for this function:

◆ itt_task_begin()

void tbb::internal::itt_task_begin ( itt_domain_enum  ,
void ,
unsigned long long  ,
void ,
unsigned long long  ,
string_index   
)
inline

Definition at line 279 of file tbb_profiling.h.

280  {}

◆ itt_task_begin_v7()

void tbb::internal::itt_task_begin_v7 ( itt_domain_enum  domain,
void task,
unsigned long long  task_extra,
void parent,
unsigned long long  parent_extra,
string_index  name_index 
)

Definition at line 409 of file tbb_main.cpp.

410  { }

◆ itt_task_end()

void tbb::internal::itt_task_end ( itt_domain_enum  )
inline

Definition at line 282 of file tbb_profiling.h.

282 {}

◆ itt_task_end_v7()

void tbb::internal::itt_task_end_v7 ( itt_domain_enum  domain)

Definition at line 412 of file tbb_main.cpp.

412 { }

◆ last() [1/3]

template<typename Container >
auto tbb::internal::last ( Container &  c) -> decltype(begin(c))

Definition at line 44 of file _range_iterator.h.

44 {return end(c);}
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 end

References end.

Referenced by tbb::concurrent_vector< padded_element, padded_allocator_type >::assign(), tbb::interface5::internal::split_ordered_list< value_type, typename Traits::allocator_type >::check_range(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::concurrent_hash_map(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::concurrent_unordered_base(), tbb::interface5::concurrent_unordered_map< Key, T, Hasher, Key_equality, Allocator >::concurrent_unordered_map(), tbb::interface5::concurrent_unordered_multimap< Key, T, Hasher, Key_equality, Allocator >::concurrent_unordered_multimap(), tbb::interface5::concurrent_unordered_multiset< Key, Hasher, Key_equality, Allocator >::concurrent_unordered_multiset(), tbb::interface5::concurrent_unordered_set< Key, Hasher, Key_equality, Allocator >::concurrent_unordered_set(), tbb::concurrent_vector< padded_element, padded_allocator_type >::concurrent_vector(), tbb::internal::parallel_for_each_impl< Iterator, Function, Generic >::doit(), tbb::internal::parallel_for_each_impl< Iterator, Function, std::random_access_iterator_tag >::doit(), tbb::strict_ppl::internal::micro_queue< Value >::get_ref(), tbb::concurrent_bounded_queue< T, A >::get_ref(), tbb::concurrent_vector< padded_element, padded_allocator_type >::grow_by(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::insert(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::insert(), tbb::interface5::internal::split_ordered_list< value_type, typename Traits::allocator_type >::insert_dummy(), tbb::concurrent_vector< padded_element, padded_allocator_type >::internal_assign_iterators(), tbb::concurrent_vector< padded_element, padded_allocator_type >::internal_assign_range(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_distance(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_equal_range(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_erase(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_extract(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_find(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_insert(), tbb::interface5::internal::split_ordered_list< value_type, typename Traits::allocator_type >::move_all(), tbb::parallel_do(), tbb::serial::interface9::parallel_for(), tbb::strict_ppl::parallel_for(), tbb::parallel_for_each(), tbb::serial::interface9::parallel_for_impl(), tbb::strict_ppl::parallel_for_impl(), tbb::parallel_sort(), tbb::interface9::internal::run_parallel_do(), tbb::interface9::internal::select_parallel_do(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_erase().

Here is the caller graph for this function:

◆ last() [2/3]

template<typename Container >
auto tbb::internal::last ( const Container &  c) -> decltype(begin(c))

Definition at line 47 of file _range_iterator.h.

47 {return end(c);}
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 end

References end.

◆ last() [3/3]

template<typename T , size_t size>
T* tbb::internal::last ( T(&)  arr[size])

Definition at line 66 of file _range_iterator.h.

66 {return arr + size;}
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 size

References size.

◆ make_critical()

void tbb::internal::make_critical ( task t)
inline

Definition at line 952 of file task.h.

952 { t.prefix().extra_state |= 0x8; }

References tbb::task::prefix().

Referenced by tbb::internal::arena::enqueue_task(), and tbb::flow::interface10::internal::spawn_in_graph_arena().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ max()

template<typename T >
T tbb::internal::max ( const T &  val1,
const T &  val2 
)

Utility template function returning greater of the two values.

Provided here to avoid including not strict safe <algorithm>.
In case operands cause signed/unsigned or size mismatch warnings it is caller's responsibility to do the appropriate cast before calling the function.

Definition at line 116 of file tbb_misc.h.

116  {
117  return val1 < val2 ? val2 : val1;
118 }

Referenced by calc_workers_soft_limit(), tbb::internal::allowed_parallelism_control::default_value(), tbb::internal::market::global_market(), tbb::tbb_allocator< T >::max_size(), tbb::interface6::memory_pool_allocator< T, P >::max_size(), and tbb::internal::arena::num_arena_slots().

Here is the caller graph for this function:

◆ min()

template<typename T >
T tbb::internal::min ( const T &  val1,
const T &  val2 
)

Utility template function returning lesser of the two values.

Provided here to avoid including not strict safe <algorithm>.
In case operands cause signed/unsigned or size mismatch warnings it is caller's responsibility to do the appropriate cast before calling the function.

Definition at line 107 of file tbb_misc.h.

107  {
108  return val1 < val2 ? val1 : val2;
109 }

Referenced by tbb::internal::allowed_parallelism_control::active_value(), tbb::internal::market::adjust_demand(), tbb::internal::market::set_active_num_workers(), and tbb::internal::market::update_allotment().

Here is the caller graph for this function:

◆ modulo_power_of_two()

template<typename argument_integer_type , typename divisor_integer_type >
argument_integer_type tbb::internal::modulo_power_of_two ( argument_integer_type  arg,
divisor_integer_type  divisor 
)
inline

A function to compute arg modulo divisor where divisor is a power of 2.

Definition at line 365 of file tbb_stddef.h.

365  {
366  __TBB_ASSERT( is_power_of_two(divisor), "Divisor should be a power of two" );
367  return (arg & (divisor - 1));
368 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
bool is_power_of_two(integer_type arg)
A function to check if passed integer is a power of 2.
Definition: tbb_stddef.h:359

References __TBB_ASSERT, and is_power_of_two().

Referenced by tbb::strict_ppl::internal::concurrent_queue_iterator_base_v3< tbb_remove_cv< Value >::type >::advance(), tbb::internal::concurrent_queue_iterator_base_v3::advance(), tbb::internal::micro_queue::assign(), tbb::strict_ppl::internal::micro_queue< Value >::assign(), tbb::internal::concurrent_queue_iterator_rep::get_item(), tbb::strict_ppl::internal::concurrent_queue_iterator_rep< Value >::get_item(), tbb::internal::arena::on_thread_leaving(), tbb::internal::micro_queue::pop(), tbb::strict_ppl::internal::micro_queue< Value >::pop(), tbb::internal::micro_queue::push(), and tbb::strict_ppl::internal::micro_queue< Value >::push().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ move_v3()

void tbb::internal::move_v3 ( tbb_thread_v3 t1,
tbb_thread_v3 t2 
)

Definition at line 151 of file tbb_thread.cpp.

152 {
153  if (t1.joinable())
154  t1.detach();
155  t1.my_handle = t2.my_handle;
156  t2.my_handle = 0;
157 #if _WIN32||_WIN64
158  t1.my_thread_id = t2.my_thread_id;
159  t2.my_thread_id = 0;
160 #endif // _WIN32||_WIN64
161 }

References tbb::internal::tbb_thread_v3::detach(), tbb::internal::tbb_thread_v3::joinable(), and tbb::internal::tbb_thread_v3::my_handle.

Referenced by tbb::move().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ occupy_slot()

static bool tbb::internal::occupy_slot ( generic_scheduler *&  slot,
generic_scheduler s 
)
inlinestatic

Definition at line 71 of file arena.cpp.

71  {
72  return !slot && as_atomic( slot ).compare_and_swap( &s, NULL ) == NULL;
73 }
void const char const char int ITT_FORMAT __itt_group_sync s
atomic< T > & as_atomic(T &t)
Definition: atomic.h:547

References as_atomic(), and s.

Referenced by tbb::internal::arena::occupy_free_slot_in_range().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=() [1/3]

bool tbb::internal::operator!= ( tbb_thread_v3::id  x,
tbb_thread_v3::id  y 
)
inline

Definition at line 276 of file tbb_thread.h.

277  {
278  return x.my_id != y.my_id;
279  }

◆ operator!=() [2/3]

template<typename Container , typename T , typename U >
bool tbb::internal::operator!= ( const vector_iterator< Container, T > &  i,
const vector_iterator< Container, U > &  j 
)

Definition at line 440 of file concurrent_vector.h.

440  {
441  return !(i==j);
442  }

◆ operator!=() [3/3]

template<typename C , typename T , typename U >
bool tbb::internal::operator!= ( const concurrent_queue_iterator< C, T > &  i,
const concurrent_queue_iterator< C, U > &  j 
)

Definition at line 1065 of file _concurrent_queue_impl.h.

1065  {
1066  return i.my_item!=j.my_item;
1067 }

References tbb::internal::concurrent_queue_iterator_base_v3::my_item.

◆ operator+()

template<typename Container , typename T >
vector_iterator<Container,T> tbb::internal::operator+ ( ptrdiff_t  offset,
const vector_iterator< Container, T > &  v 
)

Definition at line 430 of file concurrent_vector.h.

430  {
431  return vector_iterator<Container,T>( *v.my_vector, v.my_index+offset );
432  }

References tbb::internal::vector_iterator< Container, Value >::my_index, and tbb::internal::vector_iterator< Container, Value >::my_vector.

◆ operator-()

template<typename Container , typename T , typename U >
ptrdiff_t tbb::internal::operator- ( const vector_iterator< Container, T > &  i,
const vector_iterator< Container, U > &  j 
)

Definition at line 465 of file concurrent_vector.h.

465  {
466  return ptrdiff_t(i.my_index)-ptrdiff_t(j.my_index);
467  }

References tbb::internal::vector_iterator< Container, Value >::my_index.

◆ operator<() [1/2]

bool tbb::internal::operator< ( tbb_thread_v3::id  x,
tbb_thread_v3::id  y 
)
inline

Definition at line 280 of file tbb_thread.h.

281  {
282  return x.my_id < y.my_id;
283  }

◆ operator<() [2/2]

template<typename Container , typename T , typename U >
bool tbb::internal::operator< ( const vector_iterator< Container, T > &  i,
const vector_iterator< Container, U > &  j 
)

Definition at line 445 of file concurrent_vector.h.

445  {
446  return i.my_index<j.my_index;
447  }

References tbb::internal::vector_iterator< Container, Value >::my_index.

◆ operator<=() [1/2]

bool tbb::internal::operator<= ( tbb_thread_v3::id  x,
tbb_thread_v3::id  y 
)
inline

Definition at line 284 of file tbb_thread.h.

285  {
286  return x.my_id <= y.my_id;
287  }

◆ operator<=() [2/2]

template<typename Container , typename T , typename U >
bool tbb::internal::operator<= ( const vector_iterator< Container, T > &  i,
const vector_iterator< Container, U > &  j 
)

Definition at line 460 of file concurrent_vector.h.

460  {
461  return !(j<i);
462  }

◆ operator==() [1/3]

bool tbb::internal::operator== ( tbb_thread_v3::id  x,
tbb_thread_v3::id  y 
)
inline

Definition at line 272 of file tbb_thread.h.

273  {
274  return x.my_id == y.my_id;
275  }

◆ operator==() [2/3]

template<typename Container , typename T , typename U >
bool tbb::internal::operator== ( const vector_iterator< Container, T > &  i,
const vector_iterator< Container, U > &  j 
)

Definition at line 435 of file concurrent_vector.h.

435  {
436  return i.my_index==j.my_index && i.my_vector == j.my_vector;
437  }

References tbb::internal::vector_iterator< Container, Value >::my_index, and tbb::internal::vector_iterator< Container, Value >::my_vector.

◆ operator==() [3/3]

template<typename C , typename T , typename U >
bool tbb::internal::operator== ( const concurrent_queue_iterator< C, T > &  i,
const concurrent_queue_iterator< C, U > &  j 
)

Definition at line 1060 of file _concurrent_queue_impl.h.

1060  {
1061  return i.my_item==j.my_item;
1062 }

References tbb::internal::concurrent_queue_iterator_base_v3::my_item.

◆ operator>() [1/2]

bool tbb::internal::operator> ( tbb_thread_v3::id  x,
tbb_thread_v3::id  y 
)
inline

Definition at line 288 of file tbb_thread.h.

289  {
290  return x.my_id > y.my_id;
291  }

◆ operator>() [2/2]

template<typename Container , typename T , typename U >
bool tbb::internal::operator> ( const vector_iterator< Container, T > &  i,
const vector_iterator< Container, U > &  j 
)

Definition at line 450 of file concurrent_vector.h.

450  {
451  return j<i;
452  }

◆ operator>=() [1/2]

bool tbb::internal::operator>= ( tbb_thread_v3::id  x,
tbb_thread_v3::id  y 
)
inline

Definition at line 292 of file tbb_thread.h.

293  {
294  return x.my_id >= y.my_id;
295  }

◆ operator>=() [2/2]

template<typename Container , typename T , typename U >
bool tbb::internal::operator>= ( const vector_iterator< Container, T > &  i,
const vector_iterator< Container, U > &  j 
)

Definition at line 455 of file concurrent_vector.h.

455  {
456  return !(i<j);
457  }

◆ padded_allocate()

static void * tbb::internal::padded_allocate ( size_t  bytes,
size_t  alignment 
)
static

Definition at line 206 of file cache_aligned_allocator.cpp.

206  {
207  unsigned char* result = NULL;
208  unsigned char* base = (unsigned char*)std::malloc(alignment+bytes);
209  if( base ) {
210  // Round up to the next line
211  result = (unsigned char*)((uintptr_t)(base+alignment)&-alignment);
212  // Record where block actually starts.
213  ((uintptr_t*)result)[-1] = uintptr_t(base);
214  }
215  return result;
216 }

Referenced by initialize_handler_pointers().

Here is the caller graph for this function:

◆ padded_free()

static void tbb::internal::padded_free ( void p)
static

Definition at line 218 of file cache_aligned_allocator.cpp.

218  {
219  if( p ) {
220  __TBB_ASSERT( (uintptr_t)p>=0x4096, "attempt to free block not obtained from cache_aligned_allocator" );
221  // Recover where block actually starts
222  unsigned char* base = ((unsigned char**)p)[-1];
223  __TBB_ASSERT( (void*)((uintptr_t)(base+NFS_LineSize)&-NFS_LineSize)==p, "not allocated by NFS_Allocate?" );
224  std::free(base);
225  }
226 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void const char const char int ITT_FORMAT __itt_group_sync p

References __TBB_ASSERT, NFS_LineSize, and p.

Referenced by initialize_handler_pointers().

Here is the caller graph for this function:

◆ pause()

namespace msvc_inline_asm static inline void tbb::internal::pause ( uintptr_t  delay)

Definition at line 111 of file msvc_ia32_common.h.

111  {
112  _asm
113  {
114  mov __TBB_r(ax), delay
115  __TBB_L1:
116  pause
117  add __TBB_r(ax), -1
118  jne __TBB_L1
119  }
120  return;
121  }
namespace msvc_inline_asm static inline void pause(uintptr_t delay)
#define __TBB_r(reg_name)

References __TBB_r.

Referenced by ITT_VERSIONIZE().

Here is the caller graph for this function:

◆ poison_pointer()

◆ PrintExtraVersionInfo()

void tbb::internal::PrintExtraVersionInfo ( const char *  category,
const char *  format,
  ... 
)

Prints arbitrary extra TBB version information on stderr.

Definition at line 202 of file tbb_misc.cpp.

202  {
203  if( PrintVersionFlag ) {
204  char str[1024]; memset(str, 0, 1024);
205  va_list args; va_start(args, format);
206  // Note: correct vsnprintf definition obtained from tbb_assert_impl.h
207  vsnprintf( str, 1024-1, format, args);
208  va_end(args);
209  fprintf(stderr, "TBB: %s\t%s\n", category, str );
210  }
211 }
static bool PrintVersionFlag
Definition: tbb_misc.cpp:195

References PrintVersionFlag.

Referenced by DoOneTimeInitializations(), initialize_handler_pointers(), tbb::internal::governor::print_version_info(), and PrintRMLVersionInfo().

Here is the caller graph for this function:

◆ PrintRMLVersionInfo()

void tbb::internal::PrintRMLVersionInfo ( void arg,
const char *  server_info 
)

A callback routine to print RML version information on stderr.

Definition at line 213 of file tbb_misc.cpp.

213  {
214  PrintExtraVersionInfo( server_info, (const char *)arg );
215 }
void PrintExtraVersionInfo(const char *category, const char *format,...)
Prints arbitrary extra TBB version information on stderr.
Definition: tbb_misc.cpp:202

References PrintExtraVersionInfo().

Referenced by tbb::internal::governor::print_version_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintVersion()

void tbb::internal::PrintVersion ( )

Prints TBB version information on stderr.

Definition at line 197 of file tbb_misc.cpp.

197  {
198  PrintVersionFlag = true;
199  fputs(VersionString+1,stderr);
200 }
static const char VersionString[]
Definition: tbb_misc.cpp:193
static bool PrintVersionFlag
Definition: tbb_misc.cpp:195

References PrintVersionFlag, and VersionString.

Referenced by DoOneTimeInitializations().

Here is the caller graph for this function:

◆ prolonged_pause()

void tbb::internal::prolonged_pause ( )
inline

Definition at line 300 of file scheduler_common.h.

300  {
301 #if defined(__TBB_time_stamp) && !__TBB_STEALING_PAUSE
302  // Assumption based on practice: 1000-2000 ticks seems to be a suitable invariant for the
303  // majority of platforms. Currently, skip platforms that define __TBB_STEALING_PAUSE
304  // because these platforms require very careful tuning.
306  const machine_tsc_t finish = prev + 1000;
307  atomic_backoff backoff;
308  do {
309  backoff.bounded_pause();
311  if ( curr <= prev )
312  // Possibly, the current logical thread is moved to another hardware thread or overflow is occurred.
313  break;
314  prev = curr;
315  } while ( prev < finish );
316 #else
317 #ifdef __TBB_STEALING_PAUSE
318  static const long PauseTime = __TBB_STEALING_PAUSE;
319 #elif __TBB_ipf
320  static const long PauseTime = 1500;
321 #else
322  static const long PauseTime = 80;
323 #endif
324  // TODO IDEA: Update PauseTime adaptively?
325  __TBB_Pause(PauseTime);
326 #endif
327 }
#define __TBB_time_stamp()
uint64_t machine_tsc_t
#define __TBB_STEALING_PAUSE
Definition: mic_common.h:44
void __TBB_Pause(int32_t)
Definition: tbb_machine.h:335

References __TBB_Pause(), __TBB_STEALING_PAUSE, __TBB_time_stamp, and tbb::internal::atomic_backoff::bounded_pause().

Referenced by tbb::internal::custom_scheduler< SchedulerTraits >::receive_or_steal_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ punned_cast()

template<typename T , typename U >
T tbb::internal::punned_cast ( U *  ptr)
inline

Cast between unrelated pointer types.

This method should be used sparingly as a last resort for dealing with situations that inherently break strict ISO C++ aliasing rules.

Definition at line 318 of file tbb_stddef.h.

318  {
319  uintptr_t x = reinterpret_cast<uintptr_t>(ptr);
320  return reinterpret_cast<T>(x);
321 }

◆ reset_extra_state()

void tbb::internal::reset_extra_state ( task t)
inline

Definition at line 185 of file scheduler_common.h.

185  {
186  t->prefix().extra_state &= ~(es_task_is_stolen | es_task_enqueued);
187 }
Set if the task has been stolen.

References es_task_enqueued, es_task_is_stolen, and tbb::task::prefix().

Referenced by tbb::internal::custom_scheduler< SchedulerTraits >::local_wait_for_all().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run_initializer() [1/2]

void tbb::internal::run_initializer ( void(*)()  f,
atomic< do_once_state > &  state 
)
inline

Definition at line 229 of file tbb_misc.h.

229  {
230  f();
231  state = do_once_executed;
232 }
Do-once routine has been executed.
Definition: tbb_misc.h:197

References do_once_executed.

Referenced by atomic_do_once().

Here is the caller graph for this function:

◆ run_initializer() [2/2]

void tbb::internal::run_initializer ( bool(*)()  f,
atomic< do_once_state > &  state 
)
inline

Definition at line 235 of file tbb_misc.h.

235  {
236  state = f() ? do_once_executed : do_once_uninitialized;
237 }
Do-once routine has been executed.
Definition: tbb_misc.h:197
No execution attempts have been undertaken yet.
Definition: tbb_misc.h:195

References do_once_executed, and do_once_uninitialized.

◆ runtime_warning()

void __TBB_EXPORTED_FUNC tbb::internal::runtime_warning ( const char *  format,
  ... 
)

Report a runtime warning.

Definition at line 89 of file tbb_assert_impl.h.

90  {
91  char str[1024]; memset(str, 0, 1024);
92  va_list args; va_start(args, format);
93  vsnprintf( str, 1024-1, format, args);
94  va_end(args);
95  fprintf( stderr, "TBB Warning: %s\n", str);
96  }

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::clear(), tbb::internal::governor::create_rml_server(), tbb::internal::market::destroy(), tbb::internal::market::global_market(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::rehash(), and tbb::internal::governor::release_resources().

Here is the caller graph for this function:

◆ save_pack()

template<typename... Types>
stored_pack<Types...> tbb::internal::save_pack ( Types &&...  types)

Definition at line 172 of file _template_helpers.h.

172  {
173  return stored_pack<Types...>( std::forward<Types>(types)... );
174 }

◆ Scheduler_OneTimeInitialization()

void tbb::internal::Scheduler_OneTimeInitialization ( bool  itt_present)

Defined in scheduler.cpp.

Definition at line 56 of file scheduler.cpp.

56  {
59 #if __TBB_TASK_GROUP_CONTEXT
60  // There must be no tasks belonging to this fake task group. Mark invalid for the assert
61  __TBB_ASSERT(!(task_group_context::low_unused_state_bit & (task_group_context::low_unused_state_bit-1)), NULL);
62  the_dummy_context.my_state = task_group_context::low_unused_state_bit;
63 #if __TBB_TASK_PRIORITY
64  // It should never prevent tasks from being passed to execution.
65  the_dummy_context.my_priority = num_priority_levels - 1;
66 #endif /* __TBB_TASK_PRIORITY */
67 #endif /* __TBB_TASK_GROUP_CONTEXT */
68 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
static const intptr_t num_priority_levels
generic_scheduler * allocate_scheduler(market &m)
Definition: scheduler.cpp:41
generic_scheduler *(* AllocateSchedulerPtr)(market &)
Pointer to the scheduler factory function.
Definition: tbb_main.cpp:78

References __TBB_ASSERT, AllocateSchedulerPtr, tbb::task_group_context::low_unused_state_bit, and num_priority_levels.

Referenced by DoOneTimeInitializations().

Here is the caller graph for this function:

◆ set_one_bit()

void tbb::internal::set_one_bit ( population_t dest,
int  pos 
)
inline

Definition at line 53 of file task_stream.h.

53  {
54  __TBB_ASSERT( pos>=0, NULL );
55  __TBB_ASSERT( pos<int(sizeof(population_t)*CHAR_BIT), NULL );
56  __TBB_AtomicOR( &dest, one<<pos );
57 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
uintptr_t population_t
Definition: task_stream.h:50
const population_t one
Definition: task_stream.h:51
void __TBB_AtomicOR(volatile void *operand, uintptr_t addend)
Definition: tbb_machine.h:882

References __TBB_ASSERT, __TBB_AtomicOR(), and one.

Referenced by tbb::internal::task_stream< num_priority_levels >::push(), and tbb::internal::task_stream< num_priority_levels >::try_push().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ spin_wait_until_eq()

template<typename T , typename U >
void tbb::internal::spin_wait_until_eq ( const volatile T &  location,
const U  value 
)

Spin UNTIL the value of the variable is equal to a given value.

T and U should be comparable types.

Definition at line 403 of file tbb_machine.h.

403  {
404  atomic_backoff backoff;
405  while( location!=value ) backoff.pause();
406 }
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

References tbb::internal::atomic_backoff::pause(), and value.

Referenced by tbb::queuing_rw_mutex::scoped_lock::acquire(), tbb::internal::micro_queue::pop(), tbb::strict_ppl::internal::micro_queue< Value >::pop(), tbb::interface6::internal::aggregator_generic< aggregated_operation_type >::start_handle_operations(), tbb::interface6::aggregator_ext< internal::basic_handler >::start_handle_operations(), and tbb::queuing_rw_mutex::scoped_lock::wait_for_release_of_internal_lock().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ spin_wait_while()

template<typename predicate_type >
void tbb::internal::spin_wait_while ( predicate_type  condition)

Definition at line 409 of file tbb_machine.h.

409  {
410  atomic_backoff backoff;
411  while( condition() ) backoff.pause();
412 }

References tbb::internal::atomic_backoff::pause().

Referenced by tbb::internal::concurrent_vector_base_v3::helper::acquire_segment(), tbb::internal::concurrent_vector_base_v3::helper::enable_segment(), and tbb::internal::concurrent_vector_base_v3::helper::get_segment_value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ spin_wait_while_eq()

template<typename T , typename U >
void tbb::internal::spin_wait_while_eq ( const volatile T &  location,
value 
)

Spin WHILE the value of the variable is equal to a given value.

T and U should be comparable types.

Definition at line 395 of file tbb_machine.h.

395  {
396  atomic_backoff backoff;
397  while( location==value ) backoff.pause();
398 }
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

References tbb::internal::atomic_backoff::pause(), and value.

Referenced by tbb::queuing_mutex::scoped_lock::acquire(), tbb::queuing_rw_mutex::scoped_lock::acquire(), atomic_do_once(), tbb::queuing_rw_mutex::scoped_lock::downgrade_to_reader(), tbb::internal::concurrent_vector_base_v3::helper::enable_segment(), tbb::interface5::reader_writer_lock::end_write(), tbb::interface6::internal::aggregator_generic< aggregated_operation_type >::execute(), tbb::interface6::aggregator_ext< internal::basic_handler >::execute_impl(), tbb::internal::concurrent_vector_base_v3::internal_grow_to_at_least_with_result(), tbb::interface7::internal::task_arena_base::internal_initialize(), tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::operator[](), tbb::internal::micro_queue::pop(), tbb::strict_ppl::internal::micro_queue< Value >::pop(), tbb::queuing_mutex::scoped_lock::release(), tbb::queuing_rw_mutex::scoped_lock::release(), tbb::interface5::reader_writer_lock::start_read(), tbb::interface5::reader_writer_lock::start_write(), and tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ suppress_unused_warning() [1/3]

◆ suppress_unused_warning() [2/3]

template<typename T1 , typename T2 >
void tbb::internal::suppress_unused_warning ( const T1 &  ,
const T2 &   
)

Definition at line 382 of file tbb_stddef.h.

382 {}

◆ suppress_unused_warning() [3/3]

template<typename T1 , typename T2 , typename T3 >
void tbb::internal::suppress_unused_warning ( const T1 &  ,
const T2 &  ,
const T3 &   
)

Definition at line 383 of file tbb_stddef.h.

383 {}

◆ swap() [1/2]

void tbb::internal::swap ( concurrent_vector_base_v3::segment_t lhs,
concurrent_vector_base_v3::segment_t rhs 
)
inline

Definition at line 285 of file concurrent_vector.h.

285  {
286  lhs.swap(rhs);
287  }

◆ swap() [2/2]

◆ thread_get_id_v3()

tbb_thread_v3::id tbb::internal::thread_get_id_v3 ( )

Definition at line 143 of file tbb_thread.cpp.

143  {
144 #if _WIN32||_WIN64
145  return tbb_thread_v3::id( GetCurrentThreadId() );
146 #else
147  return tbb_thread_v3::id( pthread_self() );
148 #endif // _WIN32||_WIN64
149 }
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 id

References id.

Referenced by tbb::this_tbb_thread::get_id().

Here is the caller graph for this function:

◆ thread_sleep_v3()

void tbb::internal::thread_sleep_v3 ( const tick_count::interval_t i)

Definition at line 168 of file tbb_thread.cpp.

169 {
170 #if _WIN32||_WIN64
171  tick_count t0 = tick_count::now();
172  tick_count t1 = t0;
173  for(;;) {
174  double remainder = (i-(t1-t0)).seconds()*1e3; // milliseconds remaining to sleep
175  if( remainder<=0 ) break;
176  DWORD t = remainder>=INFINITE ? INFINITE-1 : DWORD(remainder);
177 #if !__TBB_WIN8UI_SUPPORT
178  Sleep( t );
179 #else
180  std::chrono::milliseconds sleep_time( t );
181  std::this_thread::sleep_for( sleep_time );
182 #endif
183  t1 = tick_count::now();
184  }
185 #else
186  struct timespec req;
187  double sec = i.seconds();
188 
189  req.tv_sec = static_cast<long>(sec);
190  req.tv_nsec = static_cast<long>( (sec - req.tv_sec)*1e9 );
191  nanosleep(&req, NULL);
192 #endif // _WIN32||_WIN64
193 }

References tbb::tick_count::now(), and tbb::tick_count::interval_t::seconds().

Referenced by tbb::this_tbb_thread::sleep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_yield_v3()

void tbb::internal::thread_yield_v3 ( )

Definition at line 163 of file tbb_thread.cpp.

164 {
165  __TBB_Yield();
166 }
#define __TBB_Yield()
Definition: ibm_aix51.h:48

References __TBB_Yield.

Referenced by tbb::this_tbb_thread::yield().

Here is the caller graph for this function:

◆ throw_bad_last_alloc_exception_v4()

void tbb::internal::throw_bad_last_alloc_exception_v4 ( )

Obsolete.

Definition at line 113 of file tbb_misc.cpp.

113  {
115 }
void __TBB_EXPORTED_FUNC throw_exception_v4(exception_id)
Gathers all throw operators in one place.
Definition: tbb_misc.cpp:117

References eid_bad_last_alloc, and throw_exception_v4().

Here is the call graph for this function:

◆ throw_exception()

void tbb::internal::throw_exception ( exception_id  eid)
inline

Versionless convenience wrapper for throw_exception_v4()

Definition at line 106 of file tbb_exception.h.

106 { throw_exception_v4(eid); }
void __TBB_EXPORTED_FUNC throw_exception_v4(exception_id)
Gathers all throw operators in one place.
Definition: tbb_misc.cpp:117

References throw_exception_v4().

Referenced by tbb::interface6::memory_pool_allocator< T, P >::allocate(), tbb::strict_ppl::concurrent_queue< T, A >::allocate_block(), tbb::concurrent_bounded_queue< T, A >::allocate_page(), tbb::internal::concurrent_vector_base_v3::helper::allocate_segment(), allocate_via_handler_v3(), tbb::interface5::concurrent_unordered_map< Key, T, Hasher, Key_equality, Allocator >::at(), tbb::internal::concurrent_monitor::commit_wait(), tbb::interface6::fixed_pool::fixed_pool(), tbb::interface5::reader_writer_lock::scoped_lock::internal_construct(), tbb::interface5::reader_writer_lock::scoped_lock_read::internal_construct(), tbb::internal::concurrent_queue_base_v3::internal_insert_item(), tbb::internal::concurrent_queue_base_v3::internal_pop(), tbb::internal::concurrent_vector_base_v3::internal_reserve(), tbb::concurrent_vector< padded_element, padded_allocator_type >::internal_subscript_with_exceptions(), tbb::internal::concurrent_vector_base_v3::internal_throw_exception(), tbb::strict_ppl::internal::concurrent_queue_base_v3< Value >::internal_throw_exception(), tbb::internal::concurrent_queue_base_v3::internal_throw_exception(), tbb::internal::critical_section_v4::lock(), tbb::interface5::reader_writer_lock::lock(), tbb::interface5::reader_writer_lock::lock_read(), tbb::task_handle< F >::mark_scheduled(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::max_load_factor(), tbb::interface6::memory_pool< Alloc >::memory_pool(), NFS_Allocate(), tbb::strict_ppl::parallel_for_impl(), tbb::internal::micro_queue::push(), tbb::interface5::concurrent_priority_queue< graph_task *, graph_task_comparator >::push(), tbb::strict_ppl::internal::micro_queue< Value >::spin_wait_until_my_turn(), internal::tagged_msg< TagType, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::variant::variant_cast_to(), and tbb::internal::task_group_base::~task_group_base().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ throw_exception_v4()

void tbb::internal::throw_exception_v4 ( exception_id  eid)

Gathers all throw operators in one place.

Its purpose is to minimize code bloat that can be caused by throw operators scattered in multiple places, especially in templates.

Definition at line 117 of file tbb_misc.cpp.

117  {
118  __TBB_ASSERT ( eid > 0 && eid < eid_max, "Unknown exception ID" );
119  switch ( eid ) {
120  case eid_bad_alloc: DO_THROW(std::bad_alloc, () );
121  case eid_bad_last_alloc: DO_THROW( bad_last_alloc, () );
122  case eid_nonpositive_step: DO_THROW(std::invalid_argument, ("Step must be positive") );
123  case eid_out_of_range: DO_THROW(std::out_of_range, ("Index out of requested size range") );
124  case eid_segment_range_error: DO_THROW(std::range_error, ("Index out of allocated segment slots") );
125  case eid_index_range_error: DO_THROW(std::range_error, ("Index is not allocated") );
126  case eid_missing_wait: DO_THROW( missing_wait, () );
127  case eid_invalid_multiple_scheduling: DO_THROW( invalid_multiple_scheduling, () );
128  case eid_improper_lock: DO_THROW( improper_lock, () );
129  case eid_possible_deadlock: DO_THROW(std::runtime_error, ("Resource deadlock would occur") );
130  case eid_operation_not_permitted: DO_THROW(std::runtime_error, ("Operation not permitted") );
131  case eid_condvar_wait_failed: DO_THROW(std::runtime_error, ("Wait on condition variable failed") );
132  case eid_invalid_load_factor: DO_THROW(std::out_of_range, ("Invalid hash load factor") );
133  case eid_reserved: DO_THROW(std::out_of_range, ("[backward compatibility] Invalid number of buckets") );
134  case eid_invalid_swap: DO_THROW(std::invalid_argument, ("swap() is invalid on non-equal allocators") );
135  case eid_reservation_length_error: DO_THROW(std::length_error, ("reservation size exceeds permitted max size") );
136  case eid_invalid_key: DO_THROW(std::out_of_range, ("invalid key") );
137  case eid_user_abort: DO_THROW( user_abort, () );
138  case eid_bad_tagged_msg_cast: DO_THROW(std::runtime_error, ("Illegal tagged_msg cast") );
139 #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE
140  case eid_blocking_thread_join_impossible: DO_THROW(std::runtime_error, ("Blocking terminate failed") );
141 #endif
142  default: break;
143  }
144 #if !TBB_USE_EXCEPTIONS && __APPLE__
145  out_of_range e1("");
146  length_error e2("");
147  range_error e3("");
148  invalid_argument e4("");
149 #endif /* !TBB_USE_EXCEPTIONS && __APPLE__ */
150 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
The last enumerator tracks the number of defined IDs. It must remain the last one.
Definition: tbb_exception.h:97
#define DO_THROW(exc, init_args)
Definition: tbb_misc.cpp:67

References __TBB_ASSERT, DO_THROW, eid_bad_alloc, eid_bad_last_alloc, eid_bad_tagged_msg_cast, eid_condvar_wait_failed, eid_improper_lock, eid_index_range_error, eid_invalid_key, eid_invalid_load_factor, eid_invalid_multiple_scheduling, eid_invalid_swap, eid_max, eid_missing_wait, eid_nonpositive_step, eid_operation_not_permitted, eid_out_of_range, eid_possible_deadlock, eid_reservation_length_error, eid_reserved, eid_segment_range_error, and eid_user_abort.

Referenced by throw_bad_last_alloc_exception_v4(), and throw_exception().

Here is the caller graph for this function:

Variable Documentation

◆ __TBB_InitOnceHiddenInstance

__TBB_InitOnce tbb::internal::__TBB_InitOnceHiddenInstance
static

Definition at line 71 of file tbb_main.cpp.

◆ _pad

const char tbb::internal::_pad[NFS_MaxLineSize - sizeof(int)] = {}
static

Padding in order to prevent false sharing.

Definition at line 38 of file tbb_main.cpp.

Referenced by DoOneTimeInitializations().

◆ AllocateSchedulerPtr

generic_scheduler *(* tbb::internal::AllocateSchedulerPtr)(market &)

Pointer to the scheduler factory function.

Defined in tbb_main.cpp

Definition at line 78 of file tbb_main.cpp.

Referenced by allocate_scheduler(), and Scheduler_OneTimeInitialization().

◆ allowed_parallelism_ctl

allowed_parallelism_control tbb::internal::allowed_parallelism_ctl
static

Definition at line 491 of file tbb_main.cpp.

Referenced by tbb::internal::market::app_parallelism_limit().

◆ controls

◆ FreeHandler

void(* tbb::internal::FreeHandler) (void *pointer) = &DummyFree
static

Handler for memory deallocation.

Definition at line 65 of file cache_aligned_allocator.cpp.

Referenced by DummyFree(), initialize_handler_pointers(), and is_malloc_used_v3().

◆ initialization_state

tbb::atomic<do_once_state> tbb::internal::initialization_state
static

Definition at line 135 of file cache_aligned_allocator.cpp.

Referenced by initialize_cache_aligned_allocator().

◆ MallocHandler

void*(* tbb::internal::MallocHandler) (size_t size) = &DummyMalloc
static

Handler for memory allocation.

Definition at line 62 of file cache_aligned_allocator.cpp.

Referenced by DummyMalloc(), initialize_handler_pointers(), and is_malloc_used_v3().

◆ MallocLinkTable

const dynamic_link_descriptor tbb::internal::MallocLinkTable[]
static
Initial value:
= {
}
#define DLD(s, h)
The helper to construct dynamic_link_descriptor structure.
Definition: dynamic_link.h:60
void *__TBB_EXPORTED_FUNC scalable_malloc(size_t size)
void __TBB_EXPORTED_FUNC scalable_aligned_free(void *ptr)
static void(* padded_free_handler)(void *p)
Handler for padded memory deallocation.
void *__TBB_EXPORTED_FUNC scalable_aligned_malloc(size_t size, size_t alignment)
static void *(* padded_allocate_handler)(size_t bytes, size_t alignment)
Handler for padded memory allocation.
static void(* FreeHandler)(void *pointer)
Handler for memory deallocation.
void __TBB_EXPORTED_FUNC scalable_free(void *ptr)
static void *(* MallocHandler)(size_t size)
Handler for memory allocation.

Table describing how to link the handlers.

Definition at line 86 of file cache_aligned_allocator.cpp.

Referenced by initialize_handler_pointers().

◆ MByte

const size_t tbb::internal::MByte = 1024*1024

Definition at line 44 of file tbb_misc.h.

Referenced by tbb::internal::generic_scheduler::init_stack_info().

◆ NFS_LineSize

size_t tbb::internal::NFS_LineSize = 128
static

Definition at line 169 of file cache_aligned_allocator.cpp.

Referenced by NFS_Allocate(), NFS_GetLineSize(), and padded_free().

◆ no_isolation

◆ NUM_NOTIFY_TYPES

const uintptr_t tbb::internal::NUM_NOTIFY_TYPES = 4

Definition at line 131 of file tbb_profiling.h.

◆ num_priority_levels

◆ one

const population_t tbb::internal::one = 1

Definition at line 51 of file task_stream.h.

Referenced by clear_one_bit(), is_bit_set(), and set_one_bit().

◆ padded_allocate_handler

void*(* tbb::internal::padded_allocate_handler) (size_t bytes, size_t alignment) = &dummy_padded_allocate
static

Handler for padded memory allocation.

Definition at line 80 of file cache_aligned_allocator.cpp.

Referenced by dummy_padded_allocate(), and initialize_handler_pointers().

◆ padded_free_handler

void(* tbb::internal::padded_free_handler) (void *p) = &dummy_padded_free
static

Handler for padded memory deallocation.

Definition at line 83 of file cache_aligned_allocator.cpp.

Referenced by dummy_padded_free(), and initialize_handler_pointers().

◆ PrintVersionFlag

bool tbb::internal::PrintVersionFlag = false
static

Definition at line 195 of file tbb_misc.cpp.

Referenced by PrintExtraVersionInfo(), and PrintVersion().

◆ priority_critical

const int tbb::internal::priority_critical = priority_stride_v4 * 3 + priority_stride_v4 / 3 * 2
static

◆ priority_stride_v4

const int tbb::internal::priority_stride_v4 = INT_MAX / 4
static

Definition at line 288 of file task.h.

◆ stack_size_ctl

stack_size_control tbb::internal::stack_size_ctl
static

Definition at line 492 of file tbb_main.cpp.

◆ static_invalid_page

void* tbb::internal::static_invalid_page
static

◆ task_alignment

const size_t tbb::internal::task_alignment = 32

Alignment for a task object.

Definition at line 159 of file scheduler_common.h.

◆ task_prefix_reservation_size

const size_t tbb::internal::task_prefix_reservation_size = ((sizeof(internal::task_prefix)-1)/task_alignment+1)*task_alignment

Number of bytes reserved for a task prefix.

If not exactly sizeof(task_prefix), the extra bytes precede the task_prefix.

Definition at line 163 of file scheduler_common.h.

Referenced by tbb::internal::generic_scheduler::allocate_task(), tbb::internal::generic_scheduler::deallocate_task(), and tbb::internal::mail_outbox::drain().

◆ ThreadStackSize

const size_t tbb::internal::ThreadStackSize = (sizeof(uintptr_t) <= 4 ? 2 : 4 )*MByte

Definition at line 53 of file tbb_misc.h.

Referenced by tbb::internal::stack_size_control::default_value().

◆ vector_allocation_error_flag

void* const tbb::internal::vector_allocation_error_flag = reinterpret_cast<void*>(size_t(63))
static

Bad allocation marker.

Definition at line 74 of file concurrent_vector.h.

Referenced by tbb::internal::concurrent_vector_base_v3::segment_t::store().

◆ VersionString

const char tbb::internal::VersionString[] = "\0" TBB_VERSION_STRINGS
static

The leading "\0" is here so that applying "strings" to the binary delivers a clean result.

Definition at line 193 of file tbb_misc.cpp.

Referenced by PrintVersion().


Copyright © 2005-2019 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.