Scippy

SCIP

Solving Constraint Integer Programs

tclique_def.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
4 /* TCLIQUE --- Algorithm for Maximum Cliques */
5 /* */
6 /* Copyright (c) 1996-2024 Zuse Institute Berlin (ZIB) */
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 TCLIQUE; see the file LICENSE. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file tclique_def.h
26  * @brief tclique defines
27  * @author Tobias Achterberg
28  */
29 
30 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
31 
32 #ifndef __TCLIQUE_DEF_H__
33 #define __TCLIQUE_DEF_H__
34 
35 /*
36  * include build configuration flags
37  */
38 #include "scip/config.h"
39 #include "scip/scip_export.h"
40 
41 #ifdef WITH_SCIPDEF
42 #include "scip/def.h"
43 #endif
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 #ifndef ALLOC_ABORT
50 #define ALLOC_ABORT(x) do \
51  { \
52  if( NULL == (x) ) \
53  { \
54  printf("[%s:%d] No memory in function call\n", __FILE__, __LINE__); \
55  abort(); \
56  } \
57  } \
58  while( FALSE )
59 #endif
60 
61 #ifndef ALLOC_FALSE
62 #define ALLOC_FALSE(x) do \
63  { \
64  if( NULL == (x) ) \
65  { \
66  printf("[%s:%d] No memory in function call\n", __FILE__, __LINE__); \
67  return FALSE; \
68  } \
69  } \
70  while( FALSE )
71 #endif
72 
73 #ifndef debug
74 #ifdef TCLIQUE_DEBUG
75 #define debug(x) x
76 #define debugMessage printf("[%s:%d] debug: ", __FILE__, __LINE__); printf
77 #define debugPrintf printf
78 #else
79 #define debug(x) /**/
80 #define debugMessage while( FALSE ) printf
81 #define debugPrintf while( FALSE ) printf
82 #endif
83 #endif
84 
85 #ifndef infoMessage
86 #define infoMessage printf
87 #endif
88 
89 #ifndef MAX
90 #define MAX(x,y) ((x) >= (y) ? (x) : (y))
91 #endif
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif
common defines and data types used in all packages of SCIP