tbb::internal::tbb_thread_v3::id Class Reference

`#include <tbb_thread.h>`

Collaboration diagram for tbb::internal::tbb_thread_v3::id:

## Public Member Functions

| id () __TBB_NOEXCEPT(true)

## Private Member Functions

| id (thread_id_type id_)

## Private Attributes

thread_id_type | my_id

## Friends

class | tbb_thread_v3
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)
template<class charT , class traits >
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &out, tbb_thread_v3::id id)
tbb_thread_v3::id __TBB_EXPORTED_FUNC | thread_get_id_v3 ()
size_t | tbb_hasher (const tbb_thread_v3::id &id)
id | atomic_compare_and_swap (id &location, const id &value, const id &comparand)

## Detailed Description

Definition at line 233 of file tbb_thread.h.

## Constructor & Destructor Documentation

## id() [1/2]

tbb::internal::tbb_thread_v3::id::id | ( | thread_id_type | id_ | ) |

inline private

Definition at line 235 of file tbb_thread.h.

: my_id(id_) {}
tbb::internal::tbb_thread_v3::id::my_id
thread_id_type my_id
Definition: tbb_thread.h:234

## id() [2/2]

tbb::internal::tbb_thread_v3::id::id | ( |  | ) |

inline

Definition at line 239 of file tbb_thread.h.

: my_id(0) {}

## Friends And Related Function Documentation

## atomic_compare_and_swap

id atomic_compare_and_swap | ( | id & | location,
|  | const id & | value,
|  | const id & | comparand
| ) |  |

friend

Definition at line 264 of file tbb_thread.h.

{
return as_atomic(location.my_id).compare_and_swap(value.my_id, comparand.my_id);
}
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::as_atomic
atomic< T > & as_atomic(T &t)
Definition: atomic.h:572

## operator!=

bool operator!= | ( | tbb_thread_v3::id | x,
|  | tbb_thread_v3::id | y
| ) |  |

friend

Definition at line 286 of file tbb_thread.h.

{
return x.my_id != y.my_id;
}

## operator<

bool operator< | ( | tbb_thread_v3::id | x,
|  | tbb_thread_v3::id | y
| ) |  |

friend

Definition at line 290 of file tbb_thread.h.

{
return x.my_id < y.my_id;
}

## operator<<

template<class charT , class traits >

std::basic_ostream<charT, traits>& operator<< | ( | std::basic_ostream< charT, traits > & | out,
|  | tbb_thread_v3::id | id
| ) |  |

friend

Definition at line 249 of file tbb_thread.h.

{
out << id.my_id;
return out;
}

## operator<=

bool operator<= | ( | tbb_thread_v3::id | x,
|  | tbb_thread_v3::id | y
| ) |  |

friend

Definition at line 294 of file tbb_thread.h.

{
return x.my_id <= y.my_id;
}

## operator==

bool operator== | ( | tbb_thread_v3::id | x,
|  | tbb_thread_v3::id | y
| ) |  |

friend

Definition at line 282 of file tbb_thread.h.

{
return x.my_id == y.my_id;
}

## operator>

bool operator> | ( | tbb_thread_v3::id | x,
|  | tbb_thread_v3::id | y
| ) |  |

friend

Definition at line 298 of file tbb_thread.h.

{
return x.my_id > y.my_id;
}

## operator>=

bool operator>= | ( | tbb_thread_v3::id | x,
|  | tbb_thread_v3::id | y
| ) |  |

friend

Definition at line 302 of file tbb_thread.h.

{
return x.my_id >= y.my_id;
}

## tbb_hasher

size_t tbb_hasher | ( | const tbb_thread_v3::id & | id | ) |

friend

Definition at line 258 of file tbb_thread.h.

{
__TBB_STATIC_ASSERT(sizeof(id.my_id) <= sizeof(size_t), "Implementation assumes that thread_id_type fits into machine word");
return tbb::tbb_hasher(id.my_id);
}
__TBB_STATIC_ASSERT
#define __TBB_STATIC_ASSERT(condition, msg)
Definition: tbb_stddef.h:553

## tbb_thread_v3

friend class tbb_thread_v3

friend

Definition at line 237 of file tbb_thread.h.

## thread_get_id_v3

tbb_thread_v3::id __TBB_EXPORTED_FUNC thread_get_id_v3 | ( |  | ) |

friend

Definition at line 139 of file tbb_thread.cpp.

{
#if _WIN32||_WIN64
return tbb_thread_v3::id( GetCurrentThreadId() );
#else
return tbb_thread_v3::id( pthread_self() );
#endif // _WIN32||_WIN64
}
id
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
Definition: ittnotify_static.h:172

## Member Data Documentation

## my_id

thread_id_type tbb::internal::tbb_thread_v3::id::my_id

private

Definition at line 234 of file tbb_thread.h.

The documentation for this class was generated from the following file:

- tbb_thread.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.