Scippy

SCIP

Solving Constraint Integer Programs

tpi_none.c
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright 2002-2022 Zuse Institute Berlin */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file tpi_none.c
26  * @ingroup TASKINTERFACE
27  * @brief the interface functions for dummy tpi
28  * @author Stephen J. Maher
29  * @author Leona Gottwald
30  */
31 
32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33 
34 #include "tpi/tpi.h"
35 
36 /** creates a job for parallel processing */
38  SCIP_JOB** job, /**< pointer to the job that will be created */
39  int jobid, /**< the id for the current job */
40  SCIP_RETCODE (*jobfunc)(void* args),/**< pointer to the job function */
41  void* jobarg /**< the job's argument */
42  )
43 {
44  SCIP_UNUSED( job );
45  SCIP_UNUSED( jobid );
46  SCIP_UNUSED( jobfunc );
47  SCIP_UNUSED( jobarg );
48 
49  return SCIP_ERROR;
50 }
51 
52 /** submit a job for parallel processing; the return value is a globally defined status */
54  SCIP_JOB* job, /**< pointer to the job to be submitted */
55  SCIP_SUBMITSTATUS* status /**< pointer to store the job's submit status */
56  )
57 {
58  SCIP_UNUSED( job );
59  SCIP_UNUSED( status );
60 
61  return SCIP_ERROR;
62 }
63 
64 /** Blocks until all jobs with the given jobid have finished and then returns the smallest SCIP_RETCODE of all the
65  * jobs */
67  int jobid /**< the id of the jobs to collect */
68  )
69 {
70  SCIP_UNUSED( jobid );
71 
72  return SCIP_ERROR;
73 }
74 
75 /** initializes tpi */
77  int nthreads, /**< the number of threads to be used */
78  int queuesize, /**< the size of the queue */
79  SCIP_Bool blockwhenfull /**< should the queue block when full */
80  )
81 {
82  SCIP_UNUSED( nthreads );
83  SCIP_UNUSED( queuesize );
84  SCIP_UNUSED( blockwhenfull );
85 
86  return SCIP_ERROR;
87 }
88 
89 /** deinitializes the tpi */
91  void
92  )
93 {
94  return SCIP_ERROR;
95 }
enum SCIP_Submitstatus SCIP_SUBMITSTATUS
Definition: type_tpi.h:54
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
#define SCIP_UNUSED(x)
Definition: def.h:447
SCIP_RETCODE SCIPtpiCollectJobs(int jobid)
Definition: tpi_none.c:66
the type definitions for the SCIP parallel interface
#define SCIP_Bool
Definition: def.h:93
SCIP_RETCODE SCIPtpiInit(int nthreads, int queuesize, SCIP_Bool blockwhenfull)
Definition: tpi_none.c:76
SCIP_RETCODE SCIPtpiSumbitJob(SCIP_JOB *job, SCIP_SUBMITSTATUS *status)
Definition: tpi_none.c:53
SCIP_RETCODE SCIPtpiCreateJob(SCIP_JOB **job, int jobid, SCIP_RETCODE(*jobfunc)(void *args), void *jobarg)
Definition: tpi_none.c:37
SCIP_RETCODE SCIPtpiExit(void)
Definition: tpi_none.c:90