/* Helper function to add a guarded polynomial to either pwf_tight or pwf, * depending on whether the result has been determined to be tight. */ static isl_stat add_guarded_poly(__isl_take isl_basic_set *bset, __isl_take isl_qpolynomial *poly, struct range_data *data) { enum isl_fold type = data->sign < 0 ? isl_fold_min : isl_fold_max; isl_set *set; isl_qpolynomial_fold *fold; isl_pw_qpolynomial_fold *pwf; bset = isl_basic_set_params(bset); poly = isl_qpolynomial_project_domain_on_params(poly); fold = isl_qpolynomial_fold_alloc(type, poly); set = isl_set_from_basic_set(bset); pwf = isl_pw_qpolynomial_fold_alloc(type, set, fold); if (data->tight) data->pwf_tight = isl_pw_qpolynomial_fold_fold( data->pwf_tight, pwf); else data->pwf = isl_pw_qpolynomial_fold_fold(data->pwf, pwf); return isl_stat_ok; }
static void *isl_obj_pw_qpf_add(void *v1, void *v2) { return isl_pw_qpolynomial_fold_fold((struct isl_pw_qpolynomial_fold *)v1, (struct isl_pw_qpolynomial_fold *)v2); }