Detailed Description
the interface functions for dummy tpi
Definition in file tpi_none.c.
#include "tpi/tpi.h"
Go to the source code of this file.
Functions | |
SCIP_RETCODE | SCIPtpiInitLock (SCIP_LOCK **lock) |
void | SCIPtpiDestroyLock (SCIP_LOCK **lock) |
SCIP_RETCODE | SCIPtpiAcquireLock (SCIP_LOCK *lock) |
SCIP_RETCODE | SCIPtpiReleaseLock (SCIP_LOCK *lock) |
SCIP_RETCODE | SCIPtpiInitCondition (SCIP_CONDITION **condition) |
void | SCIPtpiDestroyCondition (SCIP_CONDITION **condition) |
SCIP_RETCODE | SCIPtpiSignalCondition (SCIP_CONDITION *condition) |
SCIP_RETCODE | SCIPtpiBroadcastCondition (SCIP_CONDITION *condition) |
SCIP_RETCODE | SCIPtpiWaitCondition (SCIP_CONDITION *condition, SCIP_LOCK *lock) |
int | SCIPtpiGetNumThreads (void) |
int | SCIPtpiGetThreadNum (void) |
SCIP_RETCODE | SCIPtpiCreateJob (SCIP_JOB **job, int jobid, SCIP_RETCODE(*jobfunc)(void *args), void *jobarg) |
int | SCIPtpiGetNewJobID (void) |
SCIP_RETCODE | SCIPtpiSubmitJob (SCIP_JOB *job, SCIP_SUBMITSTATUS *status) |
SCIP_RETCODE | SCIPtpiCollectJobs (int jobid) |
SCIP_RETCODE | SCIPtpiInit (int nthreads, int queuesize, SCIP_Bool blockwhenfull) |
SCIP_RETCODE | SCIPtpiExit (void) |
Function Documentation
◆ SCIPtpiInitLock()
SCIP_RETCODE SCIPtpiInitLock | ( | SCIP_LOCK ** | lock | ) |
◆ SCIPtpiDestroyLock()
void SCIPtpiDestroyLock | ( | SCIP_LOCK ** | lock | ) |
◆ SCIPtpiAcquireLock()
SCIP_RETCODE SCIPtpiAcquireLock | ( | SCIP_LOCK * | lock | ) |
◆ SCIPtpiReleaseLock()
SCIP_RETCODE SCIPtpiReleaseLock | ( | SCIP_LOCK * | lock | ) |
◆ SCIPtpiInitCondition()
SCIP_RETCODE SCIPtpiInitCondition | ( | SCIP_CONDITION ** | condition | ) |
initializes the given condition variable
- Parameters
-
condition condition to be created and initialized
Definition at line 86 of file tpi_none.c.
◆ SCIPtpiDestroyCondition()
void SCIPtpiDestroyCondition | ( | SCIP_CONDITION ** | condition | ) |
destroys the given condition variable
- Parameters
-
condition condition to be destroyed and freed
Definition at line 97 of file tpi_none.c.
◆ SCIPtpiSignalCondition()
SCIP_RETCODE SCIPtpiSignalCondition | ( | SCIP_CONDITION * | condition | ) |
signals one waiting thread
- Parameters
-
condition the condition variable to signal
Definition at line 106 of file tpi_none.c.
◆ SCIPtpiBroadcastCondition()
SCIP_RETCODE SCIPtpiBroadcastCondition | ( | SCIP_CONDITION * | condition | ) |
signals all waiting threads
- Parameters
-
condition the condition variable to broadcast
Definition at line 114 of file tpi_none.c.
◆ SCIPtpiWaitCondition()
SCIP_RETCODE SCIPtpiWaitCondition | ( | SCIP_CONDITION * | condition, |
SCIP_LOCK * | lock | ||
) |
waits on a condition variable. The given lock must be held by the caller and will be held when this function returns.
- Parameters
-
condition the condition variable to wait on lock the lock that is held by the caller
Definition at line 124 of file tpi_none.c.
◆ SCIPtpiGetNumThreads()
int SCIPtpiGetNumThreads | ( | void | ) |
returns the number of threads
Definition at line 133 of file tpi_none.c.
◆ SCIPtpiGetThreadNum()
int SCIPtpiGetThreadNum | ( | void | ) |
returns the thread number
Definition at line 141 of file tpi_none.c.
◆ SCIPtpiCreateJob()
SCIP_RETCODE SCIPtpiCreateJob | ( | SCIP_JOB ** | job, |
int | jobid, | ||
SCIP_RETCODE(*)(void *args) | jobfunc, | ||
void * | jobarg | ||
) |
creates a job for parallel processing
- Parameters
-
job pointer to the job that will be created jobid the id for the current job jobfunc pointer to the job function jobarg the job's argument
Definition at line 155 of file tpi_none.c.
◆ SCIPtpiGetNewJobID()
int SCIPtpiGetNewJobID | ( | void | ) |
get a new job id for a new set of jobs
Definition at line 171 of file tpi_none.c.
◆ SCIPtpiSubmitJob()
SCIP_RETCODE SCIPtpiSubmitJob | ( | SCIP_JOB * | job, |
SCIP_SUBMITSTATUS * | status | ||
) |
submit a job for parallel processing; the return value is a globally defined status
- Parameters
-
job pointer to the job to be submitted status pointer to store the job's submit status
Definition at line 179 of file tpi_none.c.
◆ SCIPtpiCollectJobs()
SCIP_RETCODE SCIPtpiCollectJobs | ( | int | jobid | ) |
Blocks until all jobs with the given jobid have finished and then returns the smallest SCIP_RETCODE of all the jobs
- Parameters
-
jobid the id of the jobs to collect
Definition at line 192 of file tpi_none.c.
◆ SCIPtpiInit()
SCIP_RETCODE SCIPtpiInit | ( | int | nthreads, |
int | queuesize, | ||
SCIP_Bool | blockwhenfull | ||
) |
initializes tpi
- Parameters
-
nthreads the number of threads to be used queuesize the size of the queue blockwhenfull should the queue block when full
Definition at line 202 of file tpi_none.c.
◆ SCIPtpiExit()
SCIP_RETCODE SCIPtpiExit | ( | void | ) |
deinitializes the tpi
Definition at line 216 of file tpi_none.c.