barvinok_summate.c: verify_point: explicitly project onto parameter space
[barvinok.git] / reduce_domain.h
blobdef952431b3ea7c5c2a7ffed90d937b742905cac
1 #include <barvinok/polylib.h>
3 #if defined(__cplusplus)
4 extern "C" {
5 #endif
7 struct barvinok_options;
9 Polyhedron *true_context(Polyhedron *P, Polyhedron *C, unsigned MaxRays);
10 Vector *inner_point(Polyhedron *P);
11 int is_internal(Vector *point, Value *constraint);
13 Polyhedron *reduce_domain(Polyhedron *D, int nd,
14 Vector *inner, struct barvinok_options *options);
16 #define ALLOCN(type,n) (type*)malloc((n) * sizeof(type))
18 #define FORALL_REDUCED_DOMAIN(PP,C,nd,options,i,PD,rVD) \
19 do { \
20 Param_Domain *PD; \
21 Polyhedron *rVD; \
22 int i; \
23 Param_Domain *_frd_next; \
24 Vector *_frd_inner = inner_point(C); \
25 if (nd < 0) \
26 for (nd = 0, PD = PP->D; PD; ++nd, PD = PD->next); \
27 for (i = 0, PD = PP->D; PD; PD = _frd_next) { \
28 rVD = reduce_domain(PD->Domain, nd, _frd_inner, options); \
29 _frd_next = PD->next; \
30 if (!rVD) \
31 continue; \
33 #define FORALL_REDUCED_DOMAIN_RESET \
34 do { \
35 Vector_Free(_frd_inner); \
36 } while(0);
37 #define END_FORALL_REDUCED_DOMAIN \
38 } \
39 ++i; \
40 } \
41 FORALL_REDUCED_DOMAIN_RESET \
42 nd = i; \
43 } while(0);
46 #if defined(__cplusplus)
48 #endif