1 #ifndef BARVINOK_OPTIONS_H
2 #define BARVINOK_OPTIONS_H
3 
4 #include <stdio.h>
5 #include <isl/arg.h>
6 #include <isl/ctx.h>
7 
8 #if defined(__cplusplus)
9 extern "C" {
10 #endif
11 
12 struct barvinok_stats {
13     long	base_cones;
14     long	volume_simplices;
15     long	topcom_empty_chambers;
16     long	topcom_chambers;
17     long	topcom_distinct_chambers;
18     long	gbr_solved_lps;
19     long	bernoulli_sums;
20 };
21 
22 void barvinok_stats_clear(struct barvinok_stats *stats);
23 void barvinok_stats_print(struct barvinok_stats *stats, FILE *out);
24 
25 struct barvinok_approximation_options {
26 	#define		BV_APPROX_SIGN_NONE	0
27 	#define		BV_APPROX_SIGN_APPROX	1
28 	#define		BV_APPROX_SIGN_LOWER	2
29 	#define		BV_APPROX_SIGN_UPPER	3
30 	int	    	approximation;
31 	#define		BV_APPROX_NONE		0
32 	#define		BV_APPROX_DROP		1
33 	#define		BV_APPROX_SCALE		2
34 	#define		BV_APPROX_VOLUME	3
35 	#define		BV_APPROX_BERNOULLI	4
36 	int	    	method;
37 	#define		BV_APPROX_SCALE_FAST	(1 << 0)
38 	#define		BV_APPROX_SCALE_NARROW	(1 << 1)
39 	#define		BV_APPROX_SCALE_NARROW2	(1 << 2)
40 	#define		BV_APPROX_SCALE_CHAMBER	(1 << 3)
41 	int	    	scale_flags;
42 	#define		BV_VOL_LIFT		0
43 	#define		BV_VOL_VERTEX		1
44 	#define		BV_VOL_BARYCENTER	2
45 	int	    	volume_triangulate;
46 };
47 
48 struct barvinok_options {
49     struct isl_options	    *isl;
50     struct barvinok_approximation_options *approx;
51     struct barvinok_stats   *stats;
52 
53     /* PolyLib options */
54     unsigned	MaxRays;
55 
56     /* NTL options */
57 		/* LLL reduction parameter delta=LLL_a/LLL_b */
58     long	LLL_a;
59     long	LLL_b;
60 
61     /* barvinok options */
62     #define	BV_SPECIALIZATION_BF		2
63     #define	BV_SPECIALIZATION_DF		1
64     #define	BV_SPECIALIZATION_RANDOM	0
65     #define	BV_SPECIALIZATION_TODD		3
66     int		incremental_specialization;
67 
68     unsigned long   	    max_index;
69     int		    	    primal;
70     int		    	    lookup_table;
71     int		    	    count_sample_infinite;
72 
73     int			    try_Delaunay_triangulation;
74 
75     /* basis reduction options */
76     #define	BV_GBR_GLPK	1
77     #define	BV_GBR_CDD	2
78     #define	BV_GBR_ISL	4
79     int		gbr_lp_solver;
80 
81     #define	BV_LP_POLYLIB		0
82     #define	BV_LP_GLPK		1
83     #define	BV_LP_CDD		2
84     #define	BV_LP_CDDF		3
85     #define	BV_LP_ISL		4
86     int		lp_solver;
87 
88     #define	BV_SUM_BOX		0
89     /* deprecated */
90     #define	BV_SUM_BARVINOK		0
91     #define	BV_SUM_EULER		1
92     #define	BV_SUM_BERNOULLI	2
93     #define	BV_SUM_LAURENT		3
94     #define	BV_SUM_LAURENT_OLD	4
95     int		summation;
96 
97     #define	BV_CHAMBERS_POLYLIB	0
98     #define	BV_CHAMBERS_TOPCOM	1
99     #define	BV_CHAMBERS_ISL		2
100     int		chambers;
101 
102     #define	BV_HULL_GBR		0
103     #define	BV_HULL_HILBERT		1
104     int		integer_hull;
105 
106     int		verbose;
107 
108     int		print_stats;
109 
110     int		gbr_only_first;
111 };
112 
113 ISL_ARG_DECL(barvinok_options, struct barvinok_options, barvinok_options_args)
114 ISL_ARG_CTX_DECL(barvinok_options, struct barvinok_options,
115 	barvinok_options_args)
116 
117 #if defined(__cplusplus)
118 }
119 #endif
120 
121 #endif
122