brintos

brintos / llvm-project-archived public Read only

0
0
Text · 842 B · 6b2c532 Raw
33 lines · c
1/*2 * Copyright 2018      Sven Verdoolaege3 *4 * Use of this software is governed by the MIT license5 *6 * Written by Sven Verdoolaege.7 */8 9#define xFN(TYPE,NAME) TYPE ## _ ## NAME10#define FN(TYPE,NAME) xFN(TYPE,NAME)11 12/* Return the minimum of the integer piecewise affine13 * expression "f" over its definition domain.14 *15 * Return negative infinity if the optimal value is unbounded and16 * NaN if the domain of the expression is empty.17 */18__isl_give isl_val *FN(TYPE,min_val)(__isl_take TYPE *f)19{20	return FN(TYPE,opt_val)(f, 0);21}22 23/* Return the maximum of the integer piecewise affine24 * expression "f" over its definition domain.25 *26 * Return infinity if the optimal value is unbounded and27 * NaN if the domain of the expression is empty.28 */29__isl_give isl_val *FN(TYPE,max_val)(__isl_take TYPE *f)30{31	return FN(TYPE,opt_val)(f, 1);32}33