llvm/polly/lib/External/isl/isl_output.c

/*
 * Copyright 2008-2009 Katholieke Universiteit Leuven
 * Copyright 2010      INRIA Saclay
 * Copyright 2012-2013 Ecole Normale Superieure
 * Copyright 2019      Cerebras Systems
 *
 * 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
 * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite,
 * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France 
 * and Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France
 * and Cerebras Systems, 175 S San Antonio Rd, Los Altos, CA, USA
 */

#include <stdlib.h>
#include <string.h>
#include <isl_ctx_private.h>
#include <isl_map_private.h>
#include <isl/set.h>
#include <isl_seq.h>
#include <isl_polynomial_private.h>
#include <isl_printer_private.h>
#include <isl_space_private.h>
#include <isl_mat_private.h>
#include <isl_vec_private.h>
#include <isl/union_set.h>
#include <isl/union_map.h>
#include <isl/constraint.h>
#include <isl_local.h>
#include <isl_local_space_private.h>
#include <isl_aff_private.h>
#include <isl_id_private.h>
#include <isl_val_private.h>
#include <isl_constraint_private.h>
#include <isl/ast_build.h>
#include <isl_sort.h>
#include <isl_output_private.h>

#include <bset_to_bmap.c>
#include <set_to_map.c>
#include <uset_to_umap.c>

static const char *s_to[2] =;
static const char *s_and[2] =;
static const char *s_or[2] =;
static const char *s_le[2] =;
static const char *s_ge[2] =;
static const char *s_open_set[2] =;
static const char *s_close_set[2] =;
static const char *s_open_list[2] =;
static const char *s_close_list[2] =;
static const char *s_such_that[2] =;
static const char *s_open_exists[2] =;
static const char *s_close_exists[2] =;
static const char *s_div_prefix[2] =;
static const char *s_mod[2] =;
static const char *s_param_prefix[2] =;
static const char *s_input_prefix[2] =;
static const char *s_output_prefix[2] =;

static __isl_give isl_printer *print_constraint_polylib(
	struct isl_basic_map *bmap, int ineq, int n, __isl_take isl_printer *p)
{}

static __isl_give isl_printer *print_constraints_polylib(
	struct isl_basic_map *bmap, __isl_take isl_printer *p)
{}

static __isl_give isl_printer *bset_print_constraints_polylib(
	struct isl_basic_set *bset, __isl_take isl_printer *p)
{}

static __isl_give isl_printer *isl_basic_map_print_polylib(
	__isl_keep isl_basic_map *bmap, __isl_take isl_printer *p, int ext)
{}

static __isl_give isl_printer *isl_basic_set_print_polylib(
	__isl_keep isl_basic_set *bset, __isl_take isl_printer *p, int ext)
{}

static __isl_give isl_printer *isl_map_print_polylib(__isl_keep isl_map *map,
	__isl_take isl_printer *p, int ext)
{}

static __isl_give isl_printer *isl_set_print_polylib(__isl_keep isl_set *set,
	__isl_take isl_printer *p, int ext)
{}

static isl_size count_same_name(__isl_keep isl_space *space,
	enum isl_dim_type type, unsigned pos, const char *name)
{}

/* Print the name of the variable of type "type" and position "pos"
 * in "space" to "p".
 */
static __isl_give isl_printer *print_name(__isl_keep isl_space *space,
	__isl_take isl_printer *p, enum isl_dim_type type, unsigned pos,
	int latex)
{}

static isl_stat pos2type(__isl_keep isl_space *space,
	enum isl_dim_type *type, unsigned *pos)
{}

/* Can the div expression of the integer division at position "row" of "div"
 * be printed?
 * In particular, are the div expressions available and does the selected
 * variable have a known explicit representation?
 * Furthermore, the Omega format does not allow any div expressions
 * to be printed.
 */
static isl_bool can_print_div_expr(__isl_keep isl_printer *p,
	__isl_keep isl_mat *div, int pos)
{}

static __isl_give isl_printer *print_div(__isl_keep isl_space *space,
	__isl_keep isl_mat *div, int pos, __isl_take isl_printer *p);

static __isl_give isl_printer *print_term(__isl_keep isl_space *space,
	__isl_keep isl_mat *div,
	isl_int c, unsigned pos, __isl_take isl_printer *p, int latex)
{}

static __isl_give isl_printer *print_affine_of_len(__isl_keep isl_space *space,
	__isl_keep isl_mat *div,
	__isl_take isl_printer *p, isl_int *c, int len)
{}

/* Print an affine expression "c"
 * to "p", with the variable names taken from "space" and
 * the integer division definitions taken from "div".
 */
static __isl_give isl_printer *print_affine(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_mat *div, isl_int *c)
{}

/* offset is the offset of local_space inside data->type of data->space.
 */
static __isl_give isl_printer *print_nested_var_list(__isl_take isl_printer *p,
	__isl_keep isl_space *local_space, enum isl_dim_type local_type,
	struct isl_print_space_data *data, int offset)
{}

static __isl_give isl_printer *print_var_list(__isl_take isl_printer *p,
	__isl_keep isl_space *space, enum isl_dim_type type)
{}

static __isl_give isl_printer *print_nested_map_dim(__isl_take isl_printer *p,
	__isl_keep isl_space *local_dim,
	struct isl_print_space_data *data, int offset);

static __isl_give isl_printer *print_nested_tuple(__isl_take isl_printer *p,
	__isl_keep isl_space *local_space, enum isl_dim_type local_type,
	struct isl_print_space_data *data, int offset)
{}

static __isl_give isl_printer *print_tuple(__isl_keep isl_space *space,
	__isl_take isl_printer *p, enum isl_dim_type type,
	struct isl_print_space_data *data)
{}

static __isl_give isl_printer *print_nested_map_dim(__isl_take isl_printer *p,
	__isl_keep isl_space *local_dim,
	struct isl_print_space_data *data, int offset)
{}

__isl_give isl_printer *isl_print_space(__isl_keep isl_space *space,
	__isl_take isl_printer *p, int rational,
	struct isl_print_space_data *data)
{}

static __isl_give isl_printer *print_omega_parameters(
	__isl_keep isl_space *space, __isl_take isl_printer *p)
{}

/* Does the inequality constraint following "i" in "bmap"
 * have an opposite value for the same last coefficient?
 * "last" is the position of the last coefficient of inequality "i".
 * If the next constraint is a div constraint, then it is ignored
 * since div constraints are not printed.
 */
static isl_bool next_is_opposite(__isl_keep isl_basic_map *bmap, int i,
	int last)
{}

/* Return a string representation of the operator used when
 * printing a constraint where the LHS is greater than or equal to the LHS
 * (sign > 0) or smaller than or equal to the LHS (sign < 0).
 * If "strict" is set, then return the strict version of the comparison
 * operator.
 */
static const char *constraint_op(int sign, int strict, int latex)
{}

/* Print one side of a constraint "c" to "p", with
 * the variable names taken from "space" and the integer division definitions
 * taken from "div".
 * "last" is the position of the last non-zero coefficient.
 * Let c' be the result of zeroing out this coefficient, then
 * the partial constraint
 *
 *	c' op
 *
 * is printed.
 */
static __isl_give isl_printer *print_half_constraint(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_mat *div,
	isl_int *c, int last, const char *op, int latex)
{}

/* Print a constraint "c" to "p", with the variable names
 * taken from "space" and the integer division definitions taken from "div".
 * "last" is the position of the last non-zero coefficient, which is
 * moreover assumed to be negative.
 * Let c' be the result of zeroing out this coefficient, then
 * the constraint is printed in the form
 *
 *	-c[last] op c'
 */
static __isl_give isl_printer *print_constraint(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_mat *div,
	isl_int *c, int last, const char *op, int latex)
{}

/* Given an integer division
 *
 *	floor(f/m)
 *
 * at position "pos" in "div", print the corresponding modulo expression
 *
 *	(f) mod m
 *
 * to "p".  The variable names are taken from "space", while any
 * nested integer division definitions are taken from "div".
 */
static __isl_give isl_printer *print_mod(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_mat *div, int pos,
	int latex)
{}

/* Given an equality constraint with a non-zero coefficient "c"
 * in position "pos", is this term of the form
 *
 *	a m floor(g/m),
 *
 * with c = a m?
 * Return the position of the corresponding integer division if so.
 * Return the number of integer divisions if not.
 * Return isl_size_error on error.
 *
 * Modulo constraints are currently not printed in C format.
 * Other than that, "pos" needs to correspond to an integer division
 * with explicit representation and "c" needs to be a multiple
 * of the denominator of the integer division.
 */
static isl_size print_as_modulo_pos(__isl_keep isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_mat *div, unsigned pos,
	isl_int c)
{}

/* Print equality constraint "c" to "p" as a modulo constraint,
 * with the variable names taken from "space" and
 * the integer division definitions taken from "div".
 * "last" is the position of the last non-zero coefficient, which is
 * moreover assumed to be negative and a multiple of the denominator
 * of the corresponding integer division.  "div_pos" is the corresponding
 * position in the sequence of integer divisions.
 *
 * The equality is of the form
 *
 *	f - a m floor(g/m) = 0.
 *
 * Print it as
 *
 *	a (g mod m) = -f + a g
 */
static __isl_give isl_printer *print_eq_mod_constraint(
	__isl_take isl_printer *p, __isl_keep isl_space *space,
	__isl_keep isl_mat *div, unsigned div_pos,
	isl_int *c, int last, int latex)
{}

/* Print equality constraint "c" to "p", with the variable names
 * taken from "space" and the integer division definitions taken from "div".
 * "last" is the position of the last non-zero coefficient, which is
 * moreover assumed to be negative.
 *
 * If possible, print the equality constraint as a modulo constraint.
 */
static __isl_give isl_printer *print_eq_constraint(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_mat *div, isl_int *c,
	int last, int latex)
{}

/* Print the constraints of "bmap" to "p".
 * The names of the variables are taken from "space" and
 * the integer division definitions are taken from "div".
 * Div constraints are only printed in "dump" mode.
 * The constraints are sorted prior to printing (except in "dump" mode).
 *
 * If x is the last variable with a non-zero coefficient,
 * then a lower bound
 *
 *	f - a x >= 0
 *
 * is printed as
 *
 *	a x <= f
 *
 * while an upper bound
 *
 *	f + a x >= 0
 *
 * is printed as
 *
 *	a x >= -f
 *
 * If the next constraint has an opposite sign for the same last coefficient,
 * then it is printed as
 *
 *	f >= a x
 *
 * or
 *
 *	-f <= a x
 *
 * instead.  In fact, the "a x" part is not printed explicitly, but
 * reused from the next constraint, which is therefore treated as
 * a first constraint in the conjunction.
 *
 * If the constant term of "f" is -1, then "f" is replaced by "f + 1" and
 * the comparison operator is replaced by the strict variant.
 * Essentially, ">= 1" is replaced by "> 0".
 */
static __isl_give isl_printer *print_constraints(__isl_keep isl_basic_map *bmap,
	__isl_keep isl_space *space, __isl_keep isl_mat *div,
	__isl_take isl_printer *p, int latex)
{}

static __isl_give isl_printer *print_div(__isl_keep isl_space *space,
	__isl_keep isl_mat *div, int pos, __isl_take isl_printer *p)
{}

/* Print a comma separated list of div names, except those that have
 * a definition that can be printed.
 * If "print_defined_divs" is set, then those div names are printed
 * as well, along with their definitions.
 */
static __isl_give isl_printer *print_div_list(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_mat *div, int latex,
	int print_defined_divs)
{}

/* Does printing an object with local variables described by "div"
 * require an "exists" clause?
 * That is, are there any local variables without an explicit representation?
 * An exists clause is also needed in "dump" mode because
 * explicit div representations are not printed inline in that case.
 */
static isl_bool need_exists(__isl_keep isl_printer *p, __isl_keep isl_mat *div)
{}

/* Print the start of an exists clause, i.e.,
 *
 *	(exists variables:
 *
 * In dump mode, local variables with an explicit definition are printed
 * as well because they will not be printed inline.
 */
static __isl_give isl_printer *open_exists(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_mat *div, int latex)
{}

/* Remove the explicit representations of all local variables in "div".
 */
static __isl_give isl_mat *mark_all_unknown(__isl_take isl_mat *div)
{}

/* Print the constraints of "bmap" to "p".
 * The names of the variables are taken from "space".
 * "latex" is set if the constraints should be printed in LaTeX format.
 * Do not print inline explicit div representations in "dump" mode.
 */
static __isl_give isl_printer *print_disjunct(__isl_keep isl_basic_map *bmap,
	__isl_keep isl_space *space, __isl_take isl_printer *p, int latex)
{}

/* Print a colon followed by the constraints of "bmap"
 * to "p", provided there are any constraints.
 * The names of the variables are taken from "space".
 * "latex" is set if the constraints should be printed in LaTeX format.
 */
static __isl_give isl_printer *print_optional_disjunct(
	__isl_keep isl_basic_map *bmap, __isl_keep isl_space *space,
	__isl_take isl_printer *p, int latex)
{}

static __isl_give isl_printer *basic_map_print_omega(
	__isl_keep isl_basic_map *bmap, __isl_take isl_printer *p)
{}

static __isl_give isl_printer *basic_set_print_omega(
	__isl_keep isl_basic_set *bset, __isl_take isl_printer *p)
{}

static __isl_give isl_printer *isl_map_print_omega(__isl_keep isl_map *map,
	__isl_take isl_printer *p)
{}

static __isl_give isl_printer *isl_set_print_omega(__isl_keep isl_set *set,
	__isl_take isl_printer *p)
{}

/* Print the list of parameters in "space", followed by an arrow, to "p",
 * if there are any parameters.
 */
static __isl_give isl_printer *print_param_tuple(__isl_take isl_printer *p,
	__isl_keep isl_space *space, struct isl_print_space_data *data)
{}

static __isl_give isl_printer *isl_basic_map_print_isl(
	__isl_keep isl_basic_map *bmap, __isl_take isl_printer *p,
	int latex)
{}

/* Print the disjuncts of a map (or set) "map" to "p".
 * The names of the variables are taken from "space".
 * "latex" is set if the constraints should be printed in LaTeX format.
 */
static __isl_give isl_printer *print_disjuncts_core(__isl_keep isl_map *map,
	__isl_keep isl_space *space, __isl_take isl_printer *p, int latex)
{}

/* Print the disjuncts of a map (or set) "map" to "p".
 * The names of the variables are taken from "space".
 * "hull" describes constraints shared by all disjuncts of "map".
 * "latex" is set if the constraints should be printed in LaTeX format.
 *
 * Print the disjuncts as a conjunction of "hull" and
 * the result of removing the constraints of "hull" from "map".
 * If this result turns out to be the universe, then simply print "hull".
 */
static __isl_give isl_printer *print_disjuncts_in_hull(__isl_keep isl_map *map,
	__isl_keep isl_space *space, __isl_take isl_basic_map *hull,
	__isl_take isl_printer *p, int latex)
{}

/* Print the disjuncts of a map (or set) "map" to "p".
 * The names of the variables are taken from "space".
 * "latex" is set if the constraints should be printed in LaTeX format.
 *
 * If there are at least two disjuncts and "dump" mode is not turned out,
 * check for any shared constraints among all disjuncts.
 * If there are any, then print them separately in print_disjuncts_in_hull.
 */
static __isl_give isl_printer *print_disjuncts(__isl_keep isl_map *map,
	__isl_keep isl_space *space, __isl_take isl_printer *p, int latex)
{}

/* Print the disjuncts of a map (or set).
 * The names of the variables are taken from "space".
 * "latex" is set if the constraints should be printed in LaTeX format.
 *
 * If the map turns out to be a universal parameter domain, then
 * we need to print the colon.  Otherwise, the output looks identical
 * to the empty set.
 */
static __isl_give isl_printer *print_disjuncts_map(__isl_keep isl_map *map,
	__isl_keep isl_space *space, __isl_take isl_printer *p, int latex)
{}

/* Print the disjuncts of a set.
 * The names of the variables are taken from "space".
 * "latex" is set if the constraints should be printed in LaTeX format.
 */
static __isl_give isl_printer *print_disjuncts_set(__isl_keep isl_set *set,
	__isl_keep isl_space *space, __isl_take isl_printer *p, int latex)
{}

struct isl_aff_split {};

static void free_split(__isl_take struct isl_aff_split *split, int n)
{}

static __isl_give isl_basic_map *get_aff(__isl_take isl_basic_map *bmap)
{}

static int aff_split_cmp(const void *p1, const void *p2, void *user)
{}

static __isl_give isl_basic_map *drop_aff(__isl_take isl_basic_map *bmap,
	__isl_keep isl_basic_map *aff)
{}

static __isl_give struct isl_aff_split *split_aff(__isl_keep isl_map *map)
{}

static int defining_equality(__isl_keep isl_basic_map *eq,
	__isl_keep isl_space *space, enum isl_dim_type type, int pos)
{}

/* Print dimension "pos" of data->space to "p".
 *
 * data->user is assumed to be an isl_basic_map keeping track of equalities.
 *
 * If the current dimension is defined by these equalities, then print
 * the corresponding expression, assigned to the name of the dimension
 * if there is any.  Otherwise, print the name of the dimension.
 */
static __isl_give isl_printer *print_dim_eq(__isl_take isl_printer *p,
	struct isl_print_space_data *data, unsigned pos)
{}

static __isl_give isl_printer *print_split_map(__isl_take isl_printer *p,
	struct isl_aff_split *split, int n, __isl_keep isl_space *space)
{}

static __isl_give isl_printer *print_body_map(__isl_take isl_printer *p,
	__isl_keep isl_map *map)
{}

static __isl_give isl_printer *isl_map_print_isl(__isl_keep isl_map *map,
	__isl_take isl_printer *p)
{}

static __isl_give isl_printer *print_latex_map(__isl_keep isl_map *map,
	__isl_take isl_printer *p, __isl_keep isl_basic_map *aff)
{}

static __isl_give isl_printer *isl_map_print_latex(__isl_keep isl_map *map,
	__isl_take isl_printer *p)
{}

__isl_give isl_printer *isl_printer_print_basic_map(__isl_take isl_printer *p,
	__isl_keep isl_basic_map *bmap)
{}

__isl_give isl_printer *isl_printer_print_basic_set(__isl_take isl_printer *p,
	__isl_keep isl_basic_set *bset)
{}

__isl_give isl_printer *isl_printer_print_set(__isl_take isl_printer *p,
	__isl_keep isl_set *set)
{}

__isl_give isl_printer *isl_printer_print_map(__isl_take isl_printer *p,
	__isl_keep isl_map *map)
{}

struct isl_union_print_data {};

#undef BASE
#define BASE
#include "isl_union_print_templ.c"

/* Print the body of "uset" (everything except the parameter declarations)
 * to "p" in isl format.
 */
static __isl_give isl_printer *isl_printer_print_union_set_isl_body(
	__isl_take isl_printer *p, __isl_keep isl_union_set *uset)
{}

static isl_stat print_latex_map_body(__isl_take isl_map *map, void *user)
{}

static __isl_give isl_printer *isl_union_map_print_latex(
	__isl_keep isl_union_map *umap, __isl_take isl_printer *p)
{}

__isl_give isl_printer *isl_printer_print_union_map(__isl_take isl_printer *p,
	__isl_keep isl_union_map *umap)
{}

__isl_give isl_printer *isl_printer_print_union_set(__isl_take isl_printer *p,
	__isl_keep isl_union_set *uset)
{}

static isl_size poly_rec_n_non_zero(__isl_keep isl_poly_rec *rec)
{}

static __isl_give isl_printer *poly_print_cst(__isl_keep isl_poly *poly,
	__isl_take isl_printer *p, int first)
{}

static __isl_give isl_printer *print_base(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_mat *div, int var)
{}

static __isl_give isl_printer *print_pow(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_mat *div, int var, int exp)
{}

/* Print the polynomial "poly" defined over the domain space "space" and
 * local variables defined by "div" to "p".
 */
static __isl_give isl_printer *poly_print(__isl_keep isl_poly *poly,
	__isl_keep isl_space *space, __isl_keep isl_mat *div,
	__isl_take isl_printer *p)
{}

static __isl_give isl_printer *print_qpolynomial(__isl_take isl_printer *p,
	__isl_keep isl_qpolynomial *qp)
{}

static __isl_give isl_printer *print_qpolynomial_isl(__isl_take isl_printer *p,
	__isl_keep isl_qpolynomial *qp)
{}

/* Print the quasi-polynomial "qp" to "p" in C format, with the variable names
 * taken from the domain space "space".
 */
static __isl_give isl_printer *print_qpolynomial_c(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_qpolynomial *qp)
{}

__isl_give isl_printer *isl_printer_print_qpolynomial(
	__isl_take isl_printer *p, __isl_keep isl_qpolynomial *qp)
{}

void isl_qpolynomial_print(__isl_keep isl_qpolynomial *qp, FILE *out,
	unsigned output_format)
{}

static __isl_give isl_printer *qpolynomial_fold_print(
	__isl_keep isl_qpolynomial_fold *fold, __isl_take isl_printer *p)
{}

void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold *fold,
	FILE *out, unsigned output_format)
{}

static __isl_give isl_printer *print_body_pw_qpolynomial(
	__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp)
{}

static __isl_give isl_printer *print_pw_qpolynomial_isl(
	__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp)
{}

void isl_pw_qpolynomial_print(__isl_keep isl_pw_qpolynomial *pwqp, FILE *out,
	unsigned output_format)
{}

static __isl_give isl_printer *print_body_pw_qpolynomial_fold(
	__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf)
{}

static __isl_give isl_printer *print_pw_qpolynomial_fold_isl(
	__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf)
{}

static __isl_give isl_printer *print_ls_affine_c(__isl_take isl_printer *p,
	__isl_keep isl_local_space *ls, isl_int *c);

/* We skip the constraint if it is implied by the div expression.
 *
 * *first indicates whether this is the first constraint in the conjunction and
 * is updated if the constraint is actually printed.
 */
static __isl_give isl_printer *print_constraint_c(__isl_take isl_printer *p,
	__isl_keep isl_local_space *ls, isl_int *c, const char *op, int *first)
{}

static __isl_give isl_printer *print_ls_partial_affine_c(
	__isl_take isl_printer *p, __isl_keep isl_local_space *ls,
	isl_int *c, unsigned len);

static __isl_give isl_printer *print_basic_set_c(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_basic_set *bset)
{}

static __isl_give isl_printer *print_set_c(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_set *set)
{}

/* Print the piecewise quasi-polynomial "pwqp" to "p" in C format.
 */
static __isl_give isl_printer *print_pw_qpolynomial_c(
	__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp)
{}

__isl_give isl_printer *isl_printer_print_pw_qpolynomial(
	__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp)
{}

#undef BASE
#define BASE
#include "isl_union_print_templ.c"

__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial(
	__isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp)
{}

/* Print the quasi-polynomial reduction "fold" to "p" in C format,
 * with the variable names taken from the domain space "space".
 */
static __isl_give isl_printer *print_qpolynomial_fold_c(
	__isl_take isl_printer *p, __isl_keep isl_space *space,
	__isl_keep isl_qpolynomial_fold *fold)
{}

__isl_give isl_printer *isl_printer_print_qpolynomial_fold(
	__isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold)
{}

/* Print the piecewise quasi-polynomial reduction "pwf" to "p" in C format.
 */
static __isl_give isl_printer *print_pw_qpolynomial_fold_c(
	__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf)
{}

__isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold(
	__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf)
{}

void isl_pw_qpolynomial_fold_print(__isl_keep isl_pw_qpolynomial_fold *pwf,
	FILE *out, unsigned output_format)
{}

#undef BASE
#define BASE
#include "isl_union_print_templ.c"

__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold(
	__isl_take isl_printer *p,
	__isl_keep isl_union_pw_qpolynomial_fold *upwf)
{}

/* Print the isl_constraint "c" to "p".
 */
__isl_give isl_printer *isl_printer_print_constraint(__isl_take isl_printer *p,
	__isl_keep isl_constraint *c)
{}

static __isl_give isl_printer *isl_printer_print_space_isl(
	__isl_take isl_printer *p, __isl_keep isl_space *space)
{}

__isl_give isl_printer *isl_printer_print_space(__isl_take isl_printer *p,
	__isl_keep isl_space *space)
{}

__isl_give isl_printer *isl_printer_print_local_space(__isl_take isl_printer *p,
	__isl_keep isl_local_space *ls)
{}

/* Look for the last of the "n" integer divisions that is used in "aff" and
 * that can be printed as a modulo and
 * return the position of this integer division.
 * Return "n" if no such integer division can be found.
 * Return isl_size_error on error.
 *
 * In particular, look for an integer division that appears in "aff"
 * with a coefficient that is a multiple of the denominator
 * of the integer division.
 * That is, check if the numerator of "aff" is of the form
 *
 *	f(...) + a m floor(g/m)
 *
 * and return the position of "floor(g/m)".
 *
 * Note that, unlike print_as_modulo_pos, no check needs to be made
 * for whether the integer division can be printed, since it will
 * need to be printed as an integer division anyway if it is not printed
 * as a modulo.
 */
static isl_size last_modulo(__isl_keep isl_printer *p, __isl_keep isl_aff *aff,
	unsigned n)
{}

/* Print the numerator of the affine expression "aff" to "p",
 * with the variable names taken from "space".
 */
static __isl_give isl_printer *print_aff_num_base(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_aff *aff)
{}

static __isl_give isl_printer *print_aff_num(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_aff *aff);

/* Print the modulo term "c" * ("aff" mod "mod") to "p",
 * with the variable names taken from "space".
 * If "first" is set, then this is the first term of an expression.
 */
static __isl_give isl_printer *print_mod_term(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_aff *aff, int first,
	__isl_take isl_val *c, __isl_keep isl_val *mod)
{}

/* Print the numerator of the affine expression "aff" to "p",
 * with the variable names taken from "space",
 * given that the numerator of "aff" is of the form
 *
 *	f(...) + a m floor(g/m)
 *
 * with "floor(g/m)" the integer division at position "last".
 *
 * First replace "aff" by its numerator and rewrite it as
 *
 *	f(...) + a g - a (g mod m)
 *
 * Recursively write out (the numerator of) "f(...) + a g"
 * (which may involve other modulo expressions) and
 * then write out "- a (g mod m)".
 */
static __isl_give isl_printer *print_aff_num_mod(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_aff *aff, unsigned last)
{}

/* Print the numerator of the affine expression "aff" to "p",
 * with the variable names taken from "space",
 * separating out any (obvious) modulo expressions.
 *
 * In particular, look for modulo expressions in "aff",
 * separating them out if found and simply printing out "aff" otherwise.
 */
static __isl_give isl_printer *print_aff_num(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_aff *aff)
{}

/* Print the (potentially rational) affine expression "aff" to "p",
 * with the variable names taken from "space".
 */
static __isl_give isl_printer *print_aff_body(__isl_take isl_printer *p,
	__isl_keep isl_space *space, __isl_keep isl_aff *aff)
{}

static __isl_give isl_printer *print_body_aff(__isl_take isl_printer *p,
	__isl_keep isl_aff *aff)
{}

static __isl_give isl_printer *print_aff_isl(__isl_take isl_printer *p,
	__isl_keep isl_aff *aff)
{}

#undef BASE
#define BASE
#include "isl_pw_print_templ.c"

static __isl_give isl_printer *print_ls_name_c(__isl_take isl_printer *p,
	__isl_keep isl_local_space *ls, enum isl_dim_type type, unsigned pos)
{}

static __isl_give isl_printer *print_ls_term_c(__isl_take isl_printer *p,
	__isl_keep isl_local_space *ls, isl_int c, unsigned pos)
{}

static __isl_give isl_printer *print_ls_partial_affine_c(
	__isl_take isl_printer *p, __isl_keep isl_local_space *ls,
	isl_int *c, unsigned len)
{}

static __isl_give isl_printer *print_ls_affine_c(__isl_take isl_printer *p,
	__isl_keep isl_local_space *ls, isl_int *c)
{}

static __isl_give isl_printer *print_aff_c(__isl_take isl_printer *p,
	__isl_keep isl_aff *aff)
{}

/* In the C format, we cannot express that "pwaff" may be undefined
 * on parts of the domain space.  We therefore assume that the expression
 * will only be evaluated on its definition domain and compute the gist
 * of each cell with respect to this domain.
 */
static __isl_give isl_printer *print_pw_aff_c(__isl_take isl_printer *p,
	__isl_keep isl_pw_aff *pwaff)
{}

__isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p,
	__isl_keep isl_aff *aff)
{}

__isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p,
	__isl_keep isl_pw_aff *pwaff)
{}

#undef BASE
#define BASE
#include "isl_union_print_templ.c"

/* Print the isl_union_pw_aff "upa" to "p".
 *
 * We currently only support an isl format.
 */
__isl_give isl_printer *isl_printer_print_union_pw_aff(
	__isl_take isl_printer *p, __isl_keep isl_union_pw_aff *upa)
{}

/* Print dimension "pos" of data->space to "p".
 *
 * data->user is assumed to be an isl_multi_aff.
 *
 * If the current dimension is an output dimension, then print
 * the corresponding expression.  Otherwise, print the name of the dimension.
 * Make sure to use the domain space for printing names as
 * that is the space that will be used for printing constraints (if any).
 */
static __isl_give isl_printer *print_dim_ma(__isl_take isl_printer *p,
	struct isl_print_space_data *data, unsigned pos)
{}

static __isl_give isl_printer *print_body_multi_aff(__isl_take isl_printer *p,
	__isl_keep isl_multi_aff *maff)
{}

static __isl_give isl_printer *print_multi_aff_isl(__isl_take isl_printer *p,
	__isl_keep isl_multi_aff *maff)
{}

__isl_give isl_printer *isl_printer_print_multi_aff(__isl_take isl_printer *p,
	__isl_keep isl_multi_aff *maff)
{}

#undef BASE
#define BASE
#include "isl_pw_print_templ.c"

/* Print the unnamed, single-dimensional piecewise multi affine expression "pma"
 * to "p".
 */
static __isl_give isl_printer *print_unnamed_pw_multi_aff_c(
	__isl_take isl_printer *p, __isl_keep isl_pw_multi_aff *pma)
{}

static __isl_give isl_printer *print_pw_multi_aff_c(__isl_take isl_printer *p,
	__isl_keep isl_pw_multi_aff *pma)
{}

__isl_give isl_printer *isl_printer_print_pw_multi_aff(
	__isl_take isl_printer *p, __isl_keep isl_pw_multi_aff *pma)
{}

#undef BASE
#define BASE
#include "isl_union_print_templ.c"

__isl_give isl_printer *isl_printer_print_union_pw_multi_aff(
	__isl_take isl_printer *p, __isl_keep isl_union_pw_multi_aff *upma)
{}

/* Print dimension "pos" of data->space to "p".
 *
 * data->user is assumed to be an isl_multi_pw_aff.
 *
 * If the current dimension is an output dimension, then print
 * the corresponding piecewise affine expression.
 * Otherwise, print the name of the dimension.
 * Make sure to use the same space in both cases.
 * In particular, use the domain space for printing names as
 * that is the space that is used for printing constraints.
 */
static __isl_give isl_printer *print_dim_mpa(__isl_take isl_printer *p,
	struct isl_print_space_data *data, unsigned pos)
{}

/* Print "mpa" to "p" in isl format.
 *
 * If "mpa" is zero-dimensional and has a non-trivial explicit domain,
 * then it is printed after the tuple of affine expressions.
 */
static __isl_give isl_printer *print_multi_pw_aff_isl(__isl_take isl_printer *p,
	__isl_keep isl_multi_pw_aff *mpa)
{}

__isl_give isl_printer *isl_printer_print_multi_pw_aff(
	__isl_take isl_printer *p, __isl_keep isl_multi_pw_aff *mpa)
{}

/* Print dimension "pos" of data->space to "p".
 *
 * data->user is assumed to be an isl_multi_val.
 *
 * If the current dimension is an output dimension, then print
 * the corresponding value.  Otherwise, print the name of the dimension.
 */
static __isl_give isl_printer *print_dim_mv(__isl_take isl_printer *p,
	struct isl_print_space_data *data, unsigned pos)
{}

/* Print the isl_multi_val "mv" to "p" in isl format.
 */
static __isl_give isl_printer *print_multi_val_isl(__isl_take isl_printer *p,
	__isl_keep isl_multi_val *mv)
{}

/* Print the isl_multi_val "mv" to "p".
 *
 * Currently only supported in isl format.
 */
__isl_give isl_printer *isl_printer_print_multi_val(
	__isl_take isl_printer *p, __isl_keep isl_multi_val *mv)
{}

/* Print dimension "pos" of data->space to "p".
 *
 * data->user is assumed to be an isl_multi_id.
 *
 * If the current dimension is an output dimension, then print
 * the corresponding identifier.  Otherwise, print the name of the dimension.
 */
static __isl_give isl_printer *print_dim_mi(__isl_take isl_printer *p,
	struct isl_print_space_data *data, unsigned pos)
{}

/* Print the isl_multi_id "mi" to "p" in isl format.
 */
static __isl_give isl_printer *print_multi_id_isl(__isl_take isl_printer *p,
	__isl_keep isl_multi_id *mi)
{}

/* Print the isl_multi_id "mi" to "p".
 *
 * Currently only supported in isl format.
 */
__isl_give isl_printer *isl_printer_print_multi_id(
	__isl_take isl_printer *p, __isl_keep isl_multi_id *mi)
{}

/* Print dimension "pos" of data->space to "p".
 *
 * data->user is assumed to be an isl_multi_union_pw_aff.
 *
 * The current dimension is necessarily a set dimension, so
 * we print the corresponding isl_union_pw_aff, including
 * the braces.
 */
static __isl_give isl_printer *print_union_pw_aff_dim(__isl_take isl_printer *p,
	struct isl_print_space_data *data, unsigned pos)
{}

/* Print the isl_multi_union_pw_aff "mupa" to "p" in isl format.
 *
 * If "mupa" is zero-dimensional and has a non-trivial explicit domain,
 * then it is printed after the tuple of affine expressions.
 * In order to clarify that this domain belongs to the expression,
 * the tuple along with the domain are placed inside parentheses.
 * If "mupa" has any parameters, then the opening parenthesis
 * appears after the parameter declarations.
 */
static __isl_give isl_printer *print_multi_union_pw_aff_isl(
	__isl_take isl_printer *p, __isl_keep isl_multi_union_pw_aff *mupa)
{}

/* Print the isl_multi_union_pw_aff "mupa" to "p" in isl format.
 *
 * We currently only support an isl format.
 */
__isl_give isl_printer *isl_printer_print_multi_union_pw_aff(
	__isl_take isl_printer *p, __isl_keep isl_multi_union_pw_aff *mupa)
{}