SCIP Doxygen Documentation
 
Loading...
Searching...
No Matches
SCIP_ThreadPool Struct Reference

Detailed Description

The thread pool

Definition at line 61 of file tpi_tnycthrd.c.

Data Fields

int nthreads
 
int queuesize
 
thrd_tthreads
 
SCIP_JOBQUEUEjobqueue
 
SCIP_JOBQUEUEcurrentjobs
 
SCIP_JOBQUEUEfinishedjobs
 
int currworkingthreads
 
SCIP_Bool blockwhenfull
 
int currentid
 
SCIP_Bool shutdown
 
SCIP_Bool queueopen
 
SCIP_LOCK poollock
 
SCIP_CONDITION queuenotempty
 
SCIP_CONDITION queuenotfull
 
SCIP_CONDITION queueempty
 
SCIP_CONDITION jobfinished
 

Field Documentation

◆ nthreads

int SCIP_ThreadPool::nthreads

number of threads in the pool

Definition at line 64 of file tpi_tnycthrd.c.

Referenced by SCIPtpiGetNumThreads().

◆ queuesize

int SCIP_ThreadPool::queuesize

the total number of items to enter the queue

Definition at line 65 of file tpi_tnycthrd.c.

Referenced by threadPoolAddWork(), and threadPoolThreadRetcode().

◆ threads

thrd_t* SCIP_ThreadPool::threads

the threads included in the pool

Definition at line 68 of file tpi_tnycthrd.c.

◆ jobqueue

SCIP_JOBQUEUE* SCIP_ThreadPool::jobqueue

the job queue

Definition at line 69 of file tpi_tnycthrd.c.

Referenced by SCIPtpiCollectJobs(), threadPoolAddWork(), and threadPoolThreadRetcode().

◆ 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 70 of file tpi_tnycthrd.c.

Referenced by SCIPtpiCollectJobs(), and threadPoolThreadRetcode().

◆ finishedjobs

SCIP_JOBQUEUE* SCIP_ThreadPool::finishedjobs

finished jobs that are not yet collected

Definition at line 72 of file tpi_tnycthrd.c.

Referenced by SCIPtpiCollectJobs(), and threadPoolThreadRetcode().

◆ currworkingthreads

int SCIP_ThreadPool::currworkingthreads

the threads currently processing jobs

Definition at line 73 of file tpi_tnycthrd.c.

Referenced by threadPoolThreadRetcode().

◆ blockwhenfull

SCIP_Bool SCIP_ThreadPool::blockwhenfull

indicates that the queue can only be as large as nthreads

Definition at line 74 of file tpi_tnycthrd.c.

Referenced by threadPoolAddWork(), and threadPoolThreadRetcode().

◆ currentid

int SCIP_ThreadPool::currentid

current job id

Definition at line 75 of file tpi_tnycthrd.c.

Referenced by SCIPtpiGetNewJobID(), and SCIPtpiSumbitJob().

◆ shutdown

SCIP_Bool SCIP_ThreadPool::shutdown

indicates whether the pool needs to be shut down

Definition at line 78 of file tpi_tnycthrd.c.

Referenced by threadPoolAddWork(), and threadPoolThreadRetcode().

◆ queueopen

SCIP_Bool SCIP_ThreadPool::queueopen

indicates whether the queue is open

Definition at line 79 of file tpi_tnycthrd.c.

Referenced by threadPoolAddWork().

◆ poollock

SCIP_LOCK SCIP_ThreadPool::poollock

mutex to allow read and write of the pool features

Definition at line 82 of file tpi_tnycthrd.c.

Referenced by SCIPtpiCollectJobs(), SCIPtpiGetNewJobID(), threadPoolAddWork(), and threadPoolThreadRetcode().

◆ queuenotempty

SCIP_CONDITION SCIP_ThreadPool::queuenotempty

condition to broadcast the queue has jobs

Definition at line 83 of file tpi_tnycthrd.c.

Referenced by threadPoolThreadRetcode().

◆ queuenotfull

SCIP_CONDITION SCIP_ThreadPool::queuenotfull

condition to broadcast the queue is not full

Definition at line 84 of file tpi_tnycthrd.c.

Referenced by threadPoolAddWork(), and threadPoolThreadRetcode().

◆ queueempty

SCIP_CONDITION SCIP_ThreadPool::queueempty

condition to broadcast that the queue is empty

Definition at line 85 of file tpi_tnycthrd.c.

Referenced by threadPoolThreadRetcode().

◆ jobfinished

SCIP_CONDITION SCIP_ThreadPool::jobfinished

condition to broadcast that a job has been finished

Definition at line 86 of file tpi_tnycthrd.c.

Referenced by SCIPtpiCollectJobs().