This a class to hold the work item id. More...
#include <ThreadPoolId.h>
Public Types | |
| enum class | Status : int8_t { none = 0 , added = 1 , started = 2 , finished = 3 } |
Public Member Functions | |
| bool | finished () const |
| Check if the work has finished. | |
| uint64_t | getLocalID () const |
| int8_t | getPriority () const |
| ThreadPoolWorkItem * | getWork () const |
| Check if thread id is null. | |
| bool | initialized () const volatile |
| bool | isNull () const |
| Check if thread id is null. | |
| bool | operator!= (const ThreadPoolID &rhs) const |
| bool | operator!= (const volatile ThreadPoolID &rhs) const volatile |
| bool | operator< (const ThreadPoolID &rhs) const |
| bool | operator< (const volatile ThreadPoolID &rhs) const volatile |
| bool | operator<= (const ThreadPoolID &rhs) const |
| bool | operator<= (const volatile ThreadPoolID &rhs) const volatile |
| ThreadPoolID & | operator= (const ThreadPoolID &rhs) |
| ThreadPoolID & | operator= (const ThreadPoolID &rhs) volatile |
| ThreadPoolID & | operator= (const volatile ThreadPoolID &rhs) |
| ThreadPoolID & | operator= (const volatile ThreadPoolID &rhs) volatile |
| ThreadPoolID & | operator= (ThreadPoolID &&rhs) |
| ThreadPoolID & | operator= (volatile ThreadPoolID &&rhs) volatile |
| bool | operator== (const ThreadPoolID &rhs) const |
| bool | operator== (const volatile ThreadPoolID &rhs) const volatile |
| bool | operator> (const ThreadPoolID &rhs) const |
| bool | operator> (const volatile ThreadPoolID &rhs) const volatile |
| bool | operator>= (const ThreadPoolID &rhs) const |
| bool | operator>= (const volatile ThreadPoolID &rhs) const volatile |
| bool | ready () const |
| void | reset () |
| void | reset () volatile |
| Reset the id back to a NULL id. | |
| void | reset (int8_t priority, uint64_t local_id, void *work) |
| void | setPriority (int8_t priority) |
| bool | started () const |
| Check if the work has started (will return true if it has started or finished) | |
| Status | status () const |
| Return the status of the work item. | |
| void | swap (ThreadPoolID &rhs) |
| swap with rhs | |
| ThreadPoolID ()=default | |
| Empty constructor. | |
| ThreadPoolID (const ThreadPoolID &rhs) | |
| ThreadPoolID (const volatile ThreadPoolID &rhs) | |
| Copy constructors. | |
| ThreadPoolID (volatile ThreadPoolID &&rhs) | |
| ~ThreadPoolID () | |
| Destructor. | |
Static Public Member Functions | |
| static uint64_t | createId (int8_t priority, uint64_t local_id) |
Static Public Attributes | |
| static constexpr uint64_t | maxThreadID = 0x00FFFFFFFFFFFFFD |
| static constexpr uint64_t | nullThreadID = 0x0FFFFFFFFFFFFFFF |
Private Attributes | |
| volatile std::atomic_int32_t * | d_count = nullptr |
| uint64_t | d_id = nullThreadID |
| void * | d_work = nullptr |
This a class to hold the work item id.
This class hold the id of the work item that is being processed by the thread pool. It is created when a work item is added to the thread pool and is used by various routines within the thread pool.
Definition at line 24 of file ThreadPoolId.h.
|
strong |
| Enumerator | |
|---|---|
| none | |
| added | |
| started | |
| finished | |
Definition at line 28 of file ThreadPoolId.h.
|
default |
Empty constructor.
|
inline |
| AMP::ThreadPoolID::ThreadPoolID | ( | const volatile ThreadPoolID & | rhs | ) |
Copy constructors.
| AMP::ThreadPoolID::ThreadPoolID | ( | volatile ThreadPoolID && | rhs | ) |
| AMP::ThreadPoolID::ThreadPoolID | ( | const ThreadPoolID & | rhs | ) |
|
static |
|
inline |
| uint64_t AMP::ThreadPoolID::getLocalID | ( | ) | const |
| int8_t AMP::ThreadPoolID::getPriority | ( | ) | const |
|
inline |
|
inline |
Definition at line 135 of file ThreadPoolId.h.
References d_id.
|
inline |
Check if thread id is null.
Definition at line 113 of file ThreadPoolId.h.
References d_id, and nullThreadID.
|
inline |
Definition at line 58 of file ThreadPoolId.h.
References d_id, and nullThreadID.
|
inline |
Definition at line 70 of file ThreadPoolId.h.
References d_id, and nullThreadID.
|
inline |
Definition at line 65 of file ThreadPoolId.h.
References d_id.
|
inline |
Definition at line 86 of file ThreadPoolId.h.
References d_id.
|
inline |
Definition at line 63 of file ThreadPoolId.h.
References d_id.
|
inline |
Definition at line 78 of file ThreadPoolId.h.
References d_id.
| ThreadPoolID & AMP::ThreadPoolID::operator= | ( | const ThreadPoolID & | rhs | ) |
| ThreadPoolID & AMP::ThreadPoolID::operator= | ( | const ThreadPoolID & | rhs | ) | volatile |
| ThreadPoolID & AMP::ThreadPoolID::operator= | ( | const volatile ThreadPoolID & | rhs | ) |
| ThreadPoolID & AMP::ThreadPoolID::operator= | ( | const volatile ThreadPoolID & | rhs | ) | volatile |
| ThreadPoolID & AMP::ThreadPoolID::operator= | ( | ThreadPoolID && | rhs | ) |
| ThreadPoolID & AMP::ThreadPoolID::operator= | ( | volatile ThreadPoolID && | rhs | ) | volatile |
|
inline |
Definition at line 54 of file ThreadPoolId.h.
References d_id, and nullThreadID.
|
inline |
Definition at line 66 of file ThreadPoolId.h.
References d_id, and nullThreadID.
|
inline |
Definition at line 64 of file ThreadPoolId.h.
References d_id.
|
inline |
Definition at line 82 of file ThreadPoolId.h.
References d_id.
|
inline |
Definition at line 62 of file ThreadPoolId.h.
References d_id.
|
inline |
Definition at line 74 of file ThreadPoolId.h.
References d_id.
| bool AMP::ThreadPoolID::ready | ( | ) | const |
| void AMP::ThreadPoolID::reset | ( | ) |
| void AMP::ThreadPoolID::reset | ( | ) | volatile |
Reset the id back to a NULL id.
Referenced by ~ThreadPoolID().
| void AMP::ThreadPoolID::reset | ( | int8_t | priority, |
| uint64_t | local_id, | ||
| void * | work | ||
| ) |
| void AMP::ThreadPoolID::setPriority | ( | int8_t | priority | ) |
Referenced by AMP::ThreadPoolListQueue::changePriorities().
|
inline |
Check if the work has started (will return true if it has started or finished)
Definition at line 99 of file ThreadPoolId.h.
References status().
| Status AMP::ThreadPoolID::status | ( | ) | const |
Return the status of the work item.
Referenced by finished(), and started().
|
inline |
|
private |
Definition at line 140 of file ThreadPoolId.h.
Referenced by swap().
|
private |
Definition at line 139 of file ThreadPoolId.h.
Referenced by initialized(), isNull(), operator!=(), operator!=(), operator<(), operator<(), operator<=(), operator<=(), operator==(), operator==(), operator>(), operator>(), operator>=(), operator>=(), and swap().
|
private |
Definition at line 141 of file ThreadPoolId.h.
|
staticconstexpr |
Definition at line 32 of file ThreadPoolId.h.
|
staticconstexpr |
Definition at line 31 of file ThreadPoolId.h.
Referenced by isNull(), operator!=(), operator!=(), operator==(), and operator==().
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:42. Comments on this page |