remove $Id$, it doesn't work with git anyway
[libfirm] / ir / kaps / pbqp_t.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   PBQP data types.
23  * @date    02.10.2008
24  * @author  Sebastian Buchwald
25  */
26 #ifndef KAPS_PBQP_T_H
27 #define KAPS_PBQP_T_H
28
29 #include <limits.h>
30 #include <stdint.h>
31 #include <stdio.h>
32
33 #include "adt/obstack.h"
34
35 #define KAPS_DUMP 0
36 #define KAPS_ENABLE_VECTOR_NAMES 0
37 #define KAPS_STATISTIC 0
38 #define KAPS_TIMING 0
39 #define KAPS_USE_UNSIGNED 1
40
41 #if KAPS_USE_UNSIGNED
42         typedef unsigned num;
43         #define INF_COSTS UINT_MAX
44 #else
45         typedef intmax_t num;
46         #define INF_COSTS INTMAX_MAX
47 #endif
48
49 #include "matrix_t.h"
50 #include "vector_t.h"
51
52 typedef struct pbqp_edge_t pbqp_edge_t;
53 typedef struct pbqp_node_t pbqp_node_t;
54 typedef struct pbqp_t      pbqp_t;
55
56 struct pbqp_t {
57         struct obstack obstack;            /* Obstack. */
58         num            solution;           /* Computed solution. */
59         size_t         num_nodes;          /* Number of PBQP nodes. */
60         pbqp_node_t  **nodes;              /* Nodes of PBQP. */
61         FILE          *dump_file;          /* File to dump in. */
62 #if KAPS_STATISTIC
63         unsigned       num_bf;             /* Number of brute force reductions. */
64         unsigned       num_edges;          /* Number of independent edges. */
65         unsigned       num_r0;             /* Number of trivial solved nodes. */
66         unsigned       num_r1;             /* Number of R1 reductions. */
67         unsigned       num_r2;             /* Number of R2 reductions. */
68         unsigned       num_rm;             /* Number of RM reductions. */
69         unsigned       num_rn;             /* Number of RN reductions. */
70 #endif
71 };
72
73 #endif /* KAPS_PBQP_T_H */