1 #ifndef SECTION_ARRAY_H
2 #define SECTION_ARRAY_H
4 #include <barvinok/evalue.h>
6 #define REALLOCN(ptr,type,n) (type*)realloc(ptr, (n) * sizeof(type))
8 struct evalue_section_array
{
9 struct evalue_section
*s
;
14 static void evalue_section_array_init(struct evalue_section_array
*sections
)
21 static void evalue_section_array_ensure(struct evalue_section_array
*sections
,
24 if (size
<= sections
->size
)
27 sections
->size
= size
+ 32;
28 sections
->s
= REALLOCN(sections
->s
, struct evalue_section
, sections
->size
);
31 static void evalue_section_array_add(struct evalue_section_array
*sections
,
32 Polyhedron
*D
, evalue
*e
)
34 sections
->s
[sections
->ns
].E
= e
;
35 sections
->s
[sections
->ns
].D
= D
;