Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Private Types | Private Attributes | List of all members
AMP::ThreadPoolListQueue Class Reference

Class to store the queue for the ThreadPool using an thread-safe list. More...

#include <ThreadPoolQueue.h>

Public Member Functions

size_t capacity () const
 The number of items that can be in the queue.
 
void changePriorities (const std::vector< std::pair< uint64_t, int8_t > > &list)
 Change the prioirties of items in the queue.
 
bool empty () const
 Check if the queue is empty.
 
void insert (size_t N, const ThreadPoolID *ids)
 Add the given items to the queue.
 
ThreadPoolListQueueoperator= (const ThreadPoolListQueue &)=delete
 Asignment operator.
 
ThreadPoolID pop ()
 Get the next item to process.
 
size_t size () const
 The number of items that are in the queue.
 
 ThreadPoolListQueue ()=delete
 Empty constructor.
 
 ThreadPoolListQueue (const ThreadPoolListQueue &)=delete
 Copy constructor.
 
 ThreadPoolListQueue (size_t N)
 Default constructor.
 

Private Types

typedef AtomicList< ThreadPoolID, std::greater< ThreadPoolID > > queue_type
 

Private Attributes

queue_type d_queue_list
 

Detailed Description

Class to store the queue for the ThreadPool using an thread-safe list.

Definition at line 16 of file ThreadPoolQueue.h.

Member Typedef Documentation

◆ queue_type

Definition at line 71 of file ThreadPoolQueue.h.

Constructor & Destructor Documentation

◆ ThreadPoolListQueue() [1/3]

AMP::ThreadPoolListQueue::ThreadPoolListQueue ( )
delete

Empty constructor.

◆ ThreadPoolListQueue() [2/3]

AMP::ThreadPoolListQueue::ThreadPoolListQueue ( size_t  N)
inlineexplicit

Default constructor.

Definition at line 23 of file ThreadPoolQueue.h.

◆ ThreadPoolListQueue() [3/3]

AMP::ThreadPoolListQueue::ThreadPoolListQueue ( const ThreadPoolListQueue )
delete

Copy constructor.

Member Function Documentation

◆ capacity()

size_t AMP::ThreadPoolListQueue::capacity ( ) const
inline

The number of items that can be in the queue.

Definition at line 35 of file ThreadPoolQueue.h.

References AMP::AtomicList< TYPE, COMPARE >::capacity(), and d_queue_list.

◆ changePriorities()

void AMP::ThreadPoolListQueue::changePriorities ( const std::vector< std::pair< uint64_t, int8_t > > &  list)
inline

◆ empty()

bool AMP::ThreadPoolListQueue::empty ( ) const
inline

Check if the queue is empty.

Definition at line 32 of file ThreadPoolQueue.h.

References d_queue_list, and AMP::AtomicList< TYPE, COMPARE >::empty().

◆ insert()

void AMP::ThreadPoolListQueue::insert ( size_t  N,
const ThreadPoolID ids 
)
inline

Add the given items to the queue.

Definition at line 47 of file ThreadPoolQueue.h.

References d_queue_list, and AMP::AtomicList< TYPE, COMPARE >::insert().

◆ operator=()

ThreadPoolListQueue & AMP::ThreadPoolListQueue::operator= ( const ThreadPoolListQueue )
delete

Asignment operator.

◆ pop()

ThreadPoolID AMP::ThreadPoolListQueue::pop ( )
inline

Get the next item to process.

Definition at line 41 of file ThreadPoolQueue.h.

References d_queue_list, and AMP::AtomicList< TYPE, COMPARE >::remove().

◆ size()

size_t AMP::ThreadPoolListQueue::size ( ) const
inline

The number of items that are in the queue.

Definition at line 38 of file ThreadPoolQueue.h.

References d_queue_list, and AMP::AtomicList< TYPE, COMPARE >::size().

Referenced by AMP::ThreadPool::N_queued().

Member Data Documentation

◆ d_queue_list

queue_type AMP::ThreadPoolListQueue::d_queue_list
private

Definition at line 72 of file ThreadPoolQueue.h.

Referenced by capacity(), changePriorities(), empty(), insert(), pop(), and size().


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



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:42.
Comments on this page