tbb::interface5 Namespace Reference

## Namespaces

| internal

## Classes

class | concurrent_hash_map
| Unordered map from Key to T. More...
class | concurrent_priority_queue
| Concurrent priority queue. More...
class | concurrent_unordered_map_traits
class | concurrent_unordered_multimap
class | concurrent_unordered_map
class | concurrent_unordered_set_traits
class | concurrent_unordered_multiset
class | concurrent_unordered_set

## Functions

template<typename T >
| __TBB_DEPRECATED_MSG ("tbb::tbb_hasher is deprecated, use std::hash") inline size_t tbb_hasher(const T &t)
| Hasher functions. More...
template<typename P >
| __TBB_DEPRECATED_MSG ("tbb::tbb_hasher is deprecated, use std::hash") inline size_t tbb_hasher(P *ptr)
template<typename E , typename S , typename A >
| __TBB_DEPRECATED_MSG ("tbb::tbb_hasher is deprecated, use std::hash") inline size_t tbb_hasher(const std
template<typename F , typename S >
| __TBB_DEPRECATED_MSG ("tbb::tbb_hasher is deprecated, use std::hash") inline size_t tbb_hasher(const std
uintptr_t | fetch_and_or (atomic< uintptr_t > &operand, uintptr_t value)
uintptr_t | fetch_and_and (atomic< uintptr_t > &operand, uintptr_t value)
template<typename T , typename U >
void | spin_wait_while_geq (const volatile T &location, U value)
| Spin WHILE the value at the location is greater than or equal to a given value. More...
template<typename T , typename U >
void | spin_wait_until_and (const volatile T &location, U value)
| Spin UNTIL (location & value) is true. More...

## Variables

const uintptr_t | WFLAG1 = 0x1
const uintptr_t | WFLAG2 = 0x2
const uintptr_t | RFLAG = 0x4
const uintptr_t | RC_INCR = 0x8

## Function Documentation

## __TBB_DEPRECATED_MSG() [1/4]

template<typename E , typename S , typename A >

tbb::interface5::__TBB_DEPRECATED_MSG | ( | "tbb::tbb_hasher is | deprecated,
|  | use std::hash" |
| ) |  | const

Definition at line 70 of file _tbb_hash_compare_impl.h.

{
size_t h = 0;
for( const E* c = s.c_str(); *c; ++c )
h = static_cast<size_t>(*c) ^ (h * internal::hash_multiplier);
return h;
}
s
void const char const char int ITT_FORMAT __itt_group_sync s
Definition: ittnotify_static.h:91
h
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 h
Definition: ittnotify_static.h:159
tbb::interface5::internal::hash_multiplier
static const size_t hash_multiplier
Hash multiplier.
Definition: _tbb_hash_compare_impl.h:55

References h, tbb::interface5::internal::hash_multiplier, and s.

## __TBB_DEPRECATED_MSG() [2/4]

template<typename F , typename S >

tbb::interface5::__TBB_DEPRECATED_MSG | ( | "tbb::tbb_hasher is | deprecated,
|  | use std::hash" |
| ) |  | const

Definition at line 77 of file _tbb_hash_compare_impl.h.

{
return tbb_hasher(p.first) ^ tbb_hasher(p.second);
}
p
void const char const char int ITT_FORMAT __itt_group_sync p
Definition: ittnotify_static.h:91

References p.

## __TBB_DEPRECATED_MSG() [3/4]

template<typename T >

tbb::interface5::__TBB_DEPRECATED_MSG | ( | "tbb::tbb_hasher is | deprecated,
|  | use std::hash" |
| ) |  | const &

Hasher functions.

Definition at line 61 of file _tbb_hash_compare_impl.h.

{
return static_cast<size_t>( t ) * internal::hash_multiplier;
}

References tbb::interface5::internal::hash_multiplier.

## __TBB_DEPRECATED_MSG() [4/4]

template<typename P >

tbb::interface5::__TBB_DEPRECATED_MSG | ( | "tbb::tbb_hasher is | deprecated,
|  | use std::hash" |
| ) |  |

Definition at line 65 of file _tbb_hash_compare_impl.h.

{
size_t const h = reinterpret_cast<size_t>( ptr );
return (h >> 3) ^ h;
}

References h.

## fetch_and_and()

uintptr_t tbb::interface5::fetch_and_and | ( | atomic< uintptr_t > & | operand,
|  | uintptr_t | value
| ) |  |

inline

Definition at line 46 of file reader_writer_lock.cpp.

{
for (tbb::internal::atomic_backoff b;;b.pause()) {
uintptr_t old = operand;
uintptr_t result = operand.compare_and_swap(old&value, old);
if (result==old) return result;
}
}
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
Definition: ittnotify_static.h:192
tbb::internal::atomic_backoff
Class that implements exponential backoff.
Definition: tbb_machine.h:348
tbb::internal::atomic_backoff::pause
void pause()
Pause for a while.
Definition: tbb_machine.h:363

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

Here is the call graph for this function:

## fetch_and_or()

uintptr_t tbb::interface5::fetch_and_or | ( | atomic< uintptr_t > & | operand,
|  | uintptr_t | value
| ) |  |

inline

Definition at line 37 of file reader_writer_lock.cpp.

{
for (tbb::internal::atomic_backoff b;;b.pause()) {
uintptr_t old = operand;
uintptr_t result = operand.compare_and_swap(old|value, old);
if (result==old) return result;
}
}

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

Here is the call graph for this function:

## spin_wait_until_and()

template<typename T , typename U >

void tbb::interface5::spin_wait_until_and | ( | const volatile T & | location,
|  | U | value
| ) |  |

Spin UNTIL (location & value) is true.

T and U should be comparable types.

Definition at line 65 of file reader_writer_lock.cpp.

{
tbb::internal::atomic_backoff backoff;
while( !(location & value) ) backoff.pause();
}

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

Here is the call graph for this function:

## spin_wait_while_geq()

template<typename T , typename U >

void tbb::interface5::spin_wait_while_geq | ( | const volatile T & | location,
|  | U | value
| ) |  |

Spin WHILE the value at the location is greater than or equal to a given value.

T and U should be comparable types.

Definition at line 57 of file reader_writer_lock.cpp.

{
tbb::internal::atomic_backoff backoff;
while( location>=value ) backoff.pause();
}

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

Here is the call graph for this function:

## Variable Documentation

## RC_INCR

const uintptr_t tbb::interface5::RC_INCR = 0x8

Definition at line 33 of file reader_writer_lock.cpp.

## RFLAG

const uintptr_t tbb::interface5::RFLAG = 0x4

Definition at line 32 of file reader_writer_lock.cpp.

## WFLAG1

const uintptr_t tbb::interface5::WFLAG1 = 0x1

Definition at line 30 of file reader_writer_lock.cpp.

## WFLAG2

const uintptr_t tbb::interface5::WFLAG2 = 0x2

Definition at line 31 of file reader_writer_lock.cpp.

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.