Scippy

SCIP

Solving Constraint Integer Programs

struct_buffer.h
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 (C) 2002-2014 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP 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 SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file struct_buffer.h
17  * @brief datastructures for memory buffers for temporary objects
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_STRUCT_BUFFER_H__
24 #define __SCIP_STRUCT_BUFFER_H__
25 
26 
27 #include <assert.h>
28 
29 #include "scip/def.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /** memory buffer storage for temporary objects */
37 {
38  void** data; /**< allocated memory chunks for arbitrary data */
39  int* size; /**< sizes of buffers in bytes */
40  SCIP_Bool* used; /**< TRUE iff corresponding buffer is in use */
41  int ndata; /**< number of memory chunks */
42  int firstfree; /**< first unused memory chunk */
43 };
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif
50