isl_tab_basic_map_partial_lexopt: fix memory leak on error path
[platform/upstream/isl.git] / include / isl_lp.h
1 /*
2  * Copyright 2008-2009 Katholieke Universiteit Leuven
3  *
4  * Use of this software is governed by the GNU LGPLv2.1 license
5  *
6  * Written by Sven Verdoolaege, K.U.Leuven, Departement
7  * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
8  */
9
10 #ifndef ISL_LP_H
11 #define ISL_LP_H
12
13 #include <isl_map.h>
14 #include <isl_set.h>
15
16 enum isl_lp_result {
17         isl_lp_error = -1,
18         isl_lp_ok = 0,
19         isl_lp_unbounded,
20         isl_lp_empty
21 };
22
23 #if defined(__cplusplus)
24 extern "C" {
25 #endif
26
27 enum isl_lp_result isl_basic_map_solve_lp(struct isl_basic_map *bmap, int max,
28                                       isl_int *f, isl_int denom, isl_int *opt,
29                                       isl_int *opt_denom,
30                                       struct isl_vec **sol);
31 enum isl_lp_result isl_basic_set_solve_lp(struct isl_basic_set *bset, int max,
32                                       isl_int *f, isl_int denom, isl_int *opt,
33                                       isl_int *opt_denom,
34                                       struct isl_vec **sol);
35 enum isl_lp_result isl_map_solve_lp(__isl_keep isl_map *map, int max,
36                                       isl_int *f, isl_int denom, isl_int *opt,
37                                       isl_int *opt_denom,
38                                       struct isl_vec **sol);
39 enum isl_lp_result isl_set_solve_lp(__isl_keep isl_set *set, int max,
40                                       isl_int *f, isl_int denom, isl_int *opt,
41                                       isl_int *opt_denom,
42                                       struct isl_vec **sol);
43
44 #if defined(__cplusplus)
45 }
46 #endif
47
48 #endif