X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_lp.c;h=28e317cca1b8d3bf42f41082b92d5c026b2ba7c7;hb=de51a9bc4da5dd3f1f9f57c2362da6f9752c44e0;hp=8c85a60d7b8218433d69931fa58b3044fb065af9;hpb=0dcb90aef1a2934609fdce9d8cf527af8b558d43;p=platform%2Fupstream%2Fisl.git diff --git a/isl_lp.c b/isl_lp.c index 8c85a60..28e317c 100644 --- a/isl_lp.c +++ b/isl_lp.c @@ -1,7 +1,7 @@ /* * Copyright 2008-2009 Katholieke Universiteit Leuven * - * Use of this software is governed by the GNU LGPLv2.1 license + * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, K.U.Leuven, Departement * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium @@ -13,6 +13,7 @@ #include "isl_lp_piplib.h" #include #include "isl_tab.h" +#include enum isl_lp_result isl_tab_solve_lp(struct isl_basic_map *bmap, int maximize, isl_int *f, isl_int denom, isl_int *opt, @@ -27,7 +28,7 @@ enum isl_lp_result isl_tab_solve_lp(struct isl_basic_map *bmap, int maximize, isl_seq_neg(f, f, 1 + dim); bmap = isl_basic_map_gauss(bmap, NULL); - tab = isl_tab_from_basic_map(bmap); + tab = isl_tab_from_basic_map(bmap, 0); res = isl_tab_min(tab, f, denom, opt, opt_denom, 0); if (res == isl_lp_ok && sol) { *sol = isl_tab_get_sample_value(tab); @@ -45,7 +46,7 @@ enum isl_lp_result isl_tab_solve_lp(struct isl_basic_map *bmap, int maximize, } /* Given a basic map "bmap" and an affine combination of the variables "f" - * with denominator "denom", set *opt/*opt_denom to the minimal + * with denominator "denom", set *opt / *opt_denom to the minimal * (or maximal if "maximize" is true) value attained by f/d over "bmap", * assuming the basic map is not empty and the expression cannot attain * arbitrarily small (or large) values. @@ -108,7 +109,7 @@ enum isl_lp_result isl_map_solve_lp(__isl_keep isl_map *map, int max, if (map->p[i]->n_div > max_div) max_div = map->p[i]->n_div; if (max_div > 0) { - unsigned total = isl_dim_total(map->dim); + unsigned total = isl_space_dim(map->dim, isl_dim_all); v = isl_vec_alloc(map->ctx, 1 + total + max_div); if (!v) return isl_lp_error;