Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
Realm::ThreadPool Class Reference

#include <openmp_threadpool.h>

Collaboration diagram for Realm::ThreadPool:

Classes

struct  WorkerInfo
 
struct  WorkItem
 

Public Member Functions

 ThreadPool (Processor _proc, int _num_workers, const std::string &_name_prefix, int _numa_node, size_t _stack_size, CoreReservationSet &crs)
 
 ~ThreadPool (void)
 
void associate_as_master (void)
 
void worker_entry (void)
 
void start_worker_threads (void)
 
void stop_worker_threads (void)
 
void claim_workers (int count, std::set< int > &worker_ids)
 
void start_worker (int worker_id, int thread_id, int num_threads, void(*fnptr)(void *data), void *data, WorkItem *work_item)
 
int get_num_workers () const
 

Static Public Member Functions

static ThreadPoolget_associated_pool (bool warn_if_missing)
 
static WorkerInfoget_worker_info (bool warn_if_missing)
 

Protected Attributes

Processor proc
 
int num_workers
 
bool workers_running
 
std::vector< CoreReservation * > core_rsrvs
 
std::vector< Thread * > worker_threads
 
std::vector< WorkerInfoworker_infos
 

Constructor & Destructor Documentation

◆ ThreadPool()

Realm::ThreadPool::ThreadPool ( Processor  _proc,
int  _num_workers,
const std::string &  _name_prefix,
int  _numa_node,
size_t  _stack_size,
CoreReservationSet crs 
)

◆ ~ThreadPool()

Realm::ThreadPool::~ThreadPool ( void  )

Member Function Documentation

◆ associate_as_master()

void Realm::ThreadPool::associate_as_master ( void  )

◆ claim_workers()

void Realm::ThreadPool::claim_workers ( int  count,
std::set< int > &  worker_ids 
)

◆ get_associated_pool()

static ThreadPool * Realm::ThreadPool::get_associated_pool ( bool  warn_if_missing)
static

◆ get_num_workers()

int Realm::ThreadPool::get_num_workers ( ) const
inline

◆ get_worker_info()

static WorkerInfo * Realm::ThreadPool::get_worker_info ( bool  warn_if_missing)
static

◆ start_worker()

void Realm::ThreadPool::start_worker ( int  worker_id,
int  thread_id,
int  num_threads,
void(*)(void *data)  fnptr,
void *  data,
WorkItem work_item 
)

◆ start_worker_threads()

void Realm::ThreadPool::start_worker_threads ( void  )

◆ stop_worker_threads()

void Realm::ThreadPool::stop_worker_threads ( void  )

◆ worker_entry()

void Realm::ThreadPool::worker_entry ( void  )

Member Data Documentation

◆ core_rsrvs

std::vector<CoreReservation *> Realm::ThreadPool::core_rsrvs
protected

◆ num_workers

int Realm::ThreadPool::num_workers
protected

◆ proc

Processor Realm::ThreadPool::proc
protected

◆ worker_infos

std::vector<WorkerInfo> Realm::ThreadPool::worker_infos
protected

◆ worker_threads

std::vector<Thread *> Realm::ThreadPool::worker_threads
protected

◆ workers_running

bool Realm::ThreadPool::workers_running
protected

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