cudd
3.0.0
The University of Colorado Decision Diagram Package
mtr
mtrInt.h
Go to the documentation of this file.
1
46
#ifndef MTRINT_H_
47
#define MTRINT_H_
48
49
/*---------------------------------------------------------------------------*/
50
/* Nested includes */
51
/*---------------------------------------------------------------------------*/
52
53
#include "config.h"
54
#include "
mtr.h
"
55
56
/*---------------------------------------------------------------------------*/
57
/* Constant declarations */
58
/*---------------------------------------------------------------------------*/
59
60
#ifndef SIZEOF_VOID_P
61
#define SIZEOF_VOID_P 4
62
#endif
63
#ifndef SIZEOF_INT
64
#define SIZEOF_INT 4
65
#endif
66
67
#if defined(__GNUC__)
68
#define MTR_INLINE __inline__
69
# if (__GNUC__ >2 || __GNUC_MINOR__ >=7)
70
# define MTR_UNUSED __attribute__ ((unused))
71
# else
72
# define MTR_UNUSED
73
# endif
74
#else
75
#define MTR_INLINE
76
#define MTR_UNUSED
77
#endif
78
79
/* MTR_MAXHIGH is defined in such a way that on 32-bit and 64-bit
80
** machines one can cast a value to (int) without generating a negative
81
** number.
82
*/
83
#if SIZEOF_VOID_P == 8
84
#define MTR_MAXHIGH (((MtrHalfWord) ~0) >> 1)
85
#else
86
#define MTR_MAXHIGH ((MtrHalfWord) ~0)
87
#endif
88
89
/*---------------------------------------------------------------------------*/
90
/* Type declarations */
91
/*---------------------------------------------------------------------------*/
92
96
#if SIZEOF_VOID_P == 8
97
typedef
uint32_t
MtrHalfWord
;
98
#else
99
typedef
uint16_t
MtrHalfWord
;
100
#endif
101
102
/*---------------------------------------------------------------------------*/
103
/* Stucture declarations */
104
/*---------------------------------------------------------------------------*/
105
109
struct
MtrNode_
{
110
MtrHalfWord
flags;
111
MtrHalfWord
low;
112
MtrHalfWord
size;
113
MtrHalfWord
index;
114
struct
MtrNode_
*parent;
115
struct
MtrNode_
*child;
116
struct
MtrNode_
*elder;
117
struct
MtrNode_
*younger;
118
};
119
120
/*---------------------------------------------------------------------------*/
121
/* Variable declarations */
122
/*---------------------------------------------------------------------------*/
123
124
125
/*---------------------------------------------------------------------------*/
126
/* Macro declarations */
127
/*---------------------------------------------------------------------------*/
128
129
/* Flag manipulation macros */
130
#define MTR_SET(node, flag) (node->flags |= (flag))
131
#define MTR_RESET(node, flag) (node->flags &= ~ (flag))
132
#define MTR_TEST(node, flag) (node->flags & (flag))
133
134
137
/*---------------------------------------------------------------------------*/
138
/* Function prototypes */
139
/*---------------------------------------------------------------------------*/
140
144
#endif
/* MTRINT_H_ */
MtrHalfWord
uint32_t MtrHalfWord
unsigned integer half the size of a pointer.
Definition:
mtrInt.h:97
MtrNode_
multi-way tree node.
Definition:
mtrInt.h:109
mtr.h
Multiway-branch tree manipulation.
Generated on Wed Jul 24 2019 00:00:00 for cudd by
1.8.17