isl_map_simplify.c: better_div_constraint: use isl_basic_map_dim
[isl.git] / isl_ilp_opt_fn_val_templ.c
blob6b2c5323225a7579ae09d71e21493714fa84c815
1 /*
2 * Copyright 2018 Sven Verdoolaege
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege.
7 */
9 #define xFN(TYPE,NAME) TYPE ## _ ## NAME
10 #define FN(TYPE,NAME) xFN(TYPE,NAME)
12 /* Return the minimum of the integer piecewise affine
13 * expression "f" over its definition domain.
15 * Return negative infinity if the optimal value is unbounded and
16 * NaN if the domain of the expression is empty.
18 __isl_give isl_val *FN(TYPE,min_val)(__isl_take TYPE *f)
20 return FN(TYPE,opt_val)(f, 0);
23 /* Return the maximum of the integer piecewise affine
24 * expression "f" over its definition domain.
26 * Return infinity if the optimal value is unbounded and
27 * NaN if the domain of the expression is empty.
29 __isl_give isl_val *FN(TYPE,max_val)(__isl_take TYPE *f)
31 return FN(TYPE,opt_val)(f, 1);