Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tbb Namespace Reference

The graph class. More...

Namespaces

 flow
 
 interface10
 
 interface5
 
 interface6
 
 interface7
 
 interface8
 
 interface9
 
 internal
 Identifiers declared inside namespace internal should never be used directly by client code.
 
 serial
 
 strict_ppl
 For internal use only.
 
 this_task_arena
 
 this_tbb_thread
 

Classes

class  blocked_range
 A range over which to iterate. More...
 
class  blocked_range2d
 A 2-dimensional range that models the Range concept. More...
 
class  blocked_range3d
 A 3-dimensional range that models the Range concept. More...
 
class  cache_aligned_allocator
 Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. More...
 
class  cache_aligned_allocator< void >
 Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. More...
 
class  combinable
 Thread-local storage with optional reduction. More...
 
class  concurrent_bounded_queue
 A high-performance thread-safe blocking concurrent bounded queue. More...
 
class  concurrent_vector
 Concurrent vector container. More...
 
struct  tbb_hash_compare
 hash_compare that is default argument for concurrent_hash_map More...
 
class  scoped_lock
 The scoped locking pattern. More...
 
class  null_mutex
 A mutex which does nothing. More...
 
class  null_rw_mutex
 A rw mutex which does nothing. More...
 
struct  pre_scan_tag
 Used to indicate that the initial scan is being performed. More...
 
struct  final_scan_tag
 Used to indicate that the final scan is being performed. More...
 
class  parallel_while
 Parallel iteration over a stream, with optional addition of more work. More...
 
class  simple_partitioner
 A simple partitioner. More...
 
class  auto_partitioner
 An auto partitioner. More...
 
class  static_partitioner
 A static partitioner. More...
 
class  affinity_partitioner
 An affinity partitioner. More...
 
class  filter
 A stage in a pipeline. More...
 
class  thread_bound_filter
 A stage in a pipeline served by a user thread. More...
 
class  queuing_mutex
 Queuing mutex with local-only spinning. More...
 
class  queuing_rw_mutex
 Queuing reader-writer mutex with local-only spinning. More...
 
class  spin_mutex
 A lock that occupies a single byte. More...
 
class  spin_rw_mutex_v3
 Fast, unfair, spinning reader-writer lock with backoff and writer-preference. More...
 
class  task_group_context
 Used to form groups of tasks. More...
 
class  task
 Base class for user-defined tasks. More...
 
class  empty_task
 task that does nothing. Useful for synchronization. More...
 
class  task_list
 A list of children. More...
 
class  task_handle
 
class  task_group
 
class  structured_task_group
 
class  task_scheduler_init
 Class delimiting the scope of task scheduler activity. More...
 
class  tbb_allocator
 Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. More...
 
class  tbb_allocator< void >
 Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. More...
 
class  zero_allocator
 Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. More...
 
class  zero_allocator< void, Allocator >
 Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. More...
 
class  bad_last_alloc
 Exception for concurrent containers. More...
 
class  improper_lock
 Exception for PPL locks. More...
 
class  user_abort
 Exception for user-initiated abort. More...
 
class  missing_wait
 Exception for missing wait on structured_task_group. More...
 
class  invalid_multiple_scheduling
 Exception for repeated scheduling of the same task_handle. More...
 
class  tbb_exception
 Interface to be implemented by all exceptions TBB recognizes and propagates across the threads. More...
 
class  captured_exception
 This class is used by TBB to propagate information about unhandled exceptions into the root thread. More...
 
class  movable_exception
 Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread. More...
 
class  split
 Dummy type that distinguishes splitting constructor from copy constructor. More...
 
class  proportional_split
 Type enables transmission of splitting proportion from partitioners to range objects. More...
 
class  tick_count
 Absolute timestamp. More...
 
class  tricky_atomic_pointer
 A view of a T* with additional functionality for twiddling low-order bits. More...
 

Typedefs

typedef pthread_mutex_t * native_handle_type
 Return native_handle. More...
 
typedef
interface7::internal::padded_mutex
< spin_mutex, false > 
speculative_spin_mutex
 A cross-platform spin mutex with speculative lock acquisition. More...
 
typedef spin_rw_mutex_v3 spin_rw_mutex
 
typedef std::size_t stack_size_type
 
typedef char tchar
 Unicode support. More...
 
typedef tricky_atomic_pointer
< queuing_rw_mutex::scoped_lock
tricky_pointer
 
typedef void(* assertion_handler_type )(const char *filename, int line, const char *expression, const char *comment)
 Type for an assertion handler. More...
 

Enumerations

enum  memory_semantics { full_fence, acquire, release, relaxed }
 Specifies memory semantics. More...
 
enum  ets_key_usage_type { ets_key_per_instance, ets_no_key }
 enum for selecting between single key and key-per-instance versions More...
 
enum  state_t { INITIALIZED =0x1234, DESTROYED =0x789A, HELD =0x56CD }
 
enum  priority_t { priority_normal = internal::priority_stride_v4 * 2, priority_low = priority_normal - internal::priority_stride_v4, priority_high = priority_normal + internal::priority_stride_v4 }
 
enum  task_group_status { not_complete, complete, canceled }
 
enum  state_t_flags {
  STATE_NONE = 0, STATE_WRITER = 1<<0, STATE_READER = 1<<1, STATE_READER_UNBLOCKNEXT = 1<<2,
  STATE_ACTIVEREADER = 1<<3, STATE_UPGRADE_REQUESTED = 1<<4, STATE_UPGRADE_WAITING = 1<<5, STATE_UPGRADE_LOSER = 1<<6,
  STATE_COMBINED_WAITINGREADER = STATE_READER | STATE_READER_UNBLOCKNEXT, STATE_COMBINED_READER = STATE_COMBINED_WAITINGREADER | STATE_ACTIVEREADER, STATE_COMBINED_UPGRADING = STATE_UPGRADE_WAITING | STATE_UPGRADE_LOSER
}
 Flag bits in a state_t that specify information about a locking request. More...
 

Functions

template<typename T , size_t N = 1>
class __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG ("tbb::aligned_space is deprecated, use std::aligned_storage") aligned_space
 Block of space aligned sufficiently to construct an array T with N elements. More...
 
template<typename T >
struct __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG ("tbb::atomic is deprecated, use std::atomic") atomic
 Primary template for atomic. More...
 
template<>
struct __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG ("tbb::atomic is deprecated, use std::atomic") atomic< void * >
 Specialization for atomic<void*>, for sake of not allowing arithmetic or operator->. More...
 
template<memory_semantics M, typename T >
load (const atomic< T > &a)
 
template<memory_semantics M, typename T >
void store (atomic< T > &a, T value)
 
template<typename T , typename U >
bool operator== (const cache_aligned_allocator< T > &, const cache_aligned_allocator< U > &)
 
template<typename T , typename U >
bool operator!= (const cache_aligned_allocator< T > &, const cache_aligned_allocator< U > &)
 
template<typename Key , typename T , typename HashCompare , typename A1 , typename A2 >
bool operator== (const concurrent_hash_map< Key, T, HashCompare, A1 > &a, const concurrent_hash_map< Key, T, HashCompare, A2 > &b)
 
template<typename Key , typename T , typename HashCompare , typename A1 , typename A2 >
bool operator!= (const concurrent_hash_map< Key, T, HashCompare, A1 > &a, const concurrent_hash_map< Key, T, HashCompare, A2 > &b)
 
template<typename Key , typename T , typename HashCompare , typename A >
void swap (concurrent_hash_map< Key, T, HashCompare, A > &a, concurrent_hash_map< Key, T, HashCompare, A > &b)
 
template<typename T , class A1 , class A2 >
bool operator== (const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)
 
template<typename T , class A1 , class A2 >
bool operator!= (const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)
 
template<typename T , class A1 , class A2 >
bool operator< (const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)
 
template<typename T , class A1 , class A2 >
bool operator> (const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)
 
template<typename T , class A1 , class A2 >
bool operator<= (const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)
 
template<typename T , class A1 , class A2 >
bool operator>= (const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)
 
template<typename T , class A >
void swap (concurrent_vector< T, A > &a, concurrent_vector< T, A > &b)
 
template<typename Key >
class __TBB_DEPRECATED_MSG ("tbb::tbb_hash is deprecated, use std::hash") tbb_hash
 
class __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG ("tbb::critical_section is deprecated, use std::mutex") mutex
 Wrapper around the platform's native lock. More...
 
 ~mutex ()
 
void lock ()
 Acquire lock. More...
 
bool try_lock ()
 Try acquiring lock (non-blocking) More...
 
void unlock ()
 Release lock. More...
 
native_handle_type native_handle ()
 
void __TBB_EXPORTED_METHOD internal_construct ()
 All checks from mutex constructor using mutex.state were moved here. More...
 
void __TBB_EXPORTED_METHOD internal_destroy ()
 All checks from mutex destructor using mutex.state were moved here. More...
 
class __TBB_DEPRECATED_MSG ("tbb::pipeline is deprecated, use tbb::parallel_pipeline") pipeline
 A processing pipeline that applies filters to items. More...
 
class __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG ("tbb::recursive_mutex is deprecated, use std::recursive_mutex") recursive_mutex
 Mutex that allows recursive mutex acquisition. More...
 
 ~recursive_mutex ()
 
bool is_current_task_group_canceling ()
 
template<class F >
task_handle< typename
internal::strip< F >::type
make_task (F &&f)
 
template<typename T , typename U >
bool operator== (const tbb_allocator< T > &, const tbb_allocator< U > &)
 
template<typename T , typename U >
bool operator!= (const tbb_allocator< T > &, const tbb_allocator< U > &)
 
template<typename T1 , template< typename X1 > class B1, typename T2 , template< typename X2 > class B2>
bool operator== (const zero_allocator< T1, B1 > &a, const zero_allocator< T2, B2 > &b)
 
template<typename T1 , template< typename X1 > class B1, typename T2 , template< typename X2 > class B2>
bool operator!= (const zero_allocator< T1, B1 > &a, const zero_allocator< T2, B2 > &b)
 
void atomic_fence ()
 Sequentially consistent full memory fence. More...
 
assertion_handler_type
__TBB_EXPORTED_FUNC 
set_assertion_handler (assertion_handler_type new_handler)
 Set assertion handler and return previous value of it. More...
 
void __TBB_EXPORTED_FUNC assertion_failure (const char *filename, int line, const char *expression, const char *comment)
 Process an assertion failure. More...
 
int __TBB_EXPORTED_FUNC TBB_runtime_interface_version ()
 The function returns the interface version of the TBB shared library being used. More...
 
void swap (internal::tbb_thread_v3 &t1, internal::tbb_thread_v3 &t2) __TBB_NOEXCEPT(true)
 
void move (tbb_thread &t1, tbb_thread &t2)
 
tick_count::interval_t operator- (const tick_count &t1, const tick_count &t0)
 
uintptr_t get_flag (queuing_rw_mutex::scoped_lock *ptr)
 
template<typename T >
static T CAS (volatile T &addr, T newv, T oldv)
 
parallel_do

See also requirements on parallel_do Body.

template<typename Iterator , typename Body >
void parallel_do (Iterator first, Iterator last, const Body &body)
 Parallel iteration over a range, with optional addition of more work. More...
 
template<typename Range , typename Body >
void parallel_do (Range &rng, const Body &body)
 
template<typename Range , typename Body >
void parallel_do (const Range &rng, const Body &body)
 
template<typename Iterator , typename Body >
void parallel_do (Iterator first, Iterator last, const Body &body, task_group_context &context)
 Parallel iteration over a range, with optional addition of more work and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_do (Range &rng, const Body &body, task_group_context &context)
 
template<typename Range , typename Body >
void parallel_do (const Range &rng, const Body &body, task_group_context &context)
 
parallel_for

See also requirements on Range and parallel_for Body.

template<typename Range , typename Body >
void parallel_for (const Range &range, const Body &body)
 Parallel iteration over range with default partitioner. More...
 
template<typename Range , typename Body >
void parallel_for (const Range &range, const Body &body, const simple_partitioner &partitioner)
 Parallel iteration over range with simple partitioner. More...
 
template<typename Range , typename Body >
void parallel_for (const Range &range, const Body &body, const auto_partitioner &partitioner)
 Parallel iteration over range with auto_partitioner. More...
 
template<typename Range , typename Body >
void parallel_for (const Range &range, const Body &body, const static_partitioner &partitioner)
 Parallel iteration over range with static_partitioner. More...
 
template<typename Range , typename Body >
void parallel_for (const Range &range, const Body &body, affinity_partitioner &partitioner)
 Parallel iteration over range with affinity_partitioner. More...
 
template<typename Range , typename Body >
void parallel_for (const Range &range, const Body &body, task_group_context &context)
 Parallel iteration over range with default partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_for (const Range &range, const Body &body, const simple_partitioner &partitioner, task_group_context &context)
 Parallel iteration over range with simple partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_for (const Range &range, const Body &body, const auto_partitioner &partitioner, task_group_context &context)
 Parallel iteration over range with auto_partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_for (const Range &range, const Body &body, const static_partitioner &partitioner, task_group_context &context)
 Parallel iteration over range with static_partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_for (const Range &range, const Body &body, affinity_partitioner &partitioner, task_group_context &context)
 Parallel iteration over range with affinity_partitioner and user-supplied context. More...
 
parallel_for_each
template<typename Iterator , typename Function >
void parallel_for_each (Iterator first, Iterator last, const Function &f, task_group_context &context)
 Calls function f for all items from [first, last) interval using user-supplied context. More...
 
template<typename Range , typename Function >
void parallel_for_each (Range &rng, const Function &f, task_group_context &context)
 Calls function f for all items from rng using user-supplied context. More...
 
template<typename Range , typename Function >
void parallel_for_each (const Range &rng, const Function &f, task_group_context &context)
 Calls function f for all items from const rng user-supplied context. More...
 
template<typename Iterator , typename Function >
void parallel_for_each (Iterator first, Iterator last, const Function &f)
 Uses default context. More...
 
template<typename Range , typename Function >
void parallel_for_each (Range &rng, const Function &f)
 Uses default context. More...
 
template<typename Range , typename Function >
void parallel_for_each (const Range &rng, const Function &f)
 Uses default context. More...
 
parallel_invoke
template<typename F0 , typename F1 >
void parallel_invoke (const F0 &f0, const F1 &f1, tbb::task_group_context &context)
 Executes a list of tasks in parallel and waits for all tasks to complete. More...
 
template<typename F0 , typename F1 , typename F2 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, tbb::task_group_context &context)
 
template<typename F0 , typename F1 , typename F2 , typename F3 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, tbb::task_group_context &context)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, tbb::task_group_context &context)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 , typename F5 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, const F5 &f5, tbb::task_group_context &context)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 , typename F5 , typename F6 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, const F5 &f5, const F6 &f6, tbb::task_group_context &context)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 , typename F5 , typename F6 , typename F7 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, const F5 &f5, const F6 &f6, const F7 &f7, tbb::task_group_context &context)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 , typename F5 , typename F6 , typename F7 , typename F8 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, const F5 &f5, const F6 &f6, const F7 &f7, const F8 &f8, tbb::task_group_context &context)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 , typename F5 , typename F6 , typename F7 , typename F8 , typename F9 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, const F5 &f5, const F6 &f6, const F7 &f7, const F8 &f8, const F9 &f9, tbb::task_group_context &context)
 
template<typename F0 , typename F1 >
void parallel_invoke (const F0 &f0, const F1 &f1)
 
template<typename F0 , typename F1 , typename F2 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2)
 
template<typename F0 , typename F1 , typename F2 , typename F3 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 , typename F5 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, const F5 &f5)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 , typename F5 , typename F6 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, const F5 &f5, const F6 &f6)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 , typename F5 , typename F6 , typename F7 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, const F5 &f5, const F6 &f6, const F7 &f7)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 , typename F5 , typename F6 , typename F7 , typename F8 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, const F5 &f5, const F6 &f6, const F7 &f7, const F8 &f8)
 
template<typename F0 , typename F1 , typename F2 , typename F3 , typename F4 , typename F5 , typename F6 , typename F7 , typename F8 , typename F9 >
void parallel_invoke (const F0 &f0, const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4, const F5 &f5, const F6 &f6, const F7 &f7, const F8 &f8, const F9 &f9)
 
parallel_reduce

See also requirements on Range and parallel_reduce Body.

template<typename Range , typename Body >
void parallel_reduce (const Range &range, Body &body)
 Parallel iteration with reduction and default partitioner. More...
 
template<typename Range , typename Body >
void parallel_reduce (const Range &range, Body &body, const simple_partitioner &partitioner)
 Parallel iteration with reduction and simple_partitioner. More...
 
template<typename Range , typename Body >
void parallel_reduce (const Range &range, Body &body, const auto_partitioner &partitioner)
 Parallel iteration with reduction and auto_partitioner. More...
 
template<typename Range , typename Body >
void parallel_reduce (const Range &range, Body &body, const static_partitioner &partitioner)
 Parallel iteration with reduction and static_partitioner. More...
 
template<typename Range , typename Body >
void parallel_reduce (const Range &range, Body &body, affinity_partitioner &partitioner)
 Parallel iteration with reduction and affinity_partitioner. More...
 
template<typename Range , typename Body >
void parallel_reduce (const Range &range, Body &body, task_group_context &context)
 Parallel iteration with reduction, default partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_reduce (const Range &range, Body &body, const simple_partitioner &partitioner, task_group_context &context)
 Parallel iteration with reduction, simple partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_reduce (const Range &range, Body &body, const auto_partitioner &partitioner, task_group_context &context)
 Parallel iteration with reduction, auto_partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_reduce (const Range &range, Body &body, const static_partitioner &partitioner, task_group_context &context)
 Parallel iteration with reduction, static_partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_reduce (const Range &range, Body &body, affinity_partitioner &partitioner, task_group_context &context)
 Parallel iteration with reduction, affinity_partitioner and user-supplied context. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction)
 Parallel iteration with reduction and default partitioner. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner)
 Parallel iteration with reduction and simple_partitioner. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner)
 Parallel iteration with reduction and auto_partitioner. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const static_partitioner &partitioner)
 Parallel iteration with reduction and static_partitioner. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner)
 Parallel iteration with reduction and affinity_partitioner. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, task_group_context &context)
 Parallel iteration with reduction, default partitioner and user-supplied context. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner, task_group_context &context)
 Parallel iteration with reduction, simple partitioner and user-supplied context. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner, task_group_context &context)
 Parallel iteration with reduction, auto_partitioner and user-supplied context. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const static_partitioner &partitioner, task_group_context &context)
 Parallel iteration with reduction, static_partitioner and user-supplied context. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner, task_group_context &context)
 Parallel iteration with reduction, affinity_partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_deterministic_reduce (const Range &range, Body &body)
 Parallel iteration with deterministic reduction and default simple partitioner. More...
 
template<typename Range , typename Body >
void parallel_deterministic_reduce (const Range &range, Body &body, const simple_partitioner &partitioner)
 Parallel iteration with deterministic reduction and simple partitioner. More...
 
template<typename Range , typename Body >
void parallel_deterministic_reduce (const Range &range, Body &body, const static_partitioner &partitioner)
 Parallel iteration with deterministic reduction and static partitioner. More...
 
template<typename Range , typename Body >
void parallel_deterministic_reduce (const Range &range, Body &body, task_group_context &context)
 Parallel iteration with deterministic reduction, default simple partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_deterministic_reduce (const Range &range, Body &body, const simple_partitioner &partitioner, task_group_context &context)
 Parallel iteration with deterministic reduction, simple partitioner and user-supplied context. More...
 
template<typename Range , typename Body >
void parallel_deterministic_reduce (const Range &range, Body &body, const static_partitioner &partitioner, task_group_context &context)
 Parallel iteration with deterministic reduction, static partitioner and user-supplied context. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_deterministic_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction)
 Parallel iteration with deterministic reduction and default simple partitioner. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_deterministic_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner)
 Parallel iteration with deterministic reduction and simple partitioner. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_deterministic_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const static_partitioner &partitioner)
 Parallel iteration with deterministic reduction and static partitioner. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_deterministic_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, task_group_context &context)
 Parallel iteration with deterministic reduction, default simple partitioner and user-supplied context. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_deterministic_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner, task_group_context &context)
 Parallel iteration with deterministic reduction, simple partitioner and user-supplied context. More...
 
template<typename Range , typename Value , typename RealBody , typename Reduction >
Value parallel_deterministic_reduce (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const static_partitioner &partitioner, task_group_context &context)
 Parallel iteration with deterministic reduction, static partitioner and user-supplied context. More...
 
parallel_scan

See also requirements on Range and parallel_scan Body.

template<typename Range , typename Body >
void parallel_scan (const Range &range, Body &body)
 Parallel prefix with default partitioner. More...
 
template<typename Range , typename Body >
void parallel_scan (const Range &range, Body &body, const simple_partitioner &partitioner)
 Parallel prefix with simple_partitioner. More...
 
template<typename Range , typename Body >
void parallel_scan (const Range &range, Body &body, const auto_partitioner &partitioner)
 Parallel prefix with auto_partitioner. More...
 
template<typename Range , typename Value , typename Scan , typename ReverseJoin >
Value parallel_scan (const Range &range, const Value &identity, const Scan &scan, const ReverseJoin &reverse_join)
 Parallel prefix with default partitioner. More...
 
template<typename Range , typename Value , typename Scan , typename ReverseJoin >
Value parallel_scan (const Range &range, const Value &identity, const Scan &scan, const ReverseJoin &reverse_join, const simple_partitioner &partitioner)
 Parallel prefix with simple_partitioner. More...
 
template<typename Range , typename Value , typename Scan , typename ReverseJoin >
Value parallel_scan (const Range &range, const Value &identity, const Scan &scan, const ReverseJoin &reverse_join, const auto_partitioner &partitioner)
 Parallel prefix with auto_partitioner. More...
 
parallel_sort

See also requirements on iterators for parallel_sort.

template<typename RandomAccessIterator , typename Compare >
void parallel_sort (RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp)
 Sorts the data in [begin,end) using the given comparator. More...
 
template<typename RandomAccessIterator >
void parallel_sort (RandomAccessIterator begin, RandomAccessIterator end)
 Sorts the data in [begin,end) with a default comparator std::less<RandomAccessIterator> More...
 
template<typename Range , typename Compare >
void parallel_sort (Range &rng, const Compare &comp)
 Sorts the data in rng using the given comparator. More...
 
template<typename Range >
void parallel_sort (Range &rng)
 Sorts the data in rng with a default comparator std::less<RandomAccessIterator> More...
 
template<typename T >
void parallel_sort (T *begin, T *end)
 Sorts the data in the range [begin,end) with a default comparator std::less<T> More...
 

Variables

static const bool is_rw_mutex = false
 
static const bool is_recursive_mutex = false
 
static const bool is_fair_mutex = false
 
pthread_mutex_t impl
 
static const bool is_rw_mutex = false
 
static const bool is_recursive_mutex = true
 
static const bool is_fair_mutex = false
 
const unsigned char RELEASED = 0
 
const unsigned char ACQUIRED = 1
 
static const tricky_pointer::word FLAG = 0x1
 Mask for low order bit of a pointer. More...
 
static assertion_handler_type assertion_handler
 

Detailed Description

The graph class.

The namespace tbb contains all components of the library.

This header provides basic platform abstraction layer by hooking up appropriate architecture/OS/compiler specific headers from the /include/tbb/machine directory. If a plug-in header does not implement all the required APIs, it must specify the missing ones by setting one or more of the following macros:

__TBB_USE_GENERIC_PART_WORD_CAS __TBB_USE_GENERIC_PART_WORD_FETCH_ADD __TBB_USE_GENERIC_PART_WORD_FETCH_STORE __TBB_USE_GENERIC_FETCH_ADD __TBB_USE_GENERIC_FETCH_STORE __TBB_USE_GENERIC_DWORD_FETCH_ADD __TBB_USE_GENERIC_DWORD_FETCH_STORE __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE __TBB_USE_GENERIC_RELAXED_LOAD_STORE __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE

In this case tbb_machine.h will add missing functionality based on a minimal set of APIs that are required to be implemented by all plug-n headers as described further. Note that these generic implementations may be sub-optimal for a particular architecture, and thus should be relied upon only after careful evaluation or as the last resort.

Additionally __TBB_64BIT_ATOMICS can be set to 0 on a 32-bit architecture to indicate that the port is not going to support double word atomics. It may also be set to 1 explicitly, though normally this is not necessary as tbb_machine.h will set it automatically.

__TBB_ENDIANNESS macro can be defined by the implementation as well. It is used only if __TBB_USE_GENERIC_PART_WORD_CAS is set (or for testing), and must specify the layout of aligned 16-bit and 32-bit data anywhere within a process (while the details of unaligned 16-bit or 32-bit data or of 64-bit data are irrelevant). The layout must be the same at all relevant memory locations within the current process; in case of page-specific endianness, one endianness must be kept "out of sight". Possible settings, reflecting hardware and possibly O.S. convention, are:

  • __TBB_ENDIAN_BIG for big-endian data,
  • __TBB_ENDIAN_LITTLE for little-endian data,
  • __TBB_ENDIAN_DETECT for run-time detection iff exactly one of the above,
  • __TBB_ENDIAN_UNSUPPORTED to prevent undefined behavior if none of the above.

Prerequisites for each architecture port

The following functions and macros have no generic implementation. Therefore they must be implemented in each machine architecture specific header either as a conventional function or as a functional macro.

__TBB_WORDSIZE This is the size of machine word in bytes, i.e. for 32 bit systems it should be defined to 4.

__TBB_Yield() Signals OS that the current thread is willing to relinquish the remainder of its time quantum.

__TBB_full_memory_fence() Must prevent all memory operations from being reordered across it (both by hardware and compiler). All such fences must be totally ordered (or sequentially consistent).

__TBB_machine_cmpswp4( volatile void *ptr, int32_t value, int32_t comparand ) Must be provided if __TBB_USE_FENCED_ATOMICS is not set.

__TBB_machine_cmpswp8( volatile void *ptr, int32_t value, int64_t comparand ) Must be provided for 64-bit architectures if __TBB_USE_FENCED_ATOMICS is not set, and for 32-bit architectures if __TBB_64BIT_ATOMICS is set

__TBB_machine_<op><S><fence>(...), where <op> = {cmpswp, fetchadd, fetchstore} <S> = {1, 2, 4, 8} <fence> = {full_fence, acquire, release, relaxed} Must be provided if __TBB_USE_FENCED_ATOMICS is set.

__TBB_control_consistency_helper() Bridges the memory-semantics gap between architectures providing only implicit C++0x "consume" semantics (like Power Architecture) and those also implicitly obeying control dependencies (like IA-64 architecture). It must be used only in conditional code where the condition is itself data-dependent, and will then make subsequent code behave as if the original data dependency were acquired. It needs only a compiler fence where implied by the architecture either specifically (like IA-64 architecture) or because generally stronger "acquire" semantics are enforced (like x86). It is always valid, though potentially suboptimal, to replace control with acquire on the load and then remove the helper.

__TBB_acquire_consistency_helper(), __TBB_release_consistency_helper() Must be provided if __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE is set. Enforce acquire and release semantics in generic implementations of fenced store and load operations. Depending on the particular architecture/compiler combination they may be a hardware fence, a compiler fence, both or nothing.

Before making any changes in the implementation, please emulate algorithmic changes with SPIN tool using <TBB directory>="">/tools/spin_models/ReaderWriterMutex.pml. There could be some code looking as "can be restructured" but its structure does matter!

This file is a possible future replacement for the task_stream class implemented in task_stream.h. It refactors the code and extends task_stream capabilities by moving lane management during operations on caller side. Despite the fact that new implementation should not affect performance of the original task stream, analysis on this subject was not made at the time it was developed. In addition, it is not clearly seen at the moment that this container would be suitable for critical tasks due to linear time complexity on its operations.

Typedef Documentation

typedef void(* tbb::assertion_handler_type)(const char *filename, int line, const char *expression, const char *comment)

Type for an assertion handler.

Definition at line 46 of file tbb_assert_impl.h.

typedef pthread_mutex_t * tbb::native_handle_type

Return native_handle.

Definition at line 209 of file mutex.h.

Definition at line 33 of file spin_rw_mutex.h.

typedef std::size_t tbb::stack_size_type

Definition at line 42 of file task_scheduler_init.h.

typedef char tbb::tchar

Unicode support.

Definition at line 57 of file itt_notify.h.

Enumeration Type Documentation

enum for selecting between single key and key-per-instance versions

Enumerator
ets_key_per_instance 
ets_no_key 

Definition at line 51 of file enumerable_thread_specific.h.

51  {
53  , ets_no_key
54 #if __TBB_PREVIEW_RESUMABLE_TASKS
55  , ets_suspend_aware
56 #endif
57 };

Specifies memory semantics.

Enumerator
full_fence 

Sequential consistency.

acquire 

Acquire.

release 

Release.

relaxed 

No ordering.

Definition at line 53 of file atomic.h.

53  {
55  full_fence,
57  acquire,
59  release,
61  relaxed
62 };
Sequential consistency.
Definition: atomic.h:55
Acquire.
Definition: atomic.h:57
Release.
Definition: atomic.h:59
No ordering.
Definition: atomic.h:61
Enumerator
priority_normal 
priority_low 
priority_high 

Definition at line 317 of file task.h.

317  {
320  priority_high = priority_normal + internal::priority_stride_v4
321 };
static const int priority_stride_v4
Definition: task.h:310
Enumerator
INITIALIZED 
DESTROYED 
HELD 

Definition at line 213 of file mutex.h.

213  {
214  INITIALIZED=0x1234,
215  DESTROYED=0x789A,
216  HELD=0x56CD
217  };

Flag bits in a state_t that specify information about a locking request.

Enumerator
STATE_NONE 
STATE_WRITER 
STATE_READER 
STATE_READER_UNBLOCKNEXT 
STATE_ACTIVEREADER 
STATE_UPGRADE_REQUESTED 
STATE_UPGRADE_WAITING 
STATE_UPGRADE_LOSER 
STATE_COMBINED_WAITINGREADER 
STATE_COMBINED_READER 
STATE_COMBINED_UPGRADING 

Definition at line 33 of file queuing_rw_mutex.cpp.

Enumerator
not_complete 
complete 
canceled 

Definition at line 73 of file task_group.h.

Function Documentation

template<>
struct tbb::__TBB_DEPRECATED_IN_VERBOSE_MODE_MSG ( "tbb::atomic is  deprecated,
use std::atomic"   
)

Specialization for atomic<void*>, for sake of not allowing arithmetic or operator->.

Definition at line 526 of file atomic.h.

527  : internal::atomic_impl<void*> {
528 #if __TBB_ATOMIC_CTORS
529  atomic() = default ;
530  constexpr atomic(void* arg): internal::atomic_impl<void*>(arg) {}
531  constexpr atomic(const atomic<void*>& rhs): internal::atomic_impl<void*>(rhs) {}
532 #endif
533  void* operator=( void* rhs ) {
534  // "this" required here in strict ISO C++ because store_with_release is a dependent name
535  return this->store_with_release(rhs);
536  }
537  atomic<void*>& operator=( const atomic<void*>& rhs ) {
538  this->store_with_release(rhs); return *this;
539  }
540 };
template<typename Key >
class tbb::__TBB_DEPRECATED_MSG ( "tbb::tbb_hash is  deprecated,
use std::hash"   
)

Definition at line 86 of file _tbb_hash_compare_impl.h.

References key.

87 {
88 public:
89  tbb_hash() {}
90 
91  size_t operator()(const Key& key) const
92  {
93  return tbb_hasher(key);
94  }
95 };
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key
void __TBB_EXPORTED_FUNC tbb::assertion_failure ( const char *  filename,
int  line,
const char *  expression,
const char *  comment 
)

Process an assertion failure.

Normally called from __TBB_ASSERT macro. If assertion handler is null, print message for assertion failure and abort. Otherwise call the assertion handler.

Definition at line 56 of file tbb_assert_impl.h.

References assertion_handler.

56  {
58  (*a)(filename,line,expression,comment);
59  } else {
60  static bool already_failed;
61  if( !already_failed ) {
62  already_failed = true;
63  fprintf( stderr, "Assertion %s failed on line %d of file %s\n",
64  expression, line, filename );
65  if( comment )
66  fprintf( stderr, "Detailed description: %s\n", comment );
67 #if _MSC_VER && _DEBUG
68  if(1 == _CrtDbgReport(_CRT_ASSERT, filename, line, "tbb_debug.dll", "%s\r\n%s", expression, comment?comment:""))
69  _CrtDbgBreak();
70 #else
71  fflush(stderr);
72  std::abort();
73 #endif
74  }
75  }
76  }
static assertion_handler_type assertion_handler
void(* assertion_handler_type)(const char *filename, int line, const char *expression, const char *comment)
Type for an assertion handler.
Definition: tbb_stddef.h:127
template<typename T >
static T tbb::CAS ( volatile T &  addr,
newv,
oldv 
)
inlinestatic

Definition at line 30 of file spin_rw_mutex.cpp.

References tbb::internal::as_atomic().

Referenced by tbb::spin_rw_mutex_v3::internal_acquire_writer(), tbb::spin_rw_mutex_v3::internal_try_acquire_writer(), and tbb::spin_rw_mutex_v3::internal_upgrade().

30  {
31  // ICC (9.1 and 10.1 tried) unable to do implicit conversion
32  // from "volatile T*" to "volatile void*", so explicit cast added.
33  return tbb::internal::as_atomic(addr).compare_and_swap( newv, oldv );
34 }
atomic< T > & as_atomic(T &t)
Definition: atomic.h:572
void * addr

Here is the call graph for this function:

Here is the caller graph for this function:

uintptr_t tbb::get_flag ( queuing_rw_mutex::scoped_lock *  ptr)
inline

Definition at line 131 of file queuing_rw_mutex.cpp.

References FLAG.

Referenced by tbb::queuing_rw_mutex::scoped_lock::release(), and tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer().

131  {
132  return uintptr_t(ptr) & FLAG;
133 }
static const tricky_pointer::word FLAG
Mask for low order bit of a pointer.

Here is the caller graph for this function:

void __TBB_EXPORTED_METHOD tbb::internal_construct ( )
private

All checks from mutex constructor using mutex.state were moved here.

Referenced by __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG().

Here is the caller graph for this function:

void __TBB_EXPORTED_METHOD tbb::internal_destroy ( )
private

All checks from mutex destructor using mutex.state were moved here.

Referenced by ~mutex(), and ~recursive_mutex().

Here is the caller graph for this function:

bool tbb::is_current_task_group_canceling ( )
inline

Definition at line 343 of file task_group.h.

References tbb::task::is_cancelled(), and tbb::task::self().

343  {
344  return task::self().is_cancelled();
345 }
bool is_cancelled() const
Returns true if the context has received cancellation request.
Definition: task.h:974
static task &__TBB_EXPORTED_FUNC self()
The innermost task being executed or destroyed by the current thread at the moment.
Definition: task.cpp:201

Here is the call graph for this function:

template<memory_semantics M, typename T >
T tbb::load ( const atomic< T > &  a)

Definition at line 546 of file atomic.h.

Referenced by tbb::internal::atomic_impl< I >::load().

546 { return a.template load<M>(); }

Here is the caller graph for this function:

void tbb::lock ( )

Acquire lock.

Acquires the reader_writer_lock for write.

Definition at line 157 of file mutex.h.

References tbb::internal::handle_perror(), impl, and scoped_lock.

Referenced by tbb::flow::interface11::source_node< Output >::activate(), tbb::internal::market::arena_in_need(), tbb::internal::generic_scheduler::cleanup_master(), tbb::internal::market::create_arena(), tbb::internal::generic_scheduler::create_master(), tbb::flow::interface11::limiter_node< T, U >::decrement_counter(), tbb::internal::task_stream< num_priority_levels >::drain(), tbb::flow::interface11::limiter_node< T, U >::forward_task(), tbb::internal::market::global_market(), tbb::internal::input_buffer::has_item(), tbb::flow::interface11::internal::join_node_FE< queueing, InputTuple, OutputTuple >::increment_port_count(), tbb::flow::interface11::opencl_factory< default_device_filter >::init(), tbb::flow::interface11::opencl_factory< default_device_filter >::init_once(), tbb::interface9::global_control::internal_create(), tbb::interface9::global_control::internal_destroy(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::internal_fast_find(), tbb::strict_ppl::internal::micro_queue< T >::invalidate_page_and_rethrow(), tbb::internal::msvc_inline_asm::lock_and(), tbb::internal::msvc_inline_asm::lock_or(), tbb::internal::micro_queue::make_invalid(), tbb::internal::market::max_num_workers(), tbb::internal::input_buffer::note_done(), tbb::internal::task_stream< num_priority_levels >::pop(), tbb::internal::task_stream< num_priority_levels >::pop_specific(), tbb::internal::micro_queue::push(), tbb::internal::task_stream< num_priority_levels >::push(), tbb::strict_ppl::internal::micro_queue< T >::push(), tbb::internal::input_buffer::put_token(), tbb::flow::interface10::graph::register_node(), tbb::flow::interface11::limiter_node< T, U >::register_predecessor(), tbb::flow::interface11::input_node< Output >::register_successor(), tbb::flow::interface11::source_node< Output >::register_successor(), tbb::flow::interface11::limiter_node< T, U >::register_successor(), tbb::internal::market::release(), tbb::flow::interface10::graph::remove_node(), tbb::internal::input_buffer::return_item(), tbb::flow::interface11::opencl_memory< Factory >::send(), tbb::internal::market::set_active_num_workers(), tbb::flow::interface11::internal::join_node_FE< queueing, InputTuple, OutputTuple >::set_my_node(), tbb::flow::interface11::source_node< Output >::try_consume(), tbb::flow::interface11::input_node< Output >::try_get(), tbb::flow::interface11::source_node< Output >::try_get(), tbb::internal::rml::private_server::try_insert_in_asleep_list(), tbb::internal::task_stream< num_priority_levels >::try_pop(), tbb::internal::task_stream< num_priority_levels >::try_push(), tbb::flow::interface11::limiter_node< T, U >::try_put_task(), tbb::flow::interface11::input_node< Output >::try_release(), tbb::flow::interface11::source_node< Output >::try_release(), tbb::flow::interface11::input_node< Output >::try_reserve(), tbb::flow::interface11::source_node< Output >::try_reserve(), tbb::flow::interface11::input_node< Output >::try_reserve_apply_body(), tbb::flow::interface11::source_node< Output >::try_reserve_apply_body(), tbb::internal::rml::private_server::wake_some(), tbb::internal::micro_queue_pop_finalizer::~micro_queue_pop_finalizer(), and tbb::strict_ppl::internal::micro_queue_pop_finalizer< T >::~micro_queue_pop_finalizer().

157  {
158 #if TBB_USE_ASSERT
159  aligned_space<scoped_lock> tmp;
160  new(tmp.begin()) scoped_lock(*this);
161 #else
162  #if _WIN32||_WIN64
163  EnterCriticalSection(&impl);
164  #else
165  int error_code = pthread_mutex_lock(&impl);
166  if( error_code )
167  tbb::internal::handle_perror(error_code,"mutex: pthread_mutex_lock failed");
168  #endif /* _WIN32||_WIN64 */
169 #endif /* TBB_USE_ASSERT */
170  }
friend class scoped_lock
Definition: mutex.h:79
pthread_mutex_t impl
Definition: mutex.h:223
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...
Definition: tbb_misc.cpp:87

Here is the call graph for this function:

Here is the caller graph for this function:

template<class F >
task_handle< typename internal::strip<F>::type > tbb::make_task ( F &&  f)

Definition at line 349 of file task_group.h.

349  {
350  return task_handle< typename internal::strip<F>::type >( std::forward<F>(f) );
351 }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
void tbb::move ( tbb_thread &  t1,
tbb_thread &  t2 
)
inline

Definition at line 319 of file tbb_thread.h.

References tbb::internal::move_v3().

Referenced by tbb::interface9::parallel_do_feeder< Item >::add(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::allocate_node_default_construct(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::allocate_node_move_construct(), tbb::internal::allocator_move_assignment(), tbb::strict_ppl::internal::micro_queue< Value >::assign_and_destroy_item(), tbb::concurrent_bounded_queue< T, A >::assign_and_destroy_item(), tbb::internal::stored_pack< T, Types...>::call(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::concurrent_hash_map(), tbb::interface5::concurrent_priority_queue< T, Compare, A >::concurrent_priority_queue(), 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::interface6::memory_pool_allocator< T, P >::construct(), tbb::interface7::internal::delegated_function< F, R >::consume_result(), tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >::create_local_by_move(), tbb::interface6::internal::token_helper< T, true >::create_token(), tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >::enumerable_thread_specific(), tbb::interface9::internal::do_iteration_task< Body, Item >::execute(), tbb::interface5::concurrent_priority_queue< T, Compare, A >::handle_operations(), tbb::interface5::concurrent_priority_queue< T, Compare, A >::heapify(), tbb::interface10::internal::concurrent_skip_list< Traits >::insert(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::insert(), tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::internal_add_move(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_merge(), tbb::interface10::internal::concurrent_skip_list< Traits >::internal_merge(), tbb::interface10::internal::concurrent_skip_list< Traits >::internal_move_assign(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::internal_move_assign(), tbb::concurrent_vector< T, A >::internal_loop_guide::move_assign(), tbb::concurrent_vector< T, A >::internal_loop_guide::move_construct(), tbb::strict_ppl::concurrent_queue< T, A >::move_construct_item(), tbb::concurrent_bounded_queue< T, A >::move_item(), tbb::concurrent_bounded_queue< T, A >::move_page_item(), tbb::interface6::internal::concrete_filter< T, U, Body >::operator()(), tbb::interface6::internal::concrete_filter< T, void, Body >::operator()(), tbb::combinable< T >::operator=(), tbb::interface5::concurrent_priority_queue< T, Compare, A >::operator=(), tbb::interface10::internal::concurrent_skip_list< Traits >::operator=(), tbb::concurrent_vector< padded_element, padded_allocator_type >::operator=(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::operator=(), tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >::operator=(), tbb::concurrent_vector< padded_element, padded_allocator_type >::push_back(), tbb::interface5::concurrent_priority_queue< T, Compare, A >::reheap(), async_msg< T >::set(), and internal::kernel_executor_helper< StreamFactory, KernelInputTuple, typename tbb::internal::void_t< typename StreamFactory::range_type >::type >::set_range().

319  {
320  internal::move_v3(t1, t2);
321 }
void __TBB_EXPORTED_FUNC move_v3(tbb_thread_v3 &t1, tbb_thread_v3 &t2)
Definition: tbb_thread.cpp:147

Here is the call graph for this function:

Here is the caller graph for this function:

native_handle_type tbb::native_handle ( )

Definition at line 211 of file mutex.h.

References impl.

211 { return (native_handle_type) &impl; }
pthread_mutex_t * native_handle_type
Return native_handle.
Definition: mutex.h:209
pthread_mutex_t impl
Definition: mutex.h:223
template<typename T , typename U >
bool tbb::operator!= ( const cache_aligned_allocator< T > &  ,
const cache_aligned_allocator< U > &   
)
inline

Definition at line 132 of file cache_aligned_allocator.h.

132 {return false;}
template<typename T , typename U >
bool tbb::operator!= ( const tbb_allocator< T > &  ,
const tbb_allocator< U > &   
)
inline

Definition at line 142 of file tbb_allocator.h.

142 {return false;}
template<typename T1 , template< typename X1 > class B1, typename T2 , template< typename X2 > class B2>
bool tbb::operator!= ( const zero_allocator< T1, B1 > &  a,
const zero_allocator< T2, B2 > &  b 
)
inline

Definition at line 197 of file tbb_allocator.h.

197  {
198  return static_cast< B1<T1> >(a) != static_cast< B2<T2> >(b);
199 }
template<typename T , class A1 , class A2 >
bool tbb::operator!= ( const concurrent_vector< T, A1 > &  a,
const concurrent_vector< T, A2 > &  b 
)
inline

Definition at line 1363 of file concurrent_vector.h.

1364 { return !(a == b); }
template<typename Key , typename T , typename HashCompare , typename A1 , typename A2 >
bool tbb::operator!= ( const concurrent_hash_map< Key, T, HashCompare, A1 > &  a,
const concurrent_hash_map< Key, T, HashCompare, A2 > &  b 
)
inline

Definition at line 1634 of file concurrent_hash_map.h.

1635 { return !(a == b); }
tick_count::interval_t tbb::operator- ( const tick_count &  t1,
const tick_count &  t0 
)
inline

Definition at line 126 of file tick_count.h.

References tbb::tick_count::my_count.

126  {
127  return tick_count::interval_t( t1.my_count-t0.my_count );
128 }
template<typename T , class A1 , class A2 >
bool tbb::operator< ( const concurrent_vector< T, A1 > &  a,
const concurrent_vector< T, A2 > &  b 
)
inline

Definition at line 1367 of file concurrent_vector.h.

1368 { return (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())); }
template<typename T , class A1 , class A2 >
bool tbb::operator<= ( const concurrent_vector< T, A1 > &  a,
const concurrent_vector< T, A2 > &  b 
)
inline

Definition at line 1375 of file concurrent_vector.h.

1376 { return !(b < a); }
template<typename T , typename U >
bool tbb::operator== ( const cache_aligned_allocator< T > &  ,
const cache_aligned_allocator< U > &   
)
inline

Definition at line 129 of file cache_aligned_allocator.h.

129 {return true;}
template<typename T , typename U >
bool tbb::operator== ( const tbb_allocator< T > &  ,
const tbb_allocator< U > &   
)
inline

Definition at line 139 of file tbb_allocator.h.

139 {return true;}
template<typename T1 , template< typename X1 > class B1, typename T2 , template< typename X2 > class B2>
bool tbb::operator== ( const zero_allocator< T1, B1 > &  a,
const zero_allocator< T2, B2 > &  b 
)
inline

Definition at line 193 of file tbb_allocator.h.

193  {
194  return static_cast< B1<T1> >(a) == static_cast< B2<T2> >(b);
195 }
template<typename T , class A1 , class A2 >
bool tbb::operator== ( const concurrent_vector< T, A1 > &  a,
const concurrent_vector< T, A2 > &  b 
)
inline

Definition at line 1351 of file concurrent_vector.h.

1351  {
1352  //TODO: call size() only once per vector (in operator==)
1353  // Simply: return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin());
1354  if(a.size() != b.size()) return false;
1355  typename concurrent_vector<T, A1>::const_iterator i(a.begin());
1356  typename concurrent_vector<T, A2>::const_iterator j(b.begin());
1357  for(; i != a.end(); ++i, ++j)
1358  if( !(*i == *j) ) return false;
1359  return true;
1360 }
template<typename Key , typename T , typename HashCompare , typename A1 , typename A2 >
bool tbb::operator== ( const concurrent_hash_map< Key, T, HashCompare, A1 > &  a,
const concurrent_hash_map< Key, T, HashCompare, A2 > &  b 
)
inline

Definition at line 1622 of file concurrent_hash_map.h.

1622  {
1623  if(a.size() != b.size()) return false;
1624  typename concurrent_hash_map<Key, T, HashCompare, A1>::const_iterator i(a.begin()), i_end(a.end());
1625  typename concurrent_hash_map<Key, T, HashCompare, A2>::const_iterator j, j_end(b.end());
1626  for(; i != i_end; ++i) {
1627  j = b.equal_range(i->first).first;
1628  if( j == j_end || !(i->second == j->second) ) return false;
1629  }
1630  return true;
1631 }
template<typename T , class A1 , class A2 >
bool tbb::operator> ( const concurrent_vector< T, A1 > &  a,
const concurrent_vector< T, A2 > &  b 
)
inline

Definition at line 1371 of file concurrent_vector.h.

1372 { return b < a; }
template<typename T , class A1 , class A2 >
bool tbb::operator>= ( const concurrent_vector< T, A1 > &  a,
const concurrent_vector< T, A2 > &  b 
)
inline

Definition at line 1379 of file concurrent_vector.h.

1380 { return !(a < b); }
assertion_handler_type __TBB_EXPORTED_FUNC tbb::set_assertion_handler ( assertion_handler_type  new_handler)

Set assertion handler and return previous value of it.

Definition at line 50 of file tbb_assert_impl.h.

References assertion_handler.

50  {
52  assertion_handler = new_handler;
53  return old_handler;
54  }
static assertion_handler_type assertion_handler
void(* assertion_handler_type)(const char *filename, int line, const char *expression, const char *comment)
Type for an assertion handler.
Definition: tbb_stddef.h:127
template<memory_semantics M, typename T >
void tbb::store ( atomic< T > &  a,
value 
)

Definition at line 549 of file atomic.h.

References value.

Referenced by tbb::internal::atomic_impl< I >::store().

549 { a.template store<M>(value); }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value

Here is the caller graph for this function:

void tbb::swap ( internal::tbb_thread_v3 &  t1,
internal::tbb_thread_v3 &  t2 
)
inline

Definition at line 323 of file tbb_thread.h.

323  {
324  std::swap(t1.my_handle, t2.my_handle);
325 #if _WIN32||_WIN64
326  std::swap(t1.my_thread_id, t2.my_thread_id);
327 #endif /* _WIN32||_WIN64 */
328 }
void swap(internal::tbb_thread_v3 &t1, internal::tbb_thread_v3 &t2) __TBB_NOEXCEPT(true)
Definition: tbb_thread.h:323
template<typename T , class A >
void tbb::swap ( concurrent_vector< T, A > &  a,
concurrent_vector< T, A > &  b 
)
inline

Definition at line 1383 of file concurrent_vector.h.

1384 { a.swap( b ); }
template<typename Key , typename T , typename HashCompare , typename A >
void tbb::swap ( concurrent_hash_map< Key, T, HashCompare, A > &  a,
concurrent_hash_map< Key, T, HashCompare, A > &  b 
)
inline
int tbb::TBB_runtime_interface_version ( )

The function returns the interface version of the TBB shared library being used.

The version it returns is determined at runtime, not at compile/link time. So it can be different than the value of TBB_INTERFACE_VERSION obtained at compile time.

Definition at line 267 of file tbb_misc.cpp.

References TBB_INTERFACE_VERSION.

267  {
268  return TBB_INTERFACE_VERSION;
269 }
#define TBB_INTERFACE_VERSION
Definition: tbb_stddef.h:25
bool tbb::try_lock ( )

Try acquiring lock (non-blocking)

Tries to acquire the reader_writer_lock for write.

Return true if lock acquired; false otherwise.

Definition at line 174 of file mutex.h.

References impl, and s.

174  {
175 #if TBB_USE_ASSERT
176  aligned_space<scoped_lock> tmp;
177  scoped_lock& s = *tmp.begin();
178  s.my_mutex = NULL;
179  return s.internal_try_acquire(*this);
180 #else
181  #if _WIN32||_WIN64
182  return TryEnterCriticalSection(&impl)!=0;
183  #else
184  return pthread_mutex_trylock(&impl)==0;
185  #endif /* _WIN32||_WIN64 */
186 #endif /* TBB_USE_ASSERT */
187  }
void const char const char int ITT_FORMAT __itt_group_sync s
friend class scoped_lock
Definition: mutex.h:79
pthread_mutex_t impl
Definition: mutex.h:223
void tbb::unlock ( )

Release lock.

Releases the reader_writer_lock.

Definition at line 190 of file mutex.h.

References impl, and s.

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

190  {
191 #if TBB_USE_ASSERT
192  aligned_space<scoped_lock> tmp;
193  scoped_lock& s = *tmp.begin();
194  s.my_mutex = this;
195  s.internal_release();
196 #else
197  #if _WIN32||_WIN64
198  LeaveCriticalSection(&impl);
199  #else
200  pthread_mutex_unlock(&impl);
201  #endif /* _WIN32||_WIN64 */
202 #endif /* TBB_USE_ASSERT */
203  }
void const char const char int ITT_FORMAT __itt_group_sync s
friend class scoped_lock
Definition: mutex.h:79
pthread_mutex_t impl
Definition: mutex.h:223

Here is the caller graph for this function:

tbb::~mutex ( )

Definition at line 66 of file mutex.h.

References impl, and internal_destroy().

66  {
67 #if TBB_USE_ASSERT
69 #else
70  #if _WIN32||_WIN64
71  DeleteCriticalSection(&impl);
72  #else
73  pthread_mutex_destroy(&impl);
74 
75  #endif /* _WIN32||_WIN64 */
76 #endif /* TBB_USE_ASSERT */
77  };
void __TBB_EXPORTED_METHOD internal_destroy()
All checks from mutex destructor using mutex.state were moved here.
pthread_mutex_t impl
Definition: mutex.h:223

Here is the call graph for this function:

tbb::~recursive_mutex ( )

Definition at line 75 of file recursive_mutex.h.

References impl, and internal_destroy().

75  {
76 #if TBB_USE_ASSERT
78 #else
79  #if _WIN32||_WIN64
80  DeleteCriticalSection(&impl);
81  #else
82  pthread_mutex_destroy(&impl);
83 
84  #endif /* _WIN32||_WIN64 */
85 #endif /* TBB_USE_ASSERT */
86  };
void __TBB_EXPORTED_METHOD internal_destroy()
All checks from mutex destructor using mutex.state were moved here.
pthread_mutex_t impl
Definition: mutex.h:223

Here is the call graph for this function:

Variable Documentation

const unsigned char tbb::ACQUIRED = 1
assertion_handler_type tbb::assertion_handler
static

Definition at line 48 of file tbb_assert_impl.h.

Referenced by assertion_failure(), and set_assertion_handler().

const bool tbb::is_fair_mutex = false
static

Definition at line 152 of file mutex.h.

const bool tbb::is_fair_mutex = false
static

Definition at line 164 of file recursive_mutex.h.

const bool tbb::is_recursive_mutex = false
static

Definition at line 151 of file mutex.h.

const bool tbb::is_recursive_mutex = true
static

Definition at line 163 of file recursive_mutex.h.

const bool tbb::is_rw_mutex = false
static

Definition at line 150 of file mutex.h.

const bool tbb::is_rw_mutex = false
static

Definition at line 162 of file recursive_mutex.h.


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.