Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
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_)
inlineprivate

Definition at line 235 of file tbb_thread.h.

235 : my_id(id_) {}

◆ id() [2/2]

tbb::internal::tbb_thread_v3::id::id ( )
inline

Definition at line 239 of file tbb_thread.h.

239 : 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.

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

◆ operator!=

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

Definition at line 286 of file tbb_thread.h.

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

◆ operator<

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

Definition at line 290 of file tbb_thread.h.

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

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

252  {
253  out << id.my_id;
254  return out;
255  }

◆ operator<=

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

Definition at line 294 of file tbb_thread.h.

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

◆ operator==

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

Definition at line 282 of file tbb_thread.h.

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

◆ operator>

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

Definition at line 298 of file tbb_thread.h.

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

◆ operator>=

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

Definition at line 302 of file tbb_thread.h.

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

◆ tbb_hasher

size_t tbb_hasher ( const tbb_thread_v3::id id)
friend

Definition at line 258 of file tbb_thread.h.

258  {
259  __TBB_STATIC_ASSERT(sizeof(id.my_id) <= sizeof(size_t), "Implementation assumes that thread_id_type fits into machine word");
260  return tbb::tbb_hasher(id.my_id);
261  }
#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.

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

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:

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.