Home ⌂Doc Index ◂Up ▴
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  binding_handler
 
class  blocked_rangeNd_impl
 
struct  body_arg_detector
 
struct  body_arg_detector< ReturnType(Callable::*)(T) const >
 
struct  body_arg_detector< ReturnType(Callable::*)(T)>
 
struct  bool_constant
 
class  circular_doubly_linked_list_with_sentinel
 Circular doubly-linked list with sentinel. More...
 
class  co_context
 
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  conditional
 
struct  conditional< true, T, U >
 
struct  conjunction
 
struct  conjunction< First, Args... >
 
struct  conjunction< T >
 
struct  conjunction<>
 
struct  context_guard_helper
 
struct  context_list_node_t
 
class  control_storage
 
struct  coroutine_type
 
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_integral
 
struct  is_integral_impl
 Partial support for std::is_integral. More...
 
struct  is_integral_impl< bool >
 
struct  is_integral_impl< char >
 
struct  is_integral_impl< int >
 
struct  is_integral_impl< long >
 
struct  is_integral_impl< long long >
 
struct  is_integral_impl< short >
 
struct  is_integral_impl< wchar_t >
 
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...
 
class  node_handle
 
class  node_handle< Key, Key, Node, Allocator >
 
class  node_handle_base
 
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
 
class  platform_topology
 
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_copy_assignment (MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
 
template<typename MyAlloc , typename OtherAlloc >
void allocator_copy_assignment (MyAlloc &, OtherAlloc &, traits_false_type)
 
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 *, 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 (void *, string_index, void *, void *, PortsTuple &)
 
template<int N, typename PortsTuple >
static void fgt_multioutput_node_with_body (void *, string_index, void *, void *, PortsTuple &, void *)
 
template<int N, typename PortsTuple >
static void fgt_multiinput_node (void *, string_index, void *, PortsTuple &, void *)
 
static void fgt_multiinput_multioutput_node (void *, string_index, void *, void *)
 
static void fgt_node (void *, string_index, void *, void *)
 
static void fgt_node (void *, string_index, void *, void *, void *)
 
static void fgt_node (void *, string_index, void *, void *, void *, void *)
 
static void fgt_node_with_body (void *, string_index, void *, void *, void *)
 
static void fgt_node_with_body (void *, 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_metadata_ptr_add_v11 (itt_domain_enum domain, void *addr, unsigned long long addr_extra, string_index key, void *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 register_node_addr (itt_domain_enum, void *, unsigned long long, string_index, void *)
 
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...
 
void create_coroutine (coroutine_type &c, size_t stack_size, void *arg)
 
void current_coroutine (coroutine_type &c)
 
void swap_coroutine (coroutine_type &prev_coroutine, coroutine_type &new_coroutine)
 
void destroy_coroutine (coroutine_type &c)
 
void co_local_wait_for_all (void *)
 
int __TBB_load_ittnotify ()
 
static unsigned calc_workers_soft_limit (unsigned workers_soft_limit, unsigned workers_hard_limit)
 
generic_schedulerallocate_scheduler (market &m, bool genuine)
 
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)
 
void initialize_numa_topology (size_t groups_num, int &nodes_count, int *&indexes_list, int *&concurrency_list)
 
binding_handlerallocate_binding_handler (int slot_num)
 
void deallocate_binding_handler (binding_handler *handler_ptr)
 
void bind_to_node (binding_handler *handler_ptr, int slot_num, int numa_id)
 
void restore_affinity (binding_handler *handler_ptr, int slot_num)
 
static bool GetBoolEnvironmentVariable (const char *name)
 
static long GetIntegralEnvironmentVariable (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)
 
size_t DefaultSystemPageSize ()
 Returns OS regular memory page size. More...
 
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 &, bool)
 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 139 of file task.h.

◆ concurrent_queue_base

◆ concurrent_queue_iterator_base

◆ concurrent_vector_base

◆ false_type

Definition at line 490 of file tbb_stddef.h.

◆ isolation_tag

typedef intptr_t tbb::internal::isolation_tag

A tag for task isolation.

Definition at line 143 of file task.h.

◆ machine_tsc_t

typedef uint64_t tbb::internal::machine_tsc_t

Definition at line 53 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 209 of file _template_helpers.h.

◆ memory_order

◆ population_t

typedef uintptr_t tbb::internal::population_t

Definition at line 46 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 131 of file task.h.

◆ scheduler_mutex_type

Mutex type for global locks in the scheduler.

Definition at line 133 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 92 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 98 of file _template_helpers.h.

◆ thread_id_type

typedef pthread_t tbb::internal::thread_id_type

Definition at line 52 of file tbb_thread.h.

◆ ticket

typedef size_t tbb::internal::ticket

Definition at line 42 of file concurrent_queue.cpp.

◆ tls_dtor_t

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

Definition at line 30 of file tls.h.

◆ Token

typedef unsigned long tbb::internal::Token

Definition at line 43 of file pipeline.h.

◆ tokendiff_t

Definition at line 44 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 42 of file _allocator_traits.h.

◆ true_type

Definition at line 489 of file tbb_stddef.h.

◆ version_tag

Definition at line 407 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 197 of file tbb_misc.h.

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

◆ 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 67 of file tbb_exception.h.

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

◆ 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 186 of file scheduler_common.h.

186  {
188  no_hint=0,
190  local_task=1,
192 
193  small_task=2,
195 
198  no_cache = 4,
201 };
Bitwise-OR of local_task and small_task.
Disable caching for a small task.
Task is known to have been allocated by this scheduler.
Task is known to be a small task.
Task is known to be a small task and must not be cached.

◆ 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 34 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 74 of file icc_generic.h.

◆ notify_type

◆ string_index

Enumerator
TBB_STRING_RESOURCE 

Definition at line 28 of file tbb_profiling.h.

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

◆ 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 162 of file scheduler_common.h.

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

◆ 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 476 of file tbb_machine.h.

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

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 485 of file tbb_machine.h.

485  {
486 #if __TBB_USE_GENERIC_PART_WORD_CAS
487  return __TBB_MaskedCompareAndSwap<int16_t>((volatile int16_t *)ptr,value,comparand);
488 #else
489  return __TBB_machine_cmpswp2(ptr,value,comparand);
490 #endif
491 }
__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 494 of file tbb_machine.h.

494  {
495  // Cast shuts up /Wp64 warning
496  return (int32_t)__TBB_machine_cmpswp4(ptr,value,comparand);
497 }
#define __TBB_machine_cmpswp4
Definition: ibm_aix51.h:41
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_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 501 of file tbb_machine.h.

501  {
502  return __TBB_machine_cmpswp8(ptr,value,comparand);
503 }
#define __TBB_machine_cmpswp8
Definition: ibm_aix51.h:42
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_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 282 of file tbb_stddef.h.

282 { return false; }

◆ __TBB_FetchAndAddGeneric()

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

Definition at line 507 of file tbb_machine.h.

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

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 519 of file tbb_machine.h.

519  {
520  T result;
521  for( atomic_backoff b;;b.pause() ) {
522  result = *reinterpret_cast<volatile T *>(ptr);
523  // __TBB_CompareAndSwapGeneric presumed to have full fence.
524  if( __TBB_CompareAndSwapGeneric<S,T> ( ptr, value, result )==result )
525  break;
526  }
527  return result;
528 }
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 722 of file tbb_machine.h.

722  {
723  return machine_load_store_seq_cst<T,sizeof(T)>::load( location );
724 }
struct __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG("tbb::atomic is deprecated, use std::atomic") atomic< T * > struct __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG("tbb::atomic is deprecated, use std::atomic") atomic< void * > T load(const atomic< T > &a)
Specialization for atomic<T*> with arithmetic and operator->.
Definition: atomic.h:546

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 735 of file tbb_machine.h.

735  {
736  return machine_load_store_relaxed<T,sizeof(T)>::load( const_cast<T&>(location) );
737 }
struct __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG("tbb::atomic is deprecated, use std::atomic") atomic< T * > struct __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG("tbb::atomic is deprecated, use std::atomic") atomic< void * > T load(const atomic< T > &a)
Specialization for atomic<T*> with arithmetic and operator->.
Definition: atomic.h:546

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 432 of file tbb_machine.h.

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

726  {
727  machine_load_store_seq_cst<T,sizeof(T)>::store( location, T(value) );
728 }
void store(atomic< T > &a, T value)
Definition: atomic.h:549
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 730 of file tbb_machine.h.

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

739  {
740  machine_load_store_relaxed<T,sizeof(T)>::store( const_cast<T&>(location), T(value) );
741 }
void store(atomic< T > &a, T value)
Definition: atomic.h:549
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 743 of file tbb_machine.h.

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

713  {
714  machine_load_store<T,sizeof(T)>::store_with_release( location, T(value) );
715 }
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::interface11::buffer_node< T, Allocator >::internal_consume(), tbb::flow::interface11::queue_node< T, Allocator >::internal_consume(), tbb::flow::interface11::priority_queue_node< T, Compare, Allocator >::internal_consume(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_forward(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_forward_task_impl(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_pop(), tbb::flow::interface11::queue_node< T, Allocator >::internal_pop(), tbb::flow::interface11::priority_queue_node< T, Compare, Allocator >::internal_pop(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_push(), tbb::flow::interface11::sequencer_node< T, Allocator >::internal_push(), tbb::flow::interface11::priority_queue_node< T, Compare, Allocator >::internal_push(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_reg_succ(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_release(), tbb::flow::interface11::priority_queue_node< T, Compare, Allocator >::internal_release(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_rem_succ(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_reserve(), tbb::flow::interface11::queue_node< T, Allocator >::internal_reserve(), tbb::flow::interface11::priority_queue_node< T, Compare, Allocator >::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< internal::queueing_port::queueing_port_operation >::start_handle_operations(), tbb::interface6::aggregator_ext< internal::basic_handler >::start_handle_operations(), tbb::internal::atomic_impl< I >::store_with_release(), tbb::internal::generic_scheduler::unlock_task_pool(), and tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer().

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 717 of file tbb_machine.h.

717  {
718  machine_load_store<size_t,sizeof(size_t)>::store_with_release( location, 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.

◆ allocate_binding_handler()

binding_handler* tbb::internal::allocate_binding_handler ( int  slot_num)

Definition at line 273 of file tbb_bind.cpp.

273  {
274  __TBB_ASSERT(slot_num > 0, "Trying to create numa handler for 0 threads.");
275  return new binding_handler(slot_num);
276 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

References __TBB_ASSERT.

◆ allocate_closure_v3()

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

Allocate a closure.

Definition at line 35 of file tbb_thread.cpp.

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

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,
bool  genuine 
)
inline

Definition at line 37 of file scheduler.cpp.

37  {
38  return AllocateSchedulerPtr( m, genuine);
39 }
generic_scheduler *(* AllocateSchedulerPtr)(market &, bool)
Pointer to the scheduler factory function.
Definition: tbb_main.cpp:75

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 224 of file cache_aligned_allocator.cpp.

224  {
225  void* result = (*MallocHandler) (n);
226  if (!result) {
228  }
229  return result;
230 }
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(), and tbb::movable_exception< ExceptionData >::move().

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

◆ allocator_copy_assignment() [1/2]

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

Copy assignment implementation for allocator if propagate_on_container_copy_assignment == true_type Noop if pocca == false_type

Definition at line 49 of file _allocator_traits.h.

49  {
50  my_allocator = other_allocator;
51 }

Referenced by tbb::interface10::internal::concurrent_skip_list< Traits >::operator=(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::operator=().

Here is the caller graph for this function:

◆ allocator_copy_assignment() [2/2]

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

Definition at line 53 of file _allocator_traits.h.

53 { /* NO COPY */}

◆ 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 59 of file _allocator_traits.h.

59  {
60  my_allocator = std::move(other_allocator);
61 }
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:319

References tbb::move().

Referenced by tbb::interface10::internal::concurrent_skip_list< Traits >::internal_move_assign(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_move_assign(), tbb::internal::node_handle_base< Key, Node, Allocator >::operator=(), and tbb::concurrent_vector< padded_element, padded_allocator_type >::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 63 of file _allocator_traits.h.

63 { /* 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 69 of file _allocator_traits.h.

69  {
70  using std::swap;
71  swap(my_allocator, other_allocator);
72 }
void swap(atomic< T > &lhs, atomic< T > &rhs)
Definition: atomic.h:564

References swap().

Referenced by tbb::internal::node_handle_base< Key, Node, Allocator >::swap(), tbb::interface10::internal::concurrent_skip_list< Traits >::swap(), tbb::concurrent_vector< padded_element, padded_allocator_type >::swap(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, 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 74 of file _allocator_traits.h.

74 { /* NO SWAP */ }

◆ as_atomic()

◆ assert_task_valid()

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

Definition at line 237 of file scheduler_common.h.

237 {}

Referenced by tbb::internal::allocate_continuation_proxy::allocate(), tbb::internal::allocate_child_proxy::allocate(), tbb::internal::generic_scheduler::get_task(), and tbb::internal::custom_scheduler< SchedulerTraits >::process_bypass_loop().

Here is the caller graph for this function:

◆ 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 213 of file tbb_misc.h.

213  {
214  // tbb::atomic provides necessary acquire and release fences.
215  // The loop in the implementation is necessary to avoid race when thread T2
216  // that arrived in the middle of initialization attempt by another thread T1
217  // has just made initialization possible.
218  // In such a case T2 has to rely on T1 to initialize, but T1 may already be past
219  // the point where it can recognize the changed conditions.
220  while ( state != do_once_executed ) {
221  if( state == do_once_uninitialized ) {
222  if( state.compare_and_swap( do_once_pending, do_once_uninitialized ) == do_once_uninitialized ) {
223  run_initializer( initializer, state );
224  break;
225  }
226  }
228  }
229 }
void run_initializer(bool(*f)(), atomic< do_once_state > &state)
Definition: tbb_misc.h:238
Do-once routine has been executed.
Definition: tbb_misc.h:200
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:391
No execution attempts have been undertaken yet.
Definition: tbb_misc.h:198
A thread is executing associated do-once routine.
Definition: tbb_misc.h:199

References 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 186 of file tbb_misc.h.

186  {
187  T1 oldValue = dst;
188  while ( compare(oldValue, newValue) ) {
189  if ( dst.compare_and_swap((T1)newValue, oldValue) == oldValue )
190  break;
191  oldValue = dst;
192  }
193  return oldValue;
194 }

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

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:

◆ bind_to_node()

void tbb::internal::bind_to_node ( binding_handler handler_ptr,
int  slot_num,
int  numa_id 
)

Definition at line 283 of file tbb_bind.cpp.

283  {
284  __TBB_ASSERT(handler_ptr != NULL, "Trying to get access to uninitialized metadata.");
285  __TBB_ASSERT(platform_topology::instance().is_topology_parsed(),
286  "Trying to get access to uninitialized platform_topology.");
287  handler_ptr->bind_thread_to_node(slot_num, numa_id);
288 }
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 * instance
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

References __TBB_ASSERT, tbb::internal::binding_handler::bind_thread_to_node(), and tbb::internal::platform_topology::instance().

Here is the call 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 86 of file market.cpp.

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

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 175 of file _template_helpers.h.

175  {
176  strip<Pack>::type::template call<void>( std::forward<F>(f), std::forward<Pack>(p) );
177 }
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 180 of file _template_helpers.h.

180  {
181  return strip<Pack>::type::template call<Ret>( std::forward<F>(f), std::forward<Pack>(p) );
182 }
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 292 of file tbb_main.cpp.

292 {}

◆ clear_one_bit()

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

Definition at line 55 of file task_stream.h.

55  {
56  __TBB_ASSERT( pos>=0, NULL );
57  __TBB_ASSERT( pos<int(sizeof(population_t)*CHAR_BIT), NULL );
58  __TBB_AtomicAND( &dest, ~(one<<pos) );
59 }
const population_t one
Definition: task_stream.h:47
void __TBB_AtomicAND(volatile void *operand, uintptr_t addend)
Definition: tbb_machine.h:888
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
uintptr_t population_t
Definition: task_stream.h:46

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:

◆ co_local_wait_for_all()

void tbb::internal::co_local_wait_for_all ( void )

Referenced by create_coroutine().

Here is the caller graph for this function:

◆ ConcurrentWaitsEnabled()

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

Definition at line 293 of file scheduler_common.h.

293 { 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 230 of file tbb_misc.cpp.

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

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

Here is the caller graph for this function:

◆ create_coroutine()

void tbb::internal::create_coroutine ( coroutine_type c,
size_t  stack_size,
void arg 
)
inline

Definition at line 154 of file co_context.h.

154  {
155  const size_t REG_PAGE_SIZE = governor::default_page_size();
156  const size_t page_aligned_stack_size = (stack_size + (REG_PAGE_SIZE - 1)) & ~(REG_PAGE_SIZE - 1);
157  const size_t protected_stack_size = page_aligned_stack_size + 2 * REG_PAGE_SIZE;
158 
159  // Allocate the stack with protection property
160  uintptr_t stack_ptr = (uintptr_t)mmap(NULL, protected_stack_size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);
161  __TBB_ASSERT((void*)stack_ptr != MAP_FAILED, NULL);
162 
163  // Allow read write on our stack (guarded pages are still protected)
164  int err = mprotect((void*)(stack_ptr + REG_PAGE_SIZE), page_aligned_stack_size, PROT_READ | PROT_WRITE);
165  __TBB_ASSERT_EX(!err, NULL);
166 
167  // Remember the stack state
168  c.my_stack = (void*)(stack_ptr + REG_PAGE_SIZE);
169  c.my_stack_size = page_aligned_stack_size;
170 
171  err = getcontext(&c.my_context);
172  __TBB_ASSERT_EX(!err, NULL);
173 
174  c.my_context.uc_link = 0;
175  // cast to char* to disable FreeBSD clang-3.4.1 'incompatible type' error
176  c.my_context.uc_stack.ss_sp = (char*)c.my_stack;
177  c.my_context.uc_stack.ss_size = c.my_stack_size;
178  c.my_context.uc_stack.ss_flags = 0;
179 
180  typedef void(*coroutine_func_t)();
181  makecontext(&c.my_context, (coroutine_func_t)co_local_wait_for_all, sizeof(arg) / sizeof(int), arg);
182 }
void co_local_wait_for_all(void *)
#define MAP_ANONYMOUS
Definition: co_context.h:49
#define MAP_STACK
Definition: co_context.h:45
#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:167
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

References __TBB_ASSERT, __TBB_ASSERT_EX, co_local_wait_for_all(), tbb::internal::governor::default_page_size(), MAP_ANONYMOUS, MAP_STACK, tbb::internal::coroutine_type::my_context, tbb::internal::coroutine_type::my_stack, and tbb::internal::coroutine_type::my_stack_size.

Referenced by tbb::internal::co_context::co_context().

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

◆ current_coroutine()

void tbb::internal::current_coroutine ( coroutine_type c)
inline

Definition at line 184 of file co_context.h.

184  {
185  int err = getcontext(&c.my_context);
186  __TBB_ASSERT_EX(!err, NULL);
187 }
#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:167

References __TBB_ASSERT_EX, and tbb::internal::coroutine_type::my_context.

Referenced by tbb::internal::co_context::co_context().

Here is the caller graph for this function:

◆ deallocate_binding_handler()

void tbb::internal::deallocate_binding_handler ( binding_handler handler_ptr)

Definition at line 278 of file tbb_bind.cpp.

278  {
279  __TBB_ASSERT(handler_ptr != NULL, "Trying to deallocate NULL pointer.");
280  delete handler_ptr;
281 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

References __TBB_ASSERT.

◆ 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 232 of file cache_aligned_allocator.cpp.

232  {
233  if( p ) {
234  (*FreeHandler)( p );
235  }
236 }
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(), and tbb::tbb_exception::operator delete().

Here is the caller graph for this function:

◆ DefaultSystemPageSize()

size_t tbb::internal::DefaultSystemPageSize ( )

Returns OS regular memory page size.

Definition at line 70 of file tbb_misc.cpp.

70  {
71 #if _WIN32
72  SYSTEM_INFO si;
73  GetSystemInfo(&si);
74  return si.dwPageSize;
75 #else
76  return sysconf(_SC_PAGESIZE);
77 #endif
78 }

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

Here is the caller graph for this function:

◆ destroy_coroutine()

void tbb::internal::destroy_coroutine ( coroutine_type c)
inline

Definition at line 194 of file co_context.h.

194  {
195  const size_t REG_PAGE_SIZE = governor::default_page_size();
196  // Free stack memory with guarded pages
197  munmap((void*)((uintptr_t)c.my_stack - REG_PAGE_SIZE), c.my_stack_size + 2 * REG_PAGE_SIZE);
198  // Clear the stack state afterwards
199  c.my_stack = NULL;
200  c.my_stack_size = 0;
201 }

References tbb::internal::governor::default_page_size(), tbb::internal::coroutine_type::my_stack, and tbb::internal::coroutine_type::my_stack_size.

Referenced by tbb::internal::co_context::~co_context().

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

◆ destroy_process_mask()

void tbb::internal::destroy_process_mask ( )
inline

Definition at line 266 of file tbb_misc.h.

266 {}

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 215 of file tbb_main.cpp.

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

References _pad, tbb::internal::__TBB_InitOnce::add_ref(), tbb::internal::governor::default_num_threads(), tbb::internal::governor::default_page_size(), 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 151 of file cache_aligned_allocator.cpp.

151  {
154  return (*padded_allocate_handler)(bytes, alignment);
155 }
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.
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
static void *(* padded_allocate_handler)(size_t bytes, size_t alignment)
Handler for padded memory allocation.

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 158 of file cache_aligned_allocator.cpp.

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

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 144 of file cache_aligned_allocator.cpp.

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

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 137 of file cache_aligned_allocator.cpp.

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

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 47 of file _tbb_trace_impl.h.

47 { }

◆ fgt_alg_end_body()

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

Definition at line 48 of file _tbb_trace_impl.h.

48 { }

◆ fgt_algorithm()

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

Definition at line 44 of file _tbb_trace_impl.h.

44 { }

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 299 of file _flow_graph_trace_impl.h.

299 { }

Referenced by internal::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 342 of file _flow_graph_trace_impl.h.

342 { }

Referenced by tbb::flow::interface11::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 341 of file _flow_graph_trace_impl.h.

341 { }

Referenced by tbb::flow::interface11::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 339 of file _flow_graph_trace_impl.h.

339 { }

Referenced by tbb::flow::interface11::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 340 of file _flow_graph_trace_impl.h.

340 { }

Referenced by tbb::flow::interface11::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 45 of file _tbb_trace_impl.h.

45 { }

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

Here is the caller graph for this function:

◆ fgt_begin_body()

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

◆ fgt_body()

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

Definition at line 313 of file _flow_graph_trace_impl.h.

313 { }

◆ fgt_composite()

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

Definition at line 301 of file _flow_graph_trace_impl.h.

301 { }

Referenced by tbb::flow::interface11::composite_node< tbb::flow::tuple< InputTypes... >, tbb::flow::tuple<> >::composite_node(), and tbb::flow::interface11::composite_node< tbb::flow::tuple<>, tbb::flow::tuple< OutputTypes... > >::composite_node().

Here is the caller graph for this function:

◆ fgt_end_algorithm()

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

Definition at line 46 of file _tbb_trace_impl.h.

46 { }

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

Here is the caller graph for this function:

◆ fgt_end_body()

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

Definition at line 337 of file _flow_graph_trace_impl.h.

337 { }

Referenced by internal::continue_input< Output, Policy >::apply_body_bypass(), internal::function_input< Input, Output, Policy, A >::apply_body_impl(), and internal::multifunction_input< Input, OutputPortSet, Policy, A >::apply_body_impl_bypass().

Here is the caller graph for this function:

◆ fgt_graph()

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

Definition at line 303 of file _flow_graph_trace_impl.h.

303 { }

◆ fgt_graph_desc()

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

Definition at line 311 of file _flow_graph_trace_impl.h.

311 { }

◆ fgt_make_edge()

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

Definition at line 333 of file _flow_graph_trace_impl.h.

333 { }

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

Here is the caller graph for this function:

◆ fgt_multiinput_multioutput_node()

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

Definition at line 324 of file _flow_graph_trace_impl.h.

324 { }

Referenced by tbb::flow::interface11::composite_node< tbb::flow::tuple< InputTypes... >, tbb::flow::tuple< OutputTypes... > >::composite_node(), and tbb::flow::interface11::opencl_node< tuple< Ports... >, JP, Factory >::opencl_node().

Here is the caller graph for this function:

◆ fgt_multiinput_multioutput_node_desc()

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

Definition at line 347 of file _flow_graph_trace_impl.h.

347 { }

◆ fgt_multiinput_node()

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

Definition at line 322 of file _flow_graph_trace_impl.h.

322 { }

◆ fgt_multioutput_node()

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

Definition at line 316 of file _flow_graph_trace_impl.h.

316 { }

◆ fgt_multioutput_node_desc()

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

Definition at line 306 of file _flow_graph_trace_impl.h.

306 { }

Referenced by tbb::flow::interface11::internal::unfolded_join_node< 6, key_matching_port, OutputTuple, key_matching< K, KHash > >::unfolded_join_node().

Here is the caller graph for this function:

◆ fgt_multioutput_node_with_body()

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

Definition at line 319 of file _flow_graph_trace_impl.h.

319 { }

◆ fgt_node() [1/3]

◆ fgt_node() [2/3]

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

Definition at line 327 of file _flow_graph_trace_impl.h.

327 { }

◆ fgt_node() [3/3]

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

Definition at line 328 of file _flow_graph_trace_impl.h.

328 { }

◆ fgt_node_desc()

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

Definition at line 309 of file _flow_graph_trace_impl.h.

309 { }

◆ fgt_node_with_body() [1/2]

◆ fgt_node_with_body() [2/2]

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

Definition at line 331 of file _flow_graph_trace_impl.h.

331 { }

◆ fgt_release_wait()

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

Definition at line 344 of file _flow_graph_trace_impl.h.

344 { }

◆ fgt_remove_edge()

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

Definition at line 334 of file _flow_graph_trace_impl.h.

334 { }

Referenced by tbb::flow::interface11::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 343 of file _flow_graph_trace_impl.h.

343 { }

◆ first() [1/3]

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

Definition at line 34 of file _range_iterator.h.

34 {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::task_list::clear(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::concurrent_hash_map(), tbb::interface10::internal::concurrent_skip_list< Traits >::concurrent_skip_list(), 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(), tbb::task_list::empty(), internal::item_buffer< OutputTuple >::get_my_item(), tbb::concurrent_vector< padded_element, padded_allocator_type >::grow_by(), tbb::interface10::internal::concurrent_skip_list< Traits >::insert(), 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::interface10::internal::concurrent_skip_list< Traits >::internal_copy(), 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::interface10::internal::concurrent_skip_list< Traits >::not_greater_compare::operator()(), 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(), tbb::interface10::internal::concurrent_skip_list< Traits >::unsafe_erase(), 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 37 of file _range_iterator.h.

37 {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 59 of file _range_iterator.h.

59 {return arr;}

◆ fix_broken_rethrow()

void tbb::internal::fix_broken_rethrow ( )

Definition at line 197 of file tbb_misc.cpp.

197 {}

◆ free_closure_v3()

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

Free a closure allocated by allocate_closure_v3.

Definition at line 41 of file tbb_thread.cpp.

42 {
44 }
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 198 of file tbb_misc.cpp.

198 { 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 149 of file task.cpp.

149  {
150  const size_t X_FACTOR = 4;
151  return X_FACTOR * governor::local_scheduler()->max_threads_in_arena();
152 }

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 38 of file tbb_environment.h.

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

References name, and s.

Referenced by DoOneTimeInitializations().

Here is the caller graph for this function:

◆ GetIntegralEnvironmentVariable()

static long tbb::internal::GetIntegralEnvironmentVariable ( const char *  name)
inlinestatic

Definition at line 57 of file tbb_environment.h.

57  {
58  if( const char* s = std::getenv(name) )
59  {
60  char* end = NULL;
61  errno = 0;
62  long value = std::strtol(s, &end, 10);
63 
64  // We have exceeded the range, value is negative or string is incovertable
65  if ( errno == ERANGE || value < 0 || end==s )
66  {
67  return -1;
68  }
69 
70  for ( ; *end != '\0'; end++ )
71  {
72  if ( !std::isspace(*end) )
73  return -1;
74  }
75 
76  return value;
77  }
78  return -1;
79 }
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
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name
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 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 end, name, s, and value.

◆ 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 87 of file tbb_misc.cpp.

87  {
88  char buf[256];
89 #if _MSC_VER
90  #define snprintf _snprintf
91 #endif
92  int written = snprintf(buf, sizeof(buf), "%s: %s", what, strerror( error_code ));
93  // On overflow, the returned value exceeds sizeof(buf) (for GLIBC) or is negative (for MSVC).
94  __TBB_ASSERT_EX( written>0 && written<(int)sizeof(buf), "Error description is too long" );
95  // Ensure that buffer ends in terminator.
96  buf[sizeof(buf)-1] = 0;
97 #if TBB_USE_EXCEPTIONS
98  throw std::runtime_error(buf);
99 #else
100  PRINT_ERROR_AND_ABORT( "runtime_error", buf);
101 #endif /* !TBB_USE_EXCEPTIONS */
102 }
#define PRINT_ERROR_AND_ABORT(exc_name, msg)
Definition: tbb_misc.cpp:62
#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:167

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::internal::tbb_thread_v3::internal_start(), and tbb::internal::tbb_thread_v3::join().

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 77 of file concurrent_vector.h.

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

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 132 of file cache_aligned_allocator.cpp.

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

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 113 of file cache_aligned_allocator.cpp.

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

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:

◆ initialize_numa_topology()

void tbb::internal::initialize_numa_topology ( size_t  groups_num,
int nodes_count,
int *&  indexes_list,
int *&  concurrency_list 
)

Definition at line 267 of file tbb_bind.cpp.

268  {
269  platform_topology::instance().initialize(groups_num);
270  platform_topology::instance().fill(nodes_count, indexes_list, concurrency_list);
271 }
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 * instance

References tbb::internal::platform_topology::fill(), tbb::internal::platform_topology::initialize(), and tbb::internal::platform_topology::instance().

Here is the call 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 370 of file tbb_stddef.h.

370  {
371  return 0==((uintptr_t)pointer & (alignment-1));
372 }

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 61 of file task_stream.h.

61  {
62  __TBB_ASSERT( pos>=0, NULL );
63  __TBB_ASSERT( pos<int(sizeof(population_t)*CHAR_BIT), NULL );
64  return (val & (one<<pos)) != 0;
65 }
const population_t one
Definition: task_stream.h:47
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
uintptr_t population_t
Definition: task_stream.h:46

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 1014 of file task.h.

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

References tbb::internal::task_prefix::extra_state, and tbb::task::prefix().

Referenced by tbb::internal::arena::enqueue_task(), tbb::internal::custom_scheduler< SchedulerTraits >::local_wait_for_all(), tbb::internal::custom_scheduler< SchedulerTraits >::process_bypass_loop(), 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 238 of file cache_aligned_allocator.cpp.

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

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 376 of file tbb_stddef.h.

376  {
377  return arg && (0 == (arg & (arg - 1)));
378 }

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 392 of file tbb_stddef.h.

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

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 222 of file tbb_profiling.h.

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

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 210 of file tbb_profiling.h.

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

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 438 of file tbb_main.cpp.

438  {
439  //TODO: replace this with __TBB_load_relaxed
440  void* result = *static_cast<void*const*>(src);
441  return result;
442 }

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 276 of file tbb_main.cpp.

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

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 168 of file tbb_profiling.h.

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

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< internal::queueing_port::queueing_port_operation >::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 199 of file tbb_profiling.h.

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

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 278 of file tbb_profiling.h.

279  {}

◆ 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 414 of file tbb_main.cpp.

415  { }

◆ itt_metadata_ptr_add_v11()

void tbb::internal::itt_metadata_ptr_add_v11 ( itt_domain_enum  domain,
void addr,
unsigned long long  addr_extra,
string_index  key,
void value 
)

Definition at line 423 of file tbb_main.cpp.

424  {}

◆ 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 281 of file tbb_profiling.h.

282  {}

◆ 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 417 of file tbb_main.cpp.

418  { }

◆ 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 292 of file tbb_profiling.h.

293  {}

◆ 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 431 of file tbb_main.cpp.

432  { }

◆ itt_region_end()

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

Definition at line 295 of file tbb_profiling.h.

295 {}

◆ 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 434 of file tbb_main.cpp.

434 { }

◆ 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 284 of file tbb_profiling.h.

285  {}

◆ 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 420 of file tbb_main.cpp.

421  { }

◆ itt_set_sync_name_v3()

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

Definition at line 444 of file tbb_main.cpp.

444  {
445  ITT_SYNC_RENAME(obj, name);
447 }
#define ITT_SYNC_RENAME(obj, name)
Definition: itt_notify.h:116
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
Definition: tbb_stddef.h:398
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 271 of file tbb_main.cpp.

271  {
273  __TBB_store_with_release(*static_cast<void**>(dst),src);
274 }
void __TBB_store_with_release(volatile T &location, V value)
Definition: tbb_machine.h:713
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:112

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 157 of file tbb_profiling.h.

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

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< internal::queueing_port::queueing_port_operation >::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 188 of file tbb_profiling.h.

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

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 287 of file tbb_profiling.h.

288  {}

◆ 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 426 of file tbb_main.cpp.

427  { }

◆ itt_task_end()

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

Definition at line 290 of file tbb_profiling.h.

290 {}

◆ itt_task_end_v7()

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

Definition at line 429 of file tbb_main.cpp.

429 { }

◆ last() [1/3]

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

Definition at line 40 of file _range_iterator.h.

40 {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::interface10::internal::concurrent_skip_list< Traits >::concurrent_skip_list(), 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::interface10::internal::concurrent_skip_list< Traits >::insert(), 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::interface10::internal::concurrent_skip_list< Traits >::internal_copy(), 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(), tbb::interface10::internal::concurrent_skip_list< Traits >::unsafe_erase(), 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 43 of file _range_iterator.h.

43 {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 62 of file _range_iterator.h.

62 {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 1013 of file task.h.

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

References tbb::internal::task_prefix::extra_state, and tbb::task::prefix().

Referenced by tbb::internal::arena::enqueue_task(), and tbb::flow::interface11::internal::prioritize_task().

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 119 of file tbb_misc.h.

119  {
120  return val1 < val2 ? val2 : val1;
121 }

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 110 of file tbb_misc.h.

110  {
111  return val1 < val2 ? val1 : val2;
112 }

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

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 382 of file tbb_stddef.h.

382  {
383  __TBB_ASSERT( is_power_of_two(divisor), "Divisor should be a power of two" );
384  return (arg & (divisor - 1));
385 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
bool is_power_of_two(integer_type arg)
A function to check if passed integer is a power of 2.
Definition: tbb_stddef.h:376

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 147 of file tbb_thread.cpp.

148 {
149  if (t1.joinable())
150  t1.detach();
151  t1.my_handle = t2.my_handle;
152  t2.my_handle = 0;
153 #if _WIN32||_WIN64
154  t1.my_thread_id = t2.my_thread_id;
155  t2.my_thread_id = 0;
156 #endif // _WIN32||_WIN64
157 }

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 111 of file arena.cpp.

111  {
112  return !slot && as_atomic( slot ).compare_and_swap( &s, NULL ) == NULL;
113 }
void const char const char int ITT_FORMAT __itt_group_sync s
atomic< T > & as_atomic(T &t)
Definition: atomic.h:572

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 286 of file tbb_thread.h.

287  {
288  return x.my_id != y.my_id;
289  }

◆ 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 447 of file concurrent_vector.h.

447  {
448  return !(i==j);
449  }

◆ 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 1071 of file _concurrent_queue_impl.h.

1071  {
1072  return i.my_item!=j.my_item;
1073 }

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 437 of file concurrent_vector.h.

437  {
438  return vector_iterator<Container,T>( *v.my_vector, v.my_index+offset );
439  }

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 472 of file concurrent_vector.h.

472  {
473  return ptrdiff_t(i.my_index)-ptrdiff_t(j.my_index);
474  }

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 290 of file tbb_thread.h.

291  {
292  return x.my_id < y.my_id;
293  }

◆ 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 452 of file concurrent_vector.h.

452  {
453  return i.my_index<j.my_index;
454  }

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 294 of file tbb_thread.h.

295  {
296  return x.my_id <= y.my_id;
297  }

◆ 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 467 of file concurrent_vector.h.

467  {
468  return !(j<i);
469  }

◆ operator==() [1/3]

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

Definition at line 282 of file tbb_thread.h.

283  {
284  return x.my_id == y.my_id;
285  }

◆ 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 442 of file concurrent_vector.h.

442  {
443  return i.my_index==j.my_index && i.my_vector == j.my_vector;
444  }

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 1066 of file _concurrent_queue_impl.h.

1066  {
1067  return i.my_item==j.my_item;
1068 }

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 298 of file tbb_thread.h.

299  {
300  return x.my_id > y.my_id;
301  }

◆ 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 457 of file concurrent_vector.h.

457  {
458  return j<i;
459  }

◆ operator>=() [1/2]

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

Definition at line 302 of file tbb_thread.h.

303  {
304  return x.my_id >= y.my_id;
305  }

◆ 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 462 of file concurrent_vector.h.

462  {
463  return !(i<j);
464  }

◆ padded_allocate()

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

Definition at line 202 of file cache_aligned_allocator.cpp.

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

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 214 of file cache_aligned_allocator.cpp.

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

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 107 of file msvc_ia32_common.h.

107  {
108  _asm
109  {
110  mov __TBB_r(ax), delay
111  __TBB_L1:
112  pause
113  add __TBB_r(ax), -1
114  jne __TBB_L1
115  }
116  return;
117  }
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 211 of file tbb_misc.cpp.

211  {
212  if( PrintVersionFlag ) {
213  char str[1024]; memset(str, 0, 1024);
214  va_list args; va_start(args, format);
215  // Note: correct vsnprintf definition obtained from tbb_assert_impl.h
216  vsnprintf( str, 1024-1, format, args);
217  va_end(args);
218  fprintf(stderr, "TBB: %s\t%s\n", category, str );
219  }
220 }
static bool PrintVersionFlag
Definition: tbb_misc.cpp:204

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 222 of file tbb_misc.cpp.

222  {
223  PrintExtraVersionInfo( server_info, (const char *)arg );
224 }
void PrintExtraVersionInfo(const char *category, const char *format,...)
Prints arbitrary extra TBB version information on stderr.
Definition: tbb_misc.cpp:211

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 206 of file tbb_misc.cpp.

206  {
207  PrintVersionFlag = true;
208  fputs(VersionString+1,stderr);
209 }
static const char VersionString[]
Definition: tbb_misc.cpp:202
static bool PrintVersionFlag
Definition: tbb_misc.cpp:204

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 297 of file scheduler_common.h.

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

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 314 of file tbb_stddef.h.

314  {
315  uintptr_t x = reinterpret_cast<uintptr_t>(ptr);
316  return reinterpret_cast<T>(x);
317 }

◆ register_node_addr()

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

Definition at line 275 of file tbb_profiling.h.

275 {}

◆ reset_extra_state()

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

Definition at line 181 of file scheduler_common.h.

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

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

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

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

◆ restore_affinity()

void tbb::internal::restore_affinity ( binding_handler handler_ptr,
int  slot_num 
)

Definition at line 290 of file tbb_bind.cpp.

290  {
291  __TBB_ASSERT(handler_ptr != NULL, "Trying to get access to uninitialized metadata.");
292  __TBB_ASSERT(platform_topology::instance().is_topology_parsed(),
293  "Trying to get access to uninitialized platform_topology.");
294  handler_ptr->restore_previous_affinity_mask(slot_num);
295 }
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 * instance
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

References __TBB_ASSERT, tbb::internal::platform_topology::instance(), and tbb::internal::binding_handler::restore_previous_affinity_mask().

Here is the call graph for this function:

◆ run_initializer() [1/2]

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

Definition at line 232 of file tbb_misc.h.

232  {
233  f();
234  state = do_once_executed;
235 }
Do-once routine has been executed.
Definition: tbb_misc.h:200

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 238 of file tbb_misc.h.

238  {
239  state = f() ? do_once_executed : do_once_uninitialized;
240 }
Do-once routine has been executed.
Definition: tbb_misc.h:200
No execution attempts have been undertaken yet.
Definition: tbb_misc.h:198

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 85 of file tbb_assert_impl.h.

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

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 185 of file _template_helpers.h.

185  {
186  return stored_pack<Types...>( std::forward<Types>(types)... );
187 }

◆ Scheduler_OneTimeInitialization()

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

Defined in scheduler.cpp.

Definition at line 52 of file scheduler.cpp.

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

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 49 of file task_stream.h.

49  {
50  __TBB_ASSERT( pos>=0, NULL );
51  __TBB_ASSERT( pos<int(sizeof(population_t)*CHAR_BIT), NULL );
52  __TBB_AtomicOR( &dest, one<<pos );
53 }
const population_t one
Definition: task_stream.h:47
void __TBB_AtomicOR(volatile void *operand, uintptr_t addend)
Definition: tbb_machine.h:878
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
uintptr_t population_t
Definition: task_stream.h:46

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 399 of file tbb_machine.h.

399  {
400  atomic_backoff backoff;
401  while( location!=value ) backoff.pause();
402 }
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< internal::queueing_port::queueing_port_operation >::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 405 of file tbb_machine.h.

405  {
406  atomic_backoff backoff;
407  while( condition() ) backoff.pause();
408 }

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 391 of file tbb_machine.h.

391  {
392  atomic_backoff backoff;
393  while( location==value ) backoff.pause();
394 }
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::interface6::internal::aggregator_generic< internal::queueing_port::queueing_port_operation >::execute(), tbb::interface6::aggregator_ext< internal::basic_handler >::execute_impl(), tbb::internal::concurrent_vector_base_v3::internal_grow_to_at_least_with_result(), 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(), 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 399 of file tbb_stddef.h.

399 {}

◆ 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 400 of file tbb_stddef.h.

400 {}

◆ 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 284 of file concurrent_vector.h.

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

◆ swap() [2/2]

◆ swap_coroutine()

void tbb::internal::swap_coroutine ( coroutine_type prev_coroutine,
coroutine_type new_coroutine 
)
inline

Definition at line 189 of file co_context.h.

189  {
190  int err = swapcontext(&prev_coroutine.my_context, &new_coroutine.my_context);
191  __TBB_ASSERT_EX(!err, NULL);
192 }
#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:167

References __TBB_ASSERT_EX, and tbb::internal::coroutine_type::my_context.

Referenced by tbb::internal::co_context::resume().

Here is the caller graph for this function:

◆ thread_get_id_v3()

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

Definition at line 139 of file tbb_thread.cpp.

139  {
140 #if _WIN32||_WIN64
141  return tbb_thread_v3::id( GetCurrentThreadId() );
142 #else
143  return tbb_thread_v3::id( pthread_self() );
144 #endif // _WIN32||_WIN64
145 }
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 164 of file tbb_thread.cpp.

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

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 159 of file tbb_thread.cpp.

160 {
161  __TBB_Yield();
162 }
#define __TBB_Yield()
Definition: ibm_aix51.h:44

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 122 of file tbb_misc.cpp.

122  {
124 }
void __TBB_EXPORTED_FUNC throw_exception_v4(exception_id)
Gathers all throw operators in one place.
Definition: tbb_misc.cpp:126

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 105 of file tbb_exception.h.

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

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::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::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 126 of file tbb_misc.cpp.

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

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 68 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 34 of file tbb_main.cpp.

Referenced by DoOneTimeInitializations().

◆ AllocateSchedulerPtr

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

Pointer to the scheduler factory function.

Defined in tbb_main.cpp

Definition at line 75 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 507 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 61 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 131 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 58 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:
= {
}
static void *(* MallocHandler)(size_t size)
Handler for memory allocation.
void *__TBB_EXPORTED_FUNC scalable_aligned_malloc(size_t size, size_t alignment)
static void(* padded_free_handler)(void *p)
Handler for padded memory deallocation.
static void(* FreeHandler)(void *pointer)
Handler for memory deallocation.
void __TBB_EXPORTED_FUNC scalable_free(void *ptr)
void *__TBB_EXPORTED_FUNC scalable_malloc(size_t size)
#define DLD(s, h)
The helper to construct dynamic_link_descriptor structure.
Definition: dynamic_link.h:56
static void *(* padded_allocate_handler)(size_t bytes, size_t alignment)
Handler for padded memory allocation.
void __TBB_EXPORTED_FUNC scalable_aligned_free(void *ptr)

Table describing how to link the handlers.

Definition at line 82 of file cache_aligned_allocator.cpp.

Referenced by initialize_handler_pointers().

◆ MByte

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

Definition at line 45 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 165 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 47 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 76 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 79 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 204 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 310 of file task.h.

◆ stack_size_ctl

stack_size_control tbb::internal::stack_size_ctl
static

Definition at line 508 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 155 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 159 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 54 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 73 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 202 of file tbb_misc.cpp.

Referenced by PrintVersion().


Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.