Scippy

SCIP

Solving Constraint Integer Programs

SCIP_ThreadPool Struct Reference

Detailed Description

The thread pool

Definition at line 93 of file tpi_tnycthrd.c.

Data Fields

int nthreads
 
int queuesize
 
thrd_t * threads
 
SCIP_JOBQUEUEjobqueue
 
SCIP_JOBQUEUEcurrentjobs
 
SCIP_JOBQUEUEfinishedjobs
 
int currworkingthreads
 
SCIP_Bool blockwhenfull
 
int currentid
 
SCIP_Bool shutdown
 
SCIP_Bool queueopen
 
mtx_t poollock
 
cnd_t queuenotempty
 
cnd_t queuenotfull
 
cnd_t queueempty
 
cnd_t jobfinished
 

Field Documentation

◆ nthreads

int SCIP_ThreadPool::nthreads

number of threads in the pool

Definition at line 96 of file tpi_tnycthrd.c.

◆ queuesize

int SCIP_ThreadPool::queuesize

the total number of items to enter the queue

Definition at line 97 of file tpi_tnycthrd.c.

Referenced by jobQueueAddJob().

◆ threads

thrd_t* SCIP_ThreadPool::threads

the threads included in the pool

Definition at line 100 of file tpi_tnycthrd.c.

◆ jobqueue

SCIP_JOBQUEUE* SCIP_ThreadPool::jobqueue

the job queue

Definition at line 101 of file tpi_tnycthrd.c.

Referenced by freeJobQueue(), and jobQueueAddJob().

◆ currentjobs

SCIP_JOBQUEUE* SCIP_ThreadPool::currentjobs

the jobs currently being processed on a thread; only a single job is allowed per thread.

Definition at line 102 of file tpi_tnycthrd.c.

◆ finishedjobs

SCIP_JOBQUEUE* SCIP_ThreadPool::finishedjobs

finished jobs that are not yet collected

Definition at line 104 of file tpi_tnycthrd.c.

◆ currworkingthreads

int SCIP_ThreadPool::currworkingthreads

the threads currently processing jobs

Definition at line 105 of file tpi_tnycthrd.c.

◆ blockwhenfull

SCIP_Bool SCIP_ThreadPool::blockwhenfull

indicates that the queue can only be as large as nthreads

Definition at line 106 of file tpi_tnycthrd.c.

◆ currentid

int SCIP_ThreadPool::currentid

current job id

Definition at line 107 of file tpi_tnycthrd.c.

◆ shutdown

SCIP_Bool SCIP_ThreadPool::shutdown

indicates whether the pool needs to be shut down

Definition at line 110 of file tpi_tnycthrd.c.

Referenced by freeJobQueue().

◆ queueopen

SCIP_Bool SCIP_ThreadPool::queueopen

indicates whether the queue is open

Definition at line 111 of file tpi_tnycthrd.c.

Referenced by freeJobQueue().

◆ poollock

mtx_t SCIP_ThreadPool::poollock

mutex to allow read and write of the pool features

Definition at line 114 of file tpi_tnycthrd.c.

◆ queuenotempty

cnd_t SCIP_ThreadPool::queuenotempty

condition to broadcast the queue has jobs

Definition at line 115 of file tpi_tnycthrd.c.

Referenced by jobQueueAddJob().

◆ queuenotfull

cnd_t SCIP_ThreadPool::queuenotfull

condition to broadcast the queue is not full

Definition at line 116 of file tpi_tnycthrd.c.

◆ queueempty

cnd_t SCIP_ThreadPool::queueempty

condition to broadcast that the queue is empty

Definition at line 117 of file tpi_tnycthrd.c.

◆ jobfinished

cnd_t SCIP_ThreadPool::jobfinished

condition to broadcast that a job has been finished

Definition at line 118 of file tpi_tnycthrd.c.