Base class for the work item (users should derive from ThreadPool::WorkItemRet) More...
#include <ThreadPoolWorkItem.h>

Public Member Functions | |
| void | add_dependencies (const std::vector< ThreadPoolID > &ids) |
| Add a list of work item to the list of dependencies. | |
| void | add_dependencies (std::size_t N, const ThreadPoolID *ids) |
| Add a list of work item to the list of dependencies Note: this function is thread-safe for the threadpool and does not need blocking. | |
| void | add_dependency (const ThreadPoolID &id) |
| Add a work item to the list of dependencies. | |
| std::vector< ThreadPoolID > | get_dependencies () const |
| Return the list of work ids that we depend on. | |
| std::size_t | get_N_dependencies () const |
| Get the number of work ids that this work item depends on. | |
| auto | getStatus () const |
| Get the current status. | |
| virtual bool | has_result () const =0 |
| Will the routine return a result. | |
| virtual void | run ()=0 |
| Function to run the routine. | |
| virtual | ~ThreadPoolWorkItem () |
| Empty deconstructor. | |
Protected Member Functions | |
| ThreadPoolWorkItem () | |
Private Member Functions | |
| ThreadPoolWorkItem & | operator= (const ThreadPoolWorkItem &)=delete |
| ThreadPoolWorkItem (const ThreadPoolWorkItem &)=delete | |
Private Attributes | |
| volatile std::atomic_int32_t | d_count |
| ThreadPoolID * | d_ids |
| uint16_t | d_N_ids |
| uint16_t | d_size |
| volatile ThreadPoolID::Status | d_state |
Friends | |
| class | ThreadPool |
| class | ThreadPoolID |
Base class for the work item (users should derive from ThreadPool::WorkItemRet)
Definition at line 17 of file ThreadPoolWorkItem.h.
|
inlinevirtual |
Empty deconstructor.
Definition at line 25 of file ThreadPoolWorkItem.h.
|
inlineprotected |
Definition at line 63 of file ThreadPoolWorkItem.h.
|
privatedelete |
|
inline |
Add a list of work item to the list of dependencies.
| ids | Ids of the work item to add |
Definition at line 45 of file ThreadPoolWorkItem.h.
References add_dependencies().
Referenced by add_dependencies(), and add_dependency().
| void AMP::ThreadPoolWorkItem::add_dependencies | ( | std::size_t | N, |
| const ThreadPoolID * | ids | ||
| ) |
Add a list of work item to the list of dependencies Note: this function is thread-safe for the threadpool and does not need blocking.
| N | Number of items to add |
| ids | Ids of the work item to add |
|
inline |
Add a work item to the list of dependencies.
| id | Id of the work item to add |
Definition at line 40 of file ThreadPoolWorkItem.h.
References add_dependencies().
| std::vector< ThreadPoolID > AMP::ThreadPoolWorkItem::get_dependencies | ( | ) | const |
Return the list of work ids that we depend on.
|
inline |
Get the number of work ids that this work item depends on.
Definition at line 33 of file ThreadPoolWorkItem.h.
References d_N_ids.
|
inline |
|
pure virtual |
Will the routine return a result.
Implemented in AMP::ThreadPool::WorkItemRet< return_type >.
|
privatedelete |
|
pure virtual |
Function to run the routine.
Implemented in AMP::ThreadPool::WorkItemRet< return_type >.
|
friend |
Definition at line 62 of file ThreadPoolWorkItem.h.
|
friend |
Definition at line 81 of file ThreadPoolWorkItem.h.
|
private |
Definition at line 78 of file ThreadPoolWorkItem.h.
|
private |
Definition at line 79 of file ThreadPoolWorkItem.h.
Referenced by ~ThreadPoolWorkItem().
|
private |
Definition at line 76 of file ThreadPoolWorkItem.h.
Referenced by get_N_dependencies(), and ~ThreadPoolWorkItem().
|
private |
Definition at line 77 of file ThreadPoolWorkItem.h.
Referenced by ~ThreadPoolWorkItem().
|
private |
Definition at line 75 of file ThreadPoolWorkItem.h.
Referenced by getStatus().
|
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 |