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-2019 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* TCLIQUE is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with TCLIQUE; see the file COPYING. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file tclique_def.h
17  * @brief tclique defines
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __TCLIQUE_DEF_H__
24 #define __TCLIQUE_DEF_H__
25 
26 /*
27  * include build configuration flags
28  */
29 #ifndef NO_CONFIG_HEADER
30 #include "scip/config.h"
31 #endif
32 
33 #ifdef WITH_SCIPDEF
34 #include "scip/def.h"
35 #endif
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 #ifndef ALLOC_ABORT
42 #define ALLOC_ABORT(x) do \
43  { \
44  if( NULL == (x) ) \
45  { \
46  printf("[%s:%d] No memory in function call\n", __FILE__, __LINE__); \
47  abort(); \
48  } \
49  } \
50  while( FALSE )
51 #endif
52 
53 #ifndef ALLOC_FALSE
54 #define ALLOC_FALSE(x) do \
55  { \
56  if( NULL == (x) ) \
57  { \
58  printf("[%s:%d] No memory in function call\n", __FILE__, __LINE__); \
59  return FALSE; \
60  } \
61  } \
62  while( FALSE )
63 #endif
64 
65 #ifndef debug
66 #ifdef TCLIQUE_DEBUG
67 #define debug(x) x
68 #define debugMessage printf("[%s:%d] debug: ", __FILE__, __LINE__); printf
69 #define debugPrintf printf
70 #else
71 #define debug(x) /**/
72 #define debugMessage while( FALSE ) printf
73 #define debugPrintf while( FALSE ) printf
74 #endif
75 #endif
76 
77 #ifndef infoMessage
78 #define infoMessage printf
79 #endif
80 
81 #ifndef MAX
82 #define MAX(x,y) ((x) >= (y) ? (x) : (y))
83 #endif
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif
common defines and data types used in all packages of SCIP