• Home
  • Raw
  • Download

Lines Matching refs:p

64 	struct isl_basic_map *bmap, int ineq, int n, __isl_take isl_printer *p)  in print_constraint_polylib()  argument
73 return isl_printer_free(p); in print_constraint_polylib()
75 p = isl_printer_start_line(p); in print_constraint_polylib()
76 p = isl_printer_print_int(p, ineq); in print_constraint_polylib()
78 p = isl_printer_print_str(p, " "); in print_constraint_polylib()
79 p = isl_printer_print_isl_int(p, c[1+nparam+n_in+i]); in print_constraint_polylib()
82 p = isl_printer_print_str(p, " "); in print_constraint_polylib()
83 p = isl_printer_print_isl_int(p, c[1+nparam+i]); in print_constraint_polylib()
86 p = isl_printer_print_str(p, " "); in print_constraint_polylib()
87 p = isl_printer_print_isl_int(p, c[1+nparam+n_in+n_out+i]); in print_constraint_polylib()
90 p = isl_printer_print_str(p, " "); in print_constraint_polylib()
91 p = isl_printer_print_isl_int(p, c[1+i]); in print_constraint_polylib()
93 p = isl_printer_print_str(p, " "); in print_constraint_polylib()
94 p = isl_printer_print_isl_int(p, c[0]); in print_constraint_polylib()
95 p = isl_printer_end_line(p); in print_constraint_polylib()
96 return p; in print_constraint_polylib()
100 struct isl_basic_map *bmap, __isl_take isl_printer *p) in print_constraints_polylib() argument
104 p = isl_printer_set_isl_int_width(p, 5); in print_constraints_polylib()
107 p = print_constraint_polylib(bmap, 0, i, p); in print_constraints_polylib()
109 p = print_constraint_polylib(bmap, 1, i, p); in print_constraints_polylib()
111 return p; in print_constraints_polylib()
115 struct isl_basic_set *bset, __isl_take isl_printer *p) in bset_print_constraints_polylib() argument
117 return print_constraints_polylib(bset_to_bmap(bset), p); in bset_print_constraints_polylib()
121 __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p, int ext) in isl_basic_map_print_polylib() argument
127 return isl_printer_free(p); in isl_basic_map_print_polylib()
128 p = isl_printer_start_line(p); in isl_basic_map_print_polylib()
129 p = isl_printer_print_int(p, bmap->n_eq + bmap->n_ineq); in isl_basic_map_print_polylib()
130 p = isl_printer_print_str(p, " "); in isl_basic_map_print_polylib()
131 p = isl_printer_print_int(p, 1 + total + 1); in isl_basic_map_print_polylib()
139 return isl_printer_free(p); in isl_basic_map_print_polylib()
141 p = isl_printer_print_str(p, " "); in isl_basic_map_print_polylib()
142 p = isl_printer_print_int(p, n_out); in isl_basic_map_print_polylib()
143 p = isl_printer_print_str(p, " "); in isl_basic_map_print_polylib()
144 p = isl_printer_print_int(p, n_in); in isl_basic_map_print_polylib()
145 p = isl_printer_print_str(p, " "); in isl_basic_map_print_polylib()
146 p = isl_printer_print_int(p, n_div); in isl_basic_map_print_polylib()
147 p = isl_printer_print_str(p, " "); in isl_basic_map_print_polylib()
148 p = isl_printer_print_int(p, nparam); in isl_basic_map_print_polylib()
150 p = isl_printer_end_line(p); in isl_basic_map_print_polylib()
151 return print_constraints_polylib(bmap, p); in isl_basic_map_print_polylib()
155 __isl_keep isl_basic_set *bset, __isl_take isl_printer *p, int ext) in isl_basic_set_print_polylib() argument
157 return isl_basic_map_print_polylib(bset_to_bmap(bset), p, ext); in isl_basic_set_print_polylib()
161 __isl_take isl_printer *p, int ext) in isl_map_print_polylib() argument
165 p = isl_printer_start_line(p); in isl_map_print_polylib()
166 p = isl_printer_print_int(p, map->n); in isl_map_print_polylib()
167 p = isl_printer_end_line(p); in isl_map_print_polylib()
169 p = isl_printer_start_line(p); in isl_map_print_polylib()
170 p = isl_printer_end_line(p); in isl_map_print_polylib()
171 p = isl_basic_map_print_polylib(map->p[i], p, ext); in isl_map_print_polylib()
173 return p; in isl_map_print_polylib()
177 __isl_take isl_printer *p, int ext) in isl_set_print_polylib() argument
179 return isl_map_print_polylib(set_to_map(set), p, ext); in isl_set_print_polylib()
186 int p; in count_same_name() local
194 for (p = 0; p < s; ++p) { in count_same_name()
195 const char *n = isl_space_get_dim_name(space, t, p); in count_same_name()
207 __isl_take isl_printer *p, enum isl_dim_type type, unsigned pos, in print_name() argument
233 return isl_printer_free(p); in print_name()
234 p = isl_printer_print_str(p, name); in print_name()
236 p = isl_printer_print_str(p, "'"); in print_name()
237 return p; in print_name()
274 static isl_bool can_print_div_expr(__isl_keep isl_printer *p, in can_print_div_expr() argument
277 if (p->output_format == ISL_FORMAT_OMEGA) in can_print_div_expr()
285 __isl_keep isl_mat *div, int pos, __isl_take isl_printer *p);
289 isl_int c, unsigned pos, __isl_take isl_printer *p, int latex) in print_term() argument
294 if (!p || !space) in print_term()
295 return isl_printer_free(p); in print_term()
298 return isl_printer_print_isl_int(p, c); in print_term()
301 return isl_printer_free(p); in print_term()
302 print_div_def = type == isl_dim_div && can_print_div_expr(p, div, pos); in print_term()
307 p = isl_printer_print_str(p, "-"); in print_term()
309 p = isl_printer_print_isl_int(p, c); in print_term()
310 if (p->output_format == ISL_FORMAT_C || print_div_def) in print_term()
311 p = isl_printer_print_str(p, "*"); in print_term()
314 p = print_div(space, div, pos, p); in print_term()
316 p = print_name(space, p, type, pos, latex); in print_term()
317 return p; in print_term()
322 __isl_take isl_printer *p, isl_int *c, int len) in print_affine_of_len() argument
335 p = isl_printer_print_str(p, " - "); in print_affine_of_len()
337 p = isl_printer_print_str(p, " + "); in print_affine_of_len()
340 p = print_term(space, div, c[i], i, p, 0); in print_affine_of_len()
345 p = isl_printer_print_str(p, "0"); in print_affine_of_len()
346 return p; in print_affine_of_len()
353 static __isl_give isl_printer *print_affine(__isl_take isl_printer *p, in print_affine() argument
362 return isl_printer_free(p); in print_affine()
364 return print_affine_of_len(space, div, p, c, len); in print_affine()
369 static __isl_give isl_printer *print_nested_var_list(__isl_take isl_printer *p, in print_nested_var_list() argument
381 return isl_printer_free(p); in print_nested_var_list()
384 p = isl_printer_print_str(p, ", "); in print_nested_var_list()
386 p = data->print_dim(p, data, offset + i); in print_nested_var_list()
388 p = print_name(data->space, p, data->type, offset + i, in print_nested_var_list()
391 return p; in print_nested_var_list()
394 static __isl_give isl_printer *print_var_list(__isl_take isl_printer *p, in print_var_list() argument
399 return print_nested_var_list(p, space, type, &data, 0); in print_var_list()
402 static __isl_give isl_printer *print_nested_map_dim(__isl_take isl_printer *p,
406 static __isl_give isl_printer *print_nested_tuple(__isl_take isl_printer *p, in print_nested_tuple() argument
414 return isl_printer_free(p); in print_nested_tuple()
419 p = isl_printer_print_str(p, "\\mathrm{"); in print_nested_tuple()
420 p = isl_printer_print_str(p, name); in print_nested_tuple()
422 p = isl_printer_print_str(p, "}"); in print_nested_tuple()
426 p = isl_printer_print_str(p, s_open_list[data->latex]); in print_nested_tuple()
431 p = print_nested_map_dim(p, in print_nested_tuple()
435 p = print_nested_var_list(p, local_space, local_type, data, in print_nested_tuple()
438 p = isl_printer_print_str(p, s_close_list[data->latex]); in print_nested_tuple()
439 return p; in print_nested_tuple()
443 __isl_take isl_printer *p, enum isl_dim_type type, in print_tuple() argument
448 return print_nested_tuple(p, space, type, data, 0); in print_tuple()
451 static __isl_give isl_printer *print_nested_map_dim(__isl_take isl_printer *p, in print_nested_map_dim() argument
455 p = print_nested_tuple(p, local_dim, isl_dim_in, data, offset); in print_nested_map_dim()
456 p = isl_printer_print_str(p, s_to[data->latex]); in print_nested_map_dim()
457 p = print_nested_tuple(p, local_dim, isl_dim_out, data, offset); in print_nested_map_dim()
459 return p; in print_nested_map_dim()
463 __isl_take isl_printer *p, int rational, in isl_print_space() argument
467 p = isl_printer_print_str(p, "rat: "); in isl_print_space()
471 p = print_tuple(space, p, isl_dim_set, data); in isl_print_space()
473 p = print_tuple(space, p, isl_dim_in, data); in isl_print_space()
474 p = isl_printer_print_str(p, s_to[data->latex]); in isl_print_space()
475 p = print_tuple(space, p, isl_dim_out, data); in isl_print_space()
478 return p; in isl_print_space()
482 __isl_keep isl_space *space, __isl_take isl_printer *p) in print_omega_parameters() argument
487 return isl_printer_free(p); in print_omega_parameters()
489 return p; in print_omega_parameters()
491 p = isl_printer_start_line(p); in print_omega_parameters()
492 p = isl_printer_print_str(p, "symbolic "); in print_omega_parameters()
493 p = print_var_list(p, space, isl_dim_param); in print_omega_parameters()
494 p = isl_printer_print_str(p, ";"); in print_omega_parameters()
495 p = isl_printer_end_line(p); in print_omega_parameters()
496 return p; in print_omega_parameters()
559 static __isl_give isl_printer *print_half_constraint(__isl_take isl_printer *p, in print_half_constraint() argument
564 p = print_affine(p, space, div, c); in print_half_constraint()
566 p = isl_printer_print_str(p, " "); in print_half_constraint()
567 p = isl_printer_print_str(p, op); in print_half_constraint()
568 p = isl_printer_print_str(p, " "); in print_half_constraint()
570 return p; in print_half_constraint()
582 static __isl_give isl_printer *print_constraint(__isl_take isl_printer *p, in print_constraint() argument
588 p = print_term(space, div, c[last], last, p, latex); in print_constraint()
590 p = isl_printer_print_str(p, " "); in print_constraint()
591 p = isl_printer_print_str(p, op); in print_constraint()
592 p = isl_printer_print_str(p, " "); in print_constraint()
595 p = print_affine(p, space, div, c); in print_constraint()
597 return p; in print_constraint()
611 static __isl_give isl_printer *print_mod(__isl_take isl_printer *p, in print_mod() argument
615 if (!p || !div) in print_mod()
616 return isl_printer_free(p); in print_mod()
618 p = isl_printer_print_str(p, "("); in print_mod()
619 p = print_affine_of_len(space, div, p, in print_mod()
621 p = isl_printer_print_str(p, ") "); in print_mod()
622 p = isl_printer_print_str(p, s_mod[latex]); in print_mod()
623 p = isl_printer_print_str(p, " "); in print_mod()
624 p = isl_printer_print_isl_int(p, div->row[pos][0]); in print_mod()
625 return p; in print_mod()
643 static isl_size print_as_modulo_pos(__isl_keep isl_printer *p, in print_as_modulo_pos() argument
652 if (!p || !space || n_div < 0) in print_as_modulo_pos()
654 if (p->output_format == ISL_FORMAT_C) in print_as_modulo_pos()
660 can_print = can_print_div_expr(p, div, pos); in print_as_modulo_pos()
687 __isl_take isl_printer *p, __isl_keep isl_space *space, in print_eq_mod_constraint() argument
694 ctx = isl_printer_get_ctx(p); in print_eq_mod_constraint()
699 p = isl_printer_print_isl_int(p, c[last]); in print_eq_mod_constraint()
700 p = isl_printer_print_str(p, "*("); in print_eq_mod_constraint()
702 p = print_mod(p, space, div, div_pos, latex); in print_eq_mod_constraint()
704 p = isl_printer_print_str(p, ")"); in print_eq_mod_constraint()
705 p = isl_printer_print_str(p, " = "); in print_eq_mod_constraint()
709 p = print_affine(p, space, div, c); in print_eq_mod_constraint()
710 return p; in print_eq_mod_constraint()
720 static __isl_give isl_printer *print_eq_constraint(__isl_take isl_printer *p, in print_eq_constraint() argument
728 div_pos = print_as_modulo_pos(p, space, div, last, c[last]); in print_eq_constraint()
730 return isl_printer_free(p); in print_eq_constraint()
732 return print_eq_mod_constraint(p, space, div, div_pos, in print_eq_constraint()
734 return print_constraint(p, space, div, c, last, "=", latex); in print_eq_constraint()
779 __isl_take isl_printer *p, int latex) in print_constraints() argument
789 if (total < 0 || !p) in print_constraints()
790 return isl_printer_free(p); in print_constraints()
792 dump = p->dump; in print_constraints()
806 p = isl_printer_print_str(p, s_and[latex]); in print_constraints()
807 p = isl_printer_print_str(p, "0 = 0"); in print_constraints()
811 p = isl_printer_print_str(p, s_and[latex]); in print_constraints()
816 p = print_eq_constraint(p, space, div, c->el, l, latex); in print_constraints()
828 can_print_div_expr(p, div, l - o_div)) { in print_constraints()
838 p = isl_printer_print_str(p, s_and[latex]); in print_constraints()
852 p = print_half_constraint(p, space, div, c->el, l, in print_constraints()
857 p = print_constraint(p, space, div, c->el, l, in print_constraints()
866 return p; in print_constraints()
870 isl_printer_free(p); in print_constraints()
875 __isl_keep isl_mat *div, int pos, __isl_take isl_printer *p) in print_div() argument
879 if (!p || !div) in print_div()
880 return isl_printer_free(p); in print_div()
882 c = p->output_format == ISL_FORMAT_C; in print_div()
883 p = isl_printer_print_str(p, c ? "floord(" : "floor(("); in print_div()
884 p = print_affine_of_len(space, div, p, in print_div()
886 p = isl_printer_print_str(p, c ? ", " : ")/"); in print_div()
887 p = isl_printer_print_isl_int(p, div->row[pos][0]); in print_div()
888 p = isl_printer_print_str(p, ")"); in print_div()
889 return p; in print_div()
897 static __isl_give isl_printer *print_div_list(__isl_take isl_printer *p, in print_div_list() argument
906 if (!p || !space || n_div < 0) in print_div_list()
907 return isl_printer_free(p); in print_div_list()
910 if (!print_defined_divs && can_print_div_expr(p, div, i)) in print_div_list()
913 p = isl_printer_print_str(p, ", "); in print_div_list()
914 p = print_name(space, p, isl_dim_div, i, latex); in print_div_list()
916 if (!can_print_div_expr(p, div, i)) in print_div_list()
918 p = isl_printer_print_str(p, " = "); in print_div_list()
919 p = print_div(space, div, i, p); in print_div_list()
922 return p; in print_div_list()
931 static isl_bool need_exists(__isl_keep isl_printer *p, __isl_keep isl_mat *div) in need_exists() argument
937 if (!p || n < 0) in need_exists()
941 if (p->dump) in need_exists()
944 if (!can_print_div_expr(p, div, i)) in need_exists()
956 static __isl_give isl_printer *open_exists(__isl_take isl_printer *p, in open_exists() argument
961 if (!p) in open_exists()
964 dump = p->dump; in open_exists()
965 p = isl_printer_print_str(p, s_open_exists[latex]); in open_exists()
966 p = print_div_list(p, space, div, latex, dump); in open_exists()
967 p = isl_printer_print_str(p, ": "); in open_exists()
969 return p; in open_exists()
994 __isl_keep isl_space *space, __isl_take isl_printer *p, int latex) in print_disjunct() argument
1000 if (!p) in print_disjunct()
1002 dump = p->dump; in print_disjunct()
1004 exists = need_exists(p, div); in print_disjunct()
1006 p = open_exists(p, space, div, latex); in print_disjunct()
1010 p = print_constraints(bmap, space, div, p, latex); in print_disjunct()
1014 p = isl_printer_print_str(p, s_close_exists[latex]); in print_disjunct()
1015 return p; in print_disjunct()
1025 __isl_take isl_printer *p, int latex) in print_optional_disjunct() argument
1028 return p; in print_optional_disjunct()
1030 p = isl_printer_print_str(p, ": "); in print_optional_disjunct()
1031 p = print_disjunct(bmap, space, p, latex); in print_optional_disjunct()
1033 return p; in print_optional_disjunct()
1037 __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p) in basic_map_print_omega() argument
1039 p = isl_printer_print_str(p, "{ ["); in basic_map_print_omega()
1040 p = print_var_list(p, bmap->dim, isl_dim_in); in basic_map_print_omega()
1041 p = isl_printer_print_str(p, "] -> ["); in basic_map_print_omega()
1042 p = print_var_list(p, bmap->dim, isl_dim_out); in basic_map_print_omega()
1043 p = isl_printer_print_str(p, "] "); in basic_map_print_omega()
1044 p = print_optional_disjunct(bmap, bmap->dim, p, 0); in basic_map_print_omega()
1045 p = isl_printer_print_str(p, " }"); in basic_map_print_omega()
1046 return p; in basic_map_print_omega()
1050 __isl_keep isl_basic_set *bset, __isl_take isl_printer *p) in basic_set_print_omega() argument
1052 p = isl_printer_print_str(p, "{ ["); in basic_set_print_omega()
1053 p = print_var_list(p, bset->dim, isl_dim_set); in basic_set_print_omega()
1054 p = isl_printer_print_str(p, "] "); in basic_set_print_omega()
1055 p = print_optional_disjunct(bset, bset->dim, p, 0); in basic_set_print_omega()
1056 p = isl_printer_print_str(p, " }"); in basic_set_print_omega()
1057 return p; in basic_set_print_omega()
1061 __isl_take isl_printer *p) in isl_map_print_omega() argument
1067 p = isl_printer_print_str(p, " union "); in isl_map_print_omega()
1068 p = basic_map_print_omega(map->p[i], p); in isl_map_print_omega()
1070 return p; in isl_map_print_omega()
1074 __isl_take isl_printer *p) in isl_set_print_omega() argument
1080 p = isl_printer_print_str(p, " union "); in isl_set_print_omega()
1081 p = basic_set_print_omega(set->p[i], p); in isl_set_print_omega()
1083 return p; in isl_set_print_omega()
1089 static __isl_give isl_printer *print_param_tuple(__isl_take isl_printer *p, in print_param_tuple() argument
1095 if (!p || nparam < 0) in print_param_tuple()
1096 return isl_printer_free(p); in print_param_tuple()
1098 return p; in print_param_tuple()
1100 p = print_tuple(space, p, isl_dim_param, data); in print_param_tuple()
1101 p = isl_printer_print_str(p, s_to[data->latex]); in print_param_tuple()
1103 return p; in print_param_tuple()
1107 __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p, in isl_basic_map_print_isl() argument
1113 p = print_param_tuple(p, bmap->dim, &data); in isl_basic_map_print_isl()
1114 p = isl_printer_print_str(p, "{ "); in isl_basic_map_print_isl()
1115 p = isl_print_space(bmap->dim, p, rational, &data); in isl_basic_map_print_isl()
1116 p = isl_printer_print_str(p, " : "); in isl_basic_map_print_isl()
1117 p = print_disjunct(bmap, bmap->dim, p, latex); in isl_basic_map_print_isl()
1118 p = isl_printer_print_str(p, " }"); in isl_basic_map_print_isl()
1119 return p; in isl_basic_map_print_isl()
1127 __isl_keep isl_space *space, __isl_take isl_printer *p, int latex) in print_disjuncts_core() argument
1132 p = isl_printer_print_str(p, "false"); in print_disjuncts_core()
1135 p = isl_printer_print_str(p, s_or[latex]); in print_disjuncts_core()
1136 if (map->n > 1 && map->p[i]->n_eq + map->p[i]->n_ineq > 1) in print_disjuncts_core()
1137 p = isl_printer_print_str(p, "("); in print_disjuncts_core()
1138 p = print_disjunct(map->p[i], space, p, latex); in print_disjuncts_core()
1139 if (map->n > 1 && map->p[i]->n_eq + map->p[i]->n_ineq > 1) in print_disjuncts_core()
1140 p = isl_printer_print_str(p, ")"); in print_disjuncts_core()
1142 return p; in print_disjuncts_core()
1156 __isl_take isl_printer *p, int latex) in print_disjuncts_in_hull() argument
1160 p = print_disjunct(hull, space, p, latex); in print_disjuncts_in_hull()
1166 p = isl_printer_print_str(p, s_and[latex]); in print_disjuncts_in_hull()
1167 p = isl_printer_print_str(p, "("); in print_disjuncts_in_hull()
1168 p = print_disjuncts_core(map, space, p, latex); in print_disjuncts_in_hull()
1169 p = isl_printer_print_str(p, ")"); in print_disjuncts_in_hull()
1173 return p; in print_disjuncts_in_hull()
1176 isl_printer_free(p); in print_disjuncts_in_hull()
1189 __isl_keep isl_space *space, __isl_take isl_printer *p, int latex) in print_disjuncts() argument
1192 return p; in print_disjuncts()
1194 p = isl_printer_print_str(p, s_such_that[latex]); in print_disjuncts()
1195 if (!p) in print_disjuncts()
1198 if (!p->dump && map->n >= 2) { in print_disjuncts()
1205 p = isl_printer_free(p); in print_disjuncts()
1208 p, latex); in print_disjuncts()
1212 return print_disjuncts_core(map, space, p, latex); in print_disjuncts()
1224 __isl_keep isl_space *space, __isl_take isl_printer *p, int latex) in print_disjuncts_map() argument
1227 return isl_printer_print_str(p, s_such_that[latex]); in print_disjuncts_map()
1229 return print_disjuncts(map, space, p, latex); in print_disjuncts_map()
1237 __isl_keep isl_space *space, __isl_take isl_printer *p, int latex) in print_disjuncts_set() argument
1239 return print_disjuncts_map(set_to_map(set), space, p, latex); in print_disjuncts_set()
1349 split[i].aff = get_aff(isl_basic_map_copy(map->p[i])); in split_aff()
1350 bmap = isl_basic_map_copy(map->p[i]); in split_aff()
1414 static __isl_give isl_printer *print_dim_eq(__isl_take isl_printer *p, in print_dim_eq() argument
1423 p = print_name(data->space, p, data->type, pos, in print_dim_eq()
1425 p = isl_printer_print_str(p, " = "); in print_dim_eq()
1428 p = print_affine_of_len(data->space, NULL, p, eq->eq[j], pos); in print_dim_eq()
1430 p = print_name(data->space, p, data->type, pos, data->latex); in print_dim_eq()
1433 return p; in print_dim_eq()
1436 static __isl_give isl_printer *print_split_map(__isl_take isl_printer *p, in print_split_map() argument
1448 ISL_F_ISSET(split[i].map->p[0], ISL_BASIC_MAP_RATIONAL); in print_split_map()
1450 p = isl_printer_print_str(p, "; "); in print_split_map()
1452 p = isl_print_space(space, p, rational, &data); in print_split_map()
1453 p = print_disjuncts_map(split[i].map, space, p, 0); in print_split_map()
1456 return p; in print_split_map()
1460 __isl_take isl_printer *p) in isl_map_print_isl_body() argument
1466 if (!p || !map) in isl_map_print_isl_body()
1467 return isl_printer_free(p); in isl_map_print_isl_body()
1468 if (!p->dump && map->n > 0) in isl_map_print_isl_body()
1471 p = print_split_map(p, split, map->n, map->dim); in isl_map_print_isl_body()
1474 ISL_F_ISSET(map->p[0], ISL_BASIC_MAP_RATIONAL); in isl_map_print_isl_body()
1475 p = isl_print_space(map->dim, p, rational, &data); in isl_map_print_isl_body()
1476 p = print_disjuncts_map(map, map->dim, p, 0); in isl_map_print_isl_body()
1479 return p; in isl_map_print_isl_body()
1483 __isl_take isl_printer *p) in isl_map_print_isl() argument
1487 p = print_param_tuple(p, map->dim, &data); in isl_map_print_isl()
1488 p = isl_printer_print_str(p, s_open_set[0]); in isl_map_print_isl()
1489 p = isl_map_print_isl_body(map, p); in isl_map_print_isl()
1490 p = isl_printer_print_str(p, s_close_set[0]); in isl_map_print_isl()
1491 return p; in isl_map_print_isl()
1495 __isl_take isl_printer *p, __isl_keep isl_basic_map *aff) in print_latex_map() argument
1500 p = print_param_tuple(p, map->dim, &data); in print_latex_map()
1501 p = isl_printer_print_str(p, s_open_set[1]); in print_latex_map()
1504 p = isl_print_space(map->dim, p, 0, &data); in print_latex_map()
1505 p = print_disjuncts_map(map, map->dim, p, 1); in print_latex_map()
1506 p = isl_printer_print_str(p, s_close_set[1]); in print_latex_map()
1508 return p; in print_latex_map()
1512 __isl_take isl_printer *p) in isl_map_print_latex() argument
1521 return print_latex_map(map, p, NULL); in isl_map_print_latex()
1527 p = isl_printer_print_str(p, " \\cup "); in isl_map_print_latex()
1528 p = print_latex_map(split[i].map, p, split[i].aff); in isl_map_print_latex()
1532 return p; in isl_map_print_latex()
1535 __isl_give isl_printer *isl_printer_print_basic_map(__isl_take isl_printer *p, in isl_printer_print_basic_map() argument
1538 if (!p || !bmap) in isl_printer_print_basic_map()
1540 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_basic_map()
1541 return isl_basic_map_print_isl(bmap, p, 0); in isl_printer_print_basic_map()
1542 else if (p->output_format == ISL_FORMAT_OMEGA) in isl_printer_print_basic_map()
1543 return basic_map_print_omega(bmap, p); in isl_printer_print_basic_map()
1546 isl_printer_free(p); in isl_printer_print_basic_map()
1550 __isl_give isl_printer *isl_printer_print_basic_set(__isl_take isl_printer *p, in isl_printer_print_basic_set() argument
1553 if (!p || !bset) in isl_printer_print_basic_set()
1556 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_basic_set()
1557 return isl_basic_map_print_isl(bset, p, 0); in isl_printer_print_basic_set()
1558 else if (p->output_format == ISL_FORMAT_POLYLIB) in isl_printer_print_basic_set()
1559 return isl_basic_set_print_polylib(bset, p, 0); in isl_printer_print_basic_set()
1560 else if (p->output_format == ISL_FORMAT_EXT_POLYLIB) in isl_printer_print_basic_set()
1561 return isl_basic_set_print_polylib(bset, p, 1); in isl_printer_print_basic_set()
1562 else if (p->output_format == ISL_FORMAT_POLYLIB_CONSTRAINTS) in isl_printer_print_basic_set()
1563 return bset_print_constraints_polylib(bset, p); in isl_printer_print_basic_set()
1564 else if (p->output_format == ISL_FORMAT_OMEGA) in isl_printer_print_basic_set()
1565 return basic_set_print_omega(bset, p); in isl_printer_print_basic_set()
1566 isl_assert(p->ctx, 0, goto error); in isl_printer_print_basic_set()
1568 isl_printer_free(p); in isl_printer_print_basic_set()
1572 __isl_give isl_printer *isl_printer_print_set(__isl_take isl_printer *p, in isl_printer_print_set() argument
1575 if (!p || !set) in isl_printer_print_set()
1577 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_set()
1578 return isl_map_print_isl(set_to_map(set), p); in isl_printer_print_set()
1579 else if (p->output_format == ISL_FORMAT_POLYLIB) in isl_printer_print_set()
1580 return isl_set_print_polylib(set, p, 0); in isl_printer_print_set()
1581 else if (p->output_format == ISL_FORMAT_EXT_POLYLIB) in isl_printer_print_set()
1582 return isl_set_print_polylib(set, p, 1); in isl_printer_print_set()
1583 else if (p->output_format == ISL_FORMAT_OMEGA) in isl_printer_print_set()
1584 return isl_set_print_omega(set, p); in isl_printer_print_set()
1585 else if (p->output_format == ISL_FORMAT_LATEX) in isl_printer_print_set()
1586 return isl_map_print_latex(set_to_map(set), p); in isl_printer_print_set()
1589 isl_printer_free(p); in isl_printer_print_set()
1593 __isl_give isl_printer *isl_printer_print_map(__isl_take isl_printer *p, in isl_printer_print_map() argument
1596 if (!p || !map) in isl_printer_print_map()
1599 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_map()
1600 return isl_map_print_isl(map, p); in isl_printer_print_map()
1601 else if (p->output_format == ISL_FORMAT_POLYLIB) in isl_printer_print_map()
1602 return isl_map_print_polylib(map, p, 0); in isl_printer_print_map()
1603 else if (p->output_format == ISL_FORMAT_EXT_POLYLIB) in isl_printer_print_map()
1604 return isl_map_print_polylib(map, p, 1); in isl_printer_print_map()
1605 else if (p->output_format == ISL_FORMAT_OMEGA) in isl_printer_print_map()
1606 return isl_map_print_omega(map, p); in isl_printer_print_map()
1607 else if (p->output_format == ISL_FORMAT_LATEX) in isl_printer_print_map()
1608 return isl_map_print_latex(map, p); in isl_printer_print_map()
1611 isl_printer_free(p); in isl_printer_print_map()
1616 isl_printer *p; member
1626 data->p = isl_printer_print_str(data->p, "; "); in print_map_body()
1629 data->p = isl_map_print_isl_body(map, data->p); in print_map_body()
1639 __isl_take isl_printer *p, __isl_keep isl_union_map *umap) in isl_printer_print_union_map_isl_body() argument
1643 p = isl_printer_print_str(p, s_open_set[0]); in isl_printer_print_union_map_isl_body()
1644 data.p = p; in isl_printer_print_union_map_isl_body()
1647 p = data.p; in isl_printer_print_union_map_isl_body()
1648 p = isl_printer_print_str(p, s_close_set[0]); in isl_printer_print_union_map_isl_body()
1649 return p; in isl_printer_print_union_map_isl_body()
1656 __isl_take isl_printer *p, __isl_keep isl_union_set *uset) in isl_printer_print_union_set_isl_body() argument
1658 return isl_printer_print_union_map_isl_body(p, uset_to_umap(uset)); in isl_printer_print_union_set_isl_body()
1664 __isl_keep isl_union_map *umap, __isl_take isl_printer *p) in isl_union_map_print_isl() argument
1670 p = print_param_tuple(p, space, &space_data); in isl_union_map_print_isl()
1673 p = isl_printer_print_union_map_isl_body(p, umap); in isl_union_map_print_isl()
1675 return p; in isl_union_map_print_isl()
1684 data->p = isl_printer_print_str(data->p, " \\cup "); in print_latex_map_body()
1687 data->p = isl_map_print_latex(map, data->p); in print_latex_map_body()
1694 __isl_keep isl_union_map *umap, __isl_take isl_printer *p) in isl_union_map_print_latex() argument
1696 struct isl_union_print_data data = { p, 1 }; in isl_union_map_print_latex()
1698 p = data.p; in isl_union_map_print_latex()
1699 return p; in isl_union_map_print_latex()
1702 __isl_give isl_printer *isl_printer_print_union_map(__isl_take isl_printer *p, in isl_printer_print_union_map() argument
1705 if (!p || !umap) in isl_printer_print_union_map()
1708 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_union_map()
1709 return isl_union_map_print_isl(umap, p); in isl_printer_print_union_map()
1710 if (p->output_format == ISL_FORMAT_LATEX) in isl_printer_print_union_map()
1711 return isl_union_map_print_latex(umap, p); in isl_printer_print_union_map()
1713 isl_die(p->ctx, isl_error_invalid, in isl_printer_print_union_map()
1716 isl_printer_free(p); in isl_printer_print_union_map()
1720 __isl_give isl_printer *isl_printer_print_union_set(__isl_take isl_printer *p, in isl_printer_print_union_set() argument
1723 if (!p || !uset) in isl_printer_print_union_set()
1726 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_union_set()
1727 return isl_union_map_print_isl(uset_to_umap(uset), p); in isl_printer_print_union_set()
1728 if (p->output_format == ISL_FORMAT_LATEX) in isl_printer_print_union_set()
1729 return isl_union_map_print_latex(uset_to_umap(uset), p); in isl_printer_print_union_set()
1731 isl_die(p->ctx, isl_error_invalid, in isl_printer_print_union_set()
1734 isl_printer_free(p); in isl_printer_print_union_set()
1747 isl_bool is_zero = isl_poly_is_zero(rec->p[i]); in poly_rec_n_non_zero()
1759 __isl_take isl_printer *p, int first) in poly_print_cst() argument
1769 p = isl_printer_print_str(p, neg ? " - " : " + "); in poly_print_cst()
1774 p = isl_printer_print_str(p, sgn < 0 ? "-infty" : in poly_print_cst()
1777 p = isl_printer_print_isl_int(p, cst->n); in poly_print_cst()
1781 p = isl_printer_print_str(p, "/"); in poly_print_cst()
1782 p = isl_printer_print_isl_int(p, cst->d); in poly_print_cst()
1784 return p; in poly_print_cst()
1786 isl_printer_free(p); in poly_print_cst()
1790 static __isl_give isl_printer *print_base(__isl_take isl_printer *p, in print_base() argument
1797 return isl_printer_free(p); in print_base()
1799 p = print_term(space, NULL, space->ctx->one, 1 + var, p, 0); in print_base()
1801 p = print_div(space, div, var - total, p); in print_base()
1802 return p; in print_base()
1805 static __isl_give isl_printer *print_pow(__isl_take isl_printer *p, in print_pow() argument
1808 p = print_base(p, space, div, var); in print_pow()
1810 return p; in print_pow()
1811 if (p->output_format == ISL_FORMAT_C) { in print_pow()
1814 p = isl_printer_print_str(p, "*"); in print_pow()
1815 p = print_base(p, space, div, var); in print_pow()
1818 p = isl_printer_print_str(p, "^"); in print_pow()
1819 p = isl_printer_print_int(p, exp); in print_pow()
1821 return p; in print_pow()
1829 __isl_take isl_printer *p) in poly_print() argument
1837 if (!p || is_cst < 0 || !space || !div) in poly_print()
1841 return poly_print_cst(poly, p, 1); in poly_print()
1846 return isl_printer_free(p); in poly_print()
1849 p = isl_printer_print_str(p, "("); in poly_print()
1851 isl_bool is_zero = isl_poly_is_zero(rec->p[i]); in poly_print()
1852 isl_bool is_one = isl_poly_is_one(rec->p[i]); in poly_print()
1853 isl_bool is_negone = isl_poly_is_negone(rec->p[i]); in poly_print()
1854 isl_bool is_cst = isl_poly_is_cst(rec->p[i]); in poly_print()
1857 return isl_printer_free(p); in poly_print()
1862 p = isl_printer_print_str(p, "-1"); in poly_print()
1864 p = isl_printer_print_str(p, "-"); in poly_print()
1866 p = isl_printer_print_str(p, " - "); in poly_print()
1868 p = poly_print_cst(rec->p[i], p, first); in poly_print()
1871 p = isl_printer_print_str(p, " + "); in poly_print()
1873 p = poly_print(rec->p[i], space, div, p); in poly_print()
1879 p = isl_printer_print_str(p, " * "); in poly_print()
1880 p = print_pow(p, space, div, rec->poly.var, i); in poly_print()
1883 p = isl_printer_print_str(p, ")"); in poly_print()
1884 return p; in poly_print()
1886 isl_printer_free(p); in poly_print()
1890 static __isl_give isl_printer *print_qpolynomial(__isl_take isl_printer *p, in print_qpolynomial() argument
1893 if (!p || !qp) in print_qpolynomial()
1895 p = poly_print(qp->poly, qp->dim, qp->div, p); in print_qpolynomial()
1896 return p; in print_qpolynomial()
1898 isl_printer_free(p); in print_qpolynomial()
1902 static __isl_give isl_printer *print_qpolynomial_isl(__isl_take isl_printer *p, in print_qpolynomial_isl() argument
1907 if (!p || !qp) in print_qpolynomial_isl()
1910 p = print_param_tuple(p, qp->dim, &data); in print_qpolynomial_isl()
1911 p = isl_printer_print_str(p, "{ "); in print_qpolynomial_isl()
1913 p = isl_print_space(qp->dim, p, 0, &data); in print_qpolynomial_isl()
1914 p = isl_printer_print_str(p, " -> "); in print_qpolynomial_isl()
1916 p = print_qpolynomial(p, qp); in print_qpolynomial_isl()
1917 p = isl_printer_print_str(p, " }"); in print_qpolynomial_isl()
1918 return p; in print_qpolynomial_isl()
1920 isl_printer_free(p); in print_qpolynomial_isl()
1927 static __isl_give isl_printer *print_qpolynomial_c(__isl_take isl_printer *p, in print_qpolynomial_c() argument
1938 p = isl_printer_free(p); in print_qpolynomial_c()
1940 p = isl_printer_print_str(p, "("); in print_qpolynomial_c()
1942 p = poly_print(qp->poly, space, qp->div, p); in print_qpolynomial_c()
1944 p = isl_printer_free(p); in print_qpolynomial_c()
1946 p = isl_printer_print_str(p, ")/"); in print_qpolynomial_c()
1947 p = isl_printer_print_val(p, den); in print_qpolynomial_c()
1951 return p; in print_qpolynomial_c()
1955 __isl_take isl_printer *p, __isl_keep isl_qpolynomial *qp) in isl_printer_print_qpolynomial() argument
1957 if (!p || !qp) in isl_printer_print_qpolynomial()
1960 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_qpolynomial()
1961 return print_qpolynomial_isl(p, qp); in isl_printer_print_qpolynomial()
1962 else if (p->output_format == ISL_FORMAT_C) in isl_printer_print_qpolynomial()
1963 return print_qpolynomial_c(p, qp->dim, qp); in isl_printer_print_qpolynomial()
1969 isl_printer_free(p); in isl_printer_print_qpolynomial()
1976 isl_printer *p; in isl_qpolynomial_print() local
1982 p = isl_printer_to_file(qp->dim->ctx, out); in isl_qpolynomial_print()
1983 p = isl_printer_print_qpolynomial(p, qp); in isl_qpolynomial_print()
1984 isl_printer_free(p); in isl_qpolynomial_print()
1988 __isl_keep isl_qpolynomial_fold *fold, __isl_take isl_printer *p) in qpolynomial_fold_print() argument
1993 p = isl_printer_print_str(p, "min"); in qpolynomial_fold_print()
1995 p = isl_printer_print_str(p, "max"); in qpolynomial_fold_print()
1996 p = isl_printer_print_str(p, "("); in qpolynomial_fold_print()
1999 p = isl_printer_print_str(p, ", "); in qpolynomial_fold_print()
2000 p = print_qpolynomial(p, fold->qp[i]); in qpolynomial_fold_print()
2002 p = isl_printer_print_str(p, ")"); in qpolynomial_fold_print()
2003 return p; in qpolynomial_fold_print()
2009 isl_printer *p; in isl_qpolynomial_fold_print() local
2016 p = isl_printer_to_file(fold->dim->ctx, out); in isl_qpolynomial_fold_print()
2017 p = isl_printer_print_qpolynomial_fold(p, fold); in isl_qpolynomial_fold_print()
2019 isl_printer_free(p); in isl_qpolynomial_fold_print()
2023 __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) in isl_pwqp_print_isl_body() argument
2032 p = isl_printer_print_str(p, "; "); in isl_pwqp_print_isl_body()
2033 space = isl_qpolynomial_get_domain_space(pwqp->p[i].qp); in isl_pwqp_print_isl_body()
2035 p = isl_print_space(space, p, 0, &data); in isl_pwqp_print_isl_body()
2036 p = isl_printer_print_str(p, " -> "); in isl_pwqp_print_isl_body()
2038 p = print_qpolynomial(p, pwqp->p[i].qp); in isl_pwqp_print_isl_body()
2039 p = print_disjuncts(set_to_map(pwqp->p[i].set), space, p, 0); in isl_pwqp_print_isl_body()
2043 return p; in isl_pwqp_print_isl_body()
2047 __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) in print_pw_qpolynomial_isl() argument
2051 if (!p || !pwqp) in print_pw_qpolynomial_isl()
2054 p = print_param_tuple(p, pwqp->dim, &data); in print_pw_qpolynomial_isl()
2055 p = isl_printer_print_str(p, "{ "); in print_pw_qpolynomial_isl()
2058 p = print_tuple(pwqp->dim, p, isl_dim_in, &data); in print_pw_qpolynomial_isl()
2059 p = isl_printer_print_str(p, " -> "); in print_pw_qpolynomial_isl()
2061 p = isl_printer_print_str(p, "0"); in print_pw_qpolynomial_isl()
2063 p = isl_pwqp_print_isl_body(p, pwqp); in print_pw_qpolynomial_isl()
2064 p = isl_printer_print_str(p, " }"); in print_pw_qpolynomial_isl()
2065 return p; in print_pw_qpolynomial_isl()
2067 isl_printer_free(p); in print_pw_qpolynomial_isl()
2074 isl_printer *p; in isl_pw_qpolynomial_print() local
2079 p = isl_printer_to_file(pwqp->dim->ctx, out); in isl_pw_qpolynomial_print()
2080 p = isl_printer_set_output_format(p, output_format); in isl_pw_qpolynomial_print()
2081 p = isl_printer_print_pw_qpolynomial(p, pwqp); in isl_pw_qpolynomial_print()
2083 isl_printer_free(p); in isl_pw_qpolynomial_print()
2087 __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) in isl_pwf_print_isl_body() argument
2096 p = isl_printer_print_str(p, "; "); in isl_pwf_print_isl_body()
2097 space = isl_qpolynomial_fold_get_domain_space(pwf->p[i].fold); in isl_pwf_print_isl_body()
2099 p = isl_print_space(space, p, 0, &data); in isl_pwf_print_isl_body()
2100 p = isl_printer_print_str(p, " -> "); in isl_pwf_print_isl_body()
2102 p = qpolynomial_fold_print(pwf->p[i].fold, p); in isl_pwf_print_isl_body()
2103 p = print_disjuncts(set_to_map(pwf->p[i].set), space, p, 0); in isl_pwf_print_isl_body()
2107 return p; in isl_pwf_print_isl_body()
2111 __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) in print_pw_qpolynomial_fold_isl() argument
2115 p = print_param_tuple(p, pwf->dim, &data); in print_pw_qpolynomial_fold_isl()
2116 p = isl_printer_print_str(p, "{ "); in print_pw_qpolynomial_fold_isl()
2119 p = print_tuple(pwf->dim, p, isl_dim_in, &data); in print_pw_qpolynomial_fold_isl()
2120 p = isl_printer_print_str(p, " -> "); in print_pw_qpolynomial_fold_isl()
2122 p = isl_printer_print_str(p, "0"); in print_pw_qpolynomial_fold_isl()
2124 p = isl_pwf_print_isl_body(p, pwf); in print_pw_qpolynomial_fold_isl()
2125 p = isl_printer_print_str(p, " }"); in print_pw_qpolynomial_fold_isl()
2126 return p; in print_pw_qpolynomial_fold_isl()
2129 static __isl_give isl_printer *print_ls_affine_c(__isl_take isl_printer *p,
2137 static __isl_give isl_printer *print_constraint_c(__isl_take isl_printer *p, in print_constraint_c() argument
2147 return isl_printer_free(p); in print_constraint_c()
2152 return isl_printer_free(p); in print_constraint_c()
2154 return p; in print_constraint_c()
2158 p = isl_printer_print_str(p, " && "); in print_constraint_c()
2160 p = print_ls_affine_c(p, ls, c); in print_constraint_c()
2161 p = isl_printer_print_str(p, " "); in print_constraint_c()
2162 p = isl_printer_print_str(p, op); in print_constraint_c()
2163 p = isl_printer_print_str(p, " 0"); in print_constraint_c()
2167 return p; in print_constraint_c()
2171 __isl_take isl_printer *p, __isl_keep isl_local_space *ls,
2174 static __isl_give isl_printer *print_basic_set_c(__isl_take isl_printer *p, in print_basic_set_c() argument
2185 return isl_printer_free(p); in print_basic_set_c()
2193 p = print_constraint_c(p, ls, in print_basic_set_c()
2197 p = isl_printer_print_str(p, " && "); in print_basic_set_c()
2198 p = isl_printer_print_str(p, "("); in print_basic_set_c()
2199 p = print_ls_partial_affine_c(p, ls, bset->eq[i], in print_basic_set_c()
2201 p = isl_printer_print_str(p, ") % "); in print_basic_set_c()
2202 p = isl_printer_print_isl_int(p, in print_basic_set_c()
2204 p = isl_printer_print_str(p, " == 0"); in print_basic_set_c()
2209 p = print_constraint_c(p, ls, bset->ineq[i], ">=", &first); in print_basic_set_c()
2211 return p; in print_basic_set_c()
2214 static __isl_give isl_printer *print_set_c(__isl_take isl_printer *p, in print_set_c() argument
2220 return isl_printer_free(p); in print_set_c()
2223 p = isl_printer_print_str(p, "0"); in print_set_c()
2227 p = isl_printer_print_str(p, " || "); in print_set_c()
2229 p = isl_printer_print_str(p, "("); in print_set_c()
2230 p = print_basic_set_c(p, space, set->p[i]); in print_set_c()
2232 p = isl_printer_print_str(p, ")"); in print_set_c()
2234 return p; in print_set_c()
2240 __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) in print_pw_qpolynomial_c() argument
2246 if (pwqp->n == 1 && isl_set_plain_is_universe(pwqp->p[0].set)) { in print_pw_qpolynomial_c()
2247 p = print_qpolynomial_c(p, space, pwqp->p[0].qp); in print_pw_qpolynomial_c()
2249 return p; in print_pw_qpolynomial_c()
2253 p = isl_printer_print_str(p, "("); in print_pw_qpolynomial_c()
2254 p = print_set_c(p, space, pwqp->p[i].set); in print_pw_qpolynomial_c()
2255 p = isl_printer_print_str(p, ") ? ("); in print_pw_qpolynomial_c()
2256 p = print_qpolynomial_c(p, space, pwqp->p[i].qp); in print_pw_qpolynomial_c()
2257 p = isl_printer_print_str(p, ") : "); in print_pw_qpolynomial_c()
2261 p = isl_printer_print_str(p, "0"); in print_pw_qpolynomial_c()
2262 return p; in print_pw_qpolynomial_c()
2266 __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) in isl_printer_print_pw_qpolynomial() argument
2268 if (!p || !pwqp) in isl_printer_print_pw_qpolynomial()
2271 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_pw_qpolynomial()
2272 return print_pw_qpolynomial_isl(p, pwqp); in isl_printer_print_pw_qpolynomial()
2273 else if (p->output_format == ISL_FORMAT_C) in isl_printer_print_pw_qpolynomial()
2274 return print_pw_qpolynomial_c(p, pwqp); in isl_printer_print_pw_qpolynomial()
2275 isl_assert(p->ctx, 0, goto error); in isl_printer_print_pw_qpolynomial()
2277 isl_printer_free(p); in isl_printer_print_pw_qpolynomial()
2287 data->p = isl_printer_print_str(data->p, "; "); in print_pwqp_body()
2290 data->p = isl_pwqp_print_isl_body(data->p, pwqp); in print_pwqp_body()
2297 __isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp) in print_union_pw_qpolynomial_isl() argument
2304 p = print_param_tuple(p, space, &space_data); in print_union_pw_qpolynomial_isl()
2306 p = isl_printer_print_str(p, "{ "); in print_union_pw_qpolynomial_isl()
2307 data.p = p; in print_union_pw_qpolynomial_isl()
2311 p = data.p; in print_union_pw_qpolynomial_isl()
2312 p = isl_printer_print_str(p, " }"); in print_union_pw_qpolynomial_isl()
2313 return p; in print_union_pw_qpolynomial_isl()
2317 __isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp) in isl_printer_print_union_pw_qpolynomial() argument
2319 if (!p || !upwqp) in isl_printer_print_union_pw_qpolynomial()
2322 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_union_pw_qpolynomial()
2323 return print_union_pw_qpolynomial_isl(p, upwqp); in isl_printer_print_union_pw_qpolynomial()
2324 isl_die(p->ctx, isl_error_invalid, in isl_printer_print_union_pw_qpolynomial()
2328 isl_printer_free(p); in isl_printer_print_union_pw_qpolynomial()
2336 __isl_take isl_printer *p, __isl_keep isl_space *space, in print_qpolynomial_fold_c() argument
2343 p = isl_printer_print_str(p, "min("); in print_qpolynomial_fold_c()
2345 p = isl_printer_print_str(p, "max("); in print_qpolynomial_fold_c()
2349 p = isl_printer_print_str(p, ", "); in print_qpolynomial_fold_c()
2350 p = print_qpolynomial_c(p, space, fold->qp[i]); in print_qpolynomial_fold_c()
2352 p = isl_printer_print_str(p, ")"); in print_qpolynomial_fold_c()
2354 return p; in print_qpolynomial_fold_c()
2358 __isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold) in isl_printer_print_qpolynomial_fold() argument
2360 if (!p || !fold) in isl_printer_print_qpolynomial_fold()
2362 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_qpolynomial_fold()
2363 return qpolynomial_fold_print(fold, p); in isl_printer_print_qpolynomial_fold()
2364 else if (p->output_format == ISL_FORMAT_C) in isl_printer_print_qpolynomial_fold()
2365 return print_qpolynomial_fold_c(p, fold->dim, fold); in isl_printer_print_qpolynomial_fold()
2366 isl_die(p->ctx, isl_error_unsupported, "unsupported output format", in isl_printer_print_qpolynomial_fold()
2369 isl_printer_free(p); in isl_printer_print_qpolynomial_fold()
2376 __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) in print_pw_qpolynomial_fold_c() argument
2382 if (pwf->n == 1 && isl_set_plain_is_universe(pwf->p[0].set)) { in print_pw_qpolynomial_fold_c()
2383 p = print_qpolynomial_fold_c(p, space, pwf->p[0].fold); in print_pw_qpolynomial_fold_c()
2385 return p; in print_pw_qpolynomial_fold_c()
2389 p = isl_printer_print_str(p, "("); in print_pw_qpolynomial_fold_c()
2390 p = print_set_c(p, space, pwf->p[i].set); in print_pw_qpolynomial_fold_c()
2391 p = isl_printer_print_str(p, ") ? ("); in print_pw_qpolynomial_fold_c()
2392 p = print_qpolynomial_fold_c(p, space, pwf->p[i].fold); in print_pw_qpolynomial_fold_c()
2393 p = isl_printer_print_str(p, ") : "); in print_pw_qpolynomial_fold_c()
2397 p = isl_printer_print_str(p, "0"); in print_pw_qpolynomial_fold_c()
2398 return p; in print_pw_qpolynomial_fold_c()
2402 __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) in isl_printer_print_pw_qpolynomial_fold() argument
2404 if (!p || !pwf) in isl_printer_print_pw_qpolynomial_fold()
2407 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_pw_qpolynomial_fold()
2408 return print_pw_qpolynomial_fold_isl(p, pwf); in isl_printer_print_pw_qpolynomial_fold()
2409 else if (p->output_format == ISL_FORMAT_C) in isl_printer_print_pw_qpolynomial_fold()
2410 return print_pw_qpolynomial_fold_c(p, pwf); in isl_printer_print_pw_qpolynomial_fold()
2411 isl_assert(p->ctx, 0, goto error); in isl_printer_print_pw_qpolynomial_fold()
2413 isl_printer_free(p); in isl_printer_print_pw_qpolynomial_fold()
2420 isl_printer *p; in isl_pw_qpolynomial_fold_print() local
2425 p = isl_printer_to_file(pwf->dim->ctx, out); in isl_pw_qpolynomial_fold_print()
2426 p = isl_printer_set_output_format(p, output_format); in isl_pw_qpolynomial_fold_print()
2427 p = isl_printer_print_pw_qpolynomial_fold(p, pwf); in isl_pw_qpolynomial_fold_print()
2429 isl_printer_free(p); in isl_pw_qpolynomial_fold_print()
2439 data->p = isl_printer_print_str(data->p, "; "); in print_pwf_body()
2442 data->p = isl_pwf_print_isl_body(data->p, pwf); in print_pwf_body()
2449 __isl_take isl_printer *p, in print_union_pw_qpolynomial_fold_isl() argument
2457 p = print_param_tuple(p, space, &space_data); in print_union_pw_qpolynomial_fold_isl()
2459 p = isl_printer_print_str(p, "{ "); in print_union_pw_qpolynomial_fold_isl()
2460 data.p = p; in print_union_pw_qpolynomial_fold_isl()
2464 p = data.p; in print_union_pw_qpolynomial_fold_isl()
2465 p = isl_printer_print_str(p, " }"); in print_union_pw_qpolynomial_fold_isl()
2466 return p; in print_union_pw_qpolynomial_fold_isl()
2470 __isl_take isl_printer *p, in isl_printer_print_union_pw_qpolynomial_fold() argument
2473 if (!p || !upwf) in isl_printer_print_union_pw_qpolynomial_fold()
2476 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_union_pw_qpolynomial_fold()
2477 return print_union_pw_qpolynomial_fold_isl(p, upwf); in isl_printer_print_union_pw_qpolynomial_fold()
2478 isl_die(p->ctx, isl_error_invalid, in isl_printer_print_union_pw_qpolynomial_fold()
2482 isl_printer_free(p); in isl_printer_print_union_pw_qpolynomial_fold()
2488 __isl_give isl_printer *isl_printer_print_constraint(__isl_take isl_printer *p, in isl_printer_print_constraint() argument
2496 if (!p || !c) in isl_printer_print_constraint()
2501 return isl_printer_free(p); in isl_printer_print_constraint()
2503 p = print_param_tuple(p, space, &data); in isl_printer_print_constraint()
2504 p = isl_printer_print_str(p, "{ "); in isl_printer_print_constraint()
2505 p = isl_print_space(space, p, 0, &data); in isl_printer_print_constraint()
2506 p = isl_printer_print_str(p, " : "); in isl_printer_print_constraint()
2507 exists = need_exists(p, ls->div); in isl_printer_print_constraint()
2509 p = isl_printer_free(p); in isl_printer_print_constraint()
2511 p = open_exists(p, space, ls->div, 0); in isl_printer_print_constraint()
2512 p = print_affine_of_len(space, ls->div, p, c->v->el, c->v->size); in isl_printer_print_constraint()
2514 p = isl_printer_print_str(p, " = 0"); in isl_printer_print_constraint()
2516 p = isl_printer_print_str(p, " >= 0"); in isl_printer_print_constraint()
2518 p = isl_printer_print_str(p, s_close_exists[0]); in isl_printer_print_constraint()
2519 p = isl_printer_print_str(p, " }"); in isl_printer_print_constraint()
2523 return p; in isl_printer_print_constraint()
2525 isl_printer_free(p); in isl_printer_print_constraint()
2530 __isl_take isl_printer *p, __isl_keep isl_space *space) in isl_printer_print_space_isl() argument
2537 p = print_param_tuple(p, space, &data); in isl_printer_print_space_isl()
2539 p = isl_printer_print_str(p, "{ "); in isl_printer_print_space_isl()
2541 p = isl_printer_print_str(p, s_such_that[0]); in isl_printer_print_space_isl()
2543 p = isl_print_space(space, p, 0, &data); in isl_printer_print_space_isl()
2544 p = isl_printer_print_str(p, " }"); in isl_printer_print_space_isl()
2546 return p; in isl_printer_print_space_isl()
2548 isl_printer_free(p); in isl_printer_print_space_isl()
2552 __isl_give isl_printer *isl_printer_print_space(__isl_take isl_printer *p, in isl_printer_print_space() argument
2555 if (!p || !space) in isl_printer_print_space()
2556 return isl_printer_free(p); in isl_printer_print_space()
2557 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_space()
2558 return isl_printer_print_space_isl(p, space); in isl_printer_print_space()
2559 else if (p->output_format == ISL_FORMAT_OMEGA) in isl_printer_print_space()
2560 return print_omega_parameters(space, p); in isl_printer_print_space()
2564 return isl_printer_free(p)); in isl_printer_print_space()
2567 __isl_give isl_printer *isl_printer_print_local_space(__isl_take isl_printer *p, in isl_printer_print_local_space() argument
2577 p = print_param_tuple(p, ls->dim, &data); in isl_printer_print_local_space()
2578 p = isl_printer_print_str(p, "{ "); in isl_printer_print_local_space()
2579 p = isl_print_space(ls->dim, p, 0, &data); in isl_printer_print_local_space()
2581 p = isl_printer_print_str(p, " : "); in isl_printer_print_local_space()
2582 p = isl_printer_print_str(p, s_open_exists[0]); in isl_printer_print_local_space()
2583 p = print_div_list(p, ls->dim, ls->div, 0, 1); in isl_printer_print_local_space()
2584 p = isl_printer_print_str(p, s_close_exists[0]); in isl_printer_print_local_space()
2586 p = isl_printer_print_str(p, s_such_that[0]); in isl_printer_print_local_space()
2587 p = isl_printer_print_str(p, " }"); in isl_printer_print_local_space()
2588 return p; in isl_printer_print_local_space()
2590 isl_printer_free(p); in isl_printer_print_local_space()
2614 static isl_size last_modulo(__isl_keep isl_printer *p, __isl_keep isl_aff *aff, in last_modulo() argument
2639 static __isl_give isl_printer *print_aff_num_base(__isl_take isl_printer *p, in print_aff_num_base() argument
2646 return isl_printer_free(p); in print_aff_num_base()
2647 p = print_affine_of_len(space, aff->ls->div, p, in print_aff_num_base()
2650 return p; in print_aff_num_base()
2653 static __isl_give isl_printer *print_aff_num(__isl_take isl_printer *p,
2660 static __isl_give isl_printer *print_mod_term(__isl_take isl_printer *p, in print_mod_term() argument
2668 p = isl_printer_free(p); in print_mod_term()
2672 p = isl_printer_print_str(p, is_neg ? " - " : " + "); in print_mod_term()
2676 p = isl_printer_free(p); in print_mod_term()
2678 p = isl_printer_print_val(p, c); in print_mod_term()
2679 p = isl_printer_print_str(p, "*("); in print_mod_term()
2681 p = isl_printer_print_str(p, "("); in print_mod_term()
2682 p = print_aff_num(p, space, aff); in print_mod_term()
2683 p = isl_printer_print_str(p, ")"); in print_mod_term()
2684 p = isl_printer_print_str(p, " mod "); in print_mod_term()
2685 p = isl_printer_print_val(p, mod); in print_mod_term()
2687 p = isl_printer_print_str(p, ")"); in print_mod_term()
2691 return p; in print_mod_term()
2710 static __isl_give isl_printer *print_aff_num_mod(__isl_take isl_printer *p, in print_aff_num_mod() argument
2730 p = isl_printer_free(p); in print_aff_num_mod()
2733 p = print_aff_num(p, space, aff); in print_aff_num_mod()
2735 p = print_mod_term(p, space, div, is_zero, isl_val_copy(a), m); in print_aff_num_mod()
2743 return p; in print_aff_num_mod()
2753 static __isl_give isl_printer *print_aff_num(__isl_take isl_printer *p, in print_aff_num() argument
2760 return isl_printer_free(p); in print_aff_num()
2761 mod = last_modulo(p, aff, n_div); in print_aff_num()
2763 return isl_printer_free(p); in print_aff_num()
2765 return print_aff_num_mod(p, space, aff, mod); in print_aff_num()
2767 return print_aff_num_base(p, space, aff); in print_aff_num()
2773 static __isl_give isl_printer *print_aff_body(__isl_take isl_printer *p, in print_aff_body() argument
2777 return isl_printer_print_str(p, "NaN"); in print_aff_body()
2779 p = isl_printer_print_str(p, "("); in print_aff_body()
2780 p = print_aff_num(p, space, aff); in print_aff_body()
2782 p = isl_printer_print_str(p, ")"); in print_aff_body()
2784 p = isl_printer_print_str(p, ")/"); in print_aff_body()
2785 p = isl_printer_print_isl_int(p, aff->v->el[0]); in print_aff_body()
2788 return p; in print_aff_body()
2791 static __isl_give isl_printer *print_aff(__isl_take isl_printer *p, in print_aff() argument
2799 p = print_tuple(aff->ls->dim, p, isl_dim_set, &data); in print_aff()
2800 p = isl_printer_print_str(p, " -> "); in print_aff()
2802 p = isl_printer_print_str(p, "["); in print_aff()
2803 p = print_aff_body(p, aff->ls->dim, aff); in print_aff()
2804 p = isl_printer_print_str(p, "]"); in print_aff()
2806 return p; in print_aff()
2809 static __isl_give isl_printer *print_aff_isl(__isl_take isl_printer *p, in print_aff_isl() argument
2817 p = print_param_tuple(p, aff->ls->dim, &data); in print_aff_isl()
2818 p = isl_printer_print_str(p, "{ "); in print_aff_isl()
2819 p = print_aff(p, aff); in print_aff_isl()
2820 p = isl_printer_print_str(p, " }"); in print_aff_isl()
2821 return p; in print_aff_isl()
2823 isl_printer_free(p); in print_aff_isl()
2831 __isl_take isl_printer *p, __isl_keep isl_pw_aff *pa) in print_pw_aff_body() argument
2836 return isl_printer_free(p); in print_pw_aff_body()
2842 p = isl_printer_print_str(p, "; "); in print_pw_aff_body()
2843 p = print_aff(p, pa->p[i].aff); in print_pw_aff_body()
2844 space = isl_aff_get_domain_space(pa->p[i].aff); in print_pw_aff_body()
2845 p = print_disjuncts(set_to_map(pa->p[i].set), space, p, 0); in print_pw_aff_body()
2849 return p; in print_pw_aff_body()
2852 static __isl_give isl_printer *print_pw_aff_isl(__isl_take isl_printer *p, in print_pw_aff_isl() argument
2860 p = print_param_tuple(p, pwaff->dim, &data); in print_pw_aff_isl()
2861 p = isl_printer_print_str(p, "{ "); in print_pw_aff_isl()
2862 p = print_pw_aff_body(p, pwaff); in print_pw_aff_isl()
2863 p = isl_printer_print_str(p, " }"); in print_pw_aff_isl()
2864 return p; in print_pw_aff_isl()
2866 isl_printer_free(p); in print_pw_aff_isl()
2870 static __isl_give isl_printer *print_ls_name_c(__isl_take isl_printer *p, in print_ls_name_c() argument
2874 p = isl_printer_print_str(p, "floord("); in print_ls_name_c()
2875 p = print_ls_affine_c(p, ls, ls->div->row[pos] + 1); in print_ls_name_c()
2876 p = isl_printer_print_str(p, ", "); in print_ls_name_c()
2877 p = isl_printer_print_isl_int(p, ls->div->row[pos][0]); in print_ls_name_c()
2878 p = isl_printer_print_str(p, ")"); in print_ls_name_c()
2885 p = isl_printer_print_str(p, name); in print_ls_name_c()
2887 return p; in print_ls_name_c()
2890 static __isl_give isl_printer *print_ls_term_c(__isl_take isl_printer *p, in print_ls_term_c() argument
2895 if (!p || !ls) in print_ls_term_c()
2896 return isl_printer_free(p); in print_ls_term_c()
2899 return isl_printer_print_isl_int(p, c); in print_ls_term_c()
2904 p = isl_printer_print_str(p, "-"); in print_ls_term_c()
2906 p = isl_printer_print_isl_int(p, c); in print_ls_term_c()
2907 p = isl_printer_print_str(p, "*"); in print_ls_term_c()
2910 return isl_printer_free(p); in print_ls_term_c()
2911 p = print_ls_name_c(p, ls, type, pos); in print_ls_term_c()
2912 return p; in print_ls_term_c()
2916 __isl_take isl_printer *p, __isl_keep isl_local_space *ls, in print_ls_partial_affine_c() argument
2930 p = isl_printer_print_str(p, " - "); in print_ls_partial_affine_c()
2932 p = isl_printer_print_str(p, " + "); in print_ls_partial_affine_c()
2935 p = print_ls_term_c(p, ls, c[i], i); in print_ls_partial_affine_c()
2940 p = isl_printer_print_str(p, "0"); in print_ls_partial_affine_c()
2941 return p; in print_ls_partial_affine_c()
2944 static __isl_give isl_printer *print_ls_affine_c(__isl_take isl_printer *p, in print_ls_affine_c() argument
2950 return isl_printer_free(p); in print_ls_affine_c()
2951 return print_ls_partial_affine_c(p, ls, c, 1 + total); in print_ls_affine_c()
2954 static __isl_give isl_printer *print_aff_c(__isl_take isl_printer *p, in print_aff_c() argument
2961 return isl_printer_free(p); in print_aff_c()
2963 p = isl_printer_print_str(p, "("); in print_aff_c()
2964 p = print_ls_partial_affine_c(p, aff->ls, aff->v->el + 1, 1 + total); in print_aff_c()
2966 p = isl_printer_print_str(p, ")/"); in print_aff_c()
2967 p = isl_printer_print_isl_int(p, aff->v->el[0]); in print_aff_c()
2969 return p; in print_aff_c()
2977 static __isl_give isl_printer *print_pw_aff_c(__isl_take isl_printer *p, in print_pw_aff_c() argument
2985 isl_die(p->ctx, isl_error_unsupported, in print_pw_aff_c()
2987 return isl_printer_free(p)); in print_pw_aff_c()
2992 p = isl_printer_print_ast_expr(p, expr); in print_pw_aff_c()
2996 return p; in print_pw_aff_c()
2999 __isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p, in isl_printer_print_aff() argument
3002 if (!p || !aff) in isl_printer_print_aff()
3005 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_aff()
3006 return print_aff_isl(p, aff); in isl_printer_print_aff()
3007 else if (p->output_format == ISL_FORMAT_C) in isl_printer_print_aff()
3008 return print_aff_c(p, aff); in isl_printer_print_aff()
3009 isl_die(p->ctx, isl_error_unsupported, "unsupported output format", in isl_printer_print_aff()
3012 isl_printer_free(p); in isl_printer_print_aff()
3016 __isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p, in isl_printer_print_pw_aff() argument
3019 if (!p || !pwaff) in isl_printer_print_pw_aff()
3022 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_pw_aff()
3023 return print_pw_aff_isl(p, pwaff); in isl_printer_print_pw_aff()
3024 else if (p->output_format == ISL_FORMAT_C) in isl_printer_print_pw_aff()
3025 return print_pw_aff_c(p, pwaff); in isl_printer_print_pw_aff()
3026 isl_die(p->ctx, isl_error_unsupported, "unsupported output format", in isl_printer_print_pw_aff()
3029 isl_printer_free(p); in isl_printer_print_pw_aff()
3046 data->p = isl_printer_print_str(data->p, "; "); in print_pw_aff_body_wrap()
3049 data->p = print_pw_aff_body(data->p, pa); in print_pw_aff_body_wrap()
3052 return data->p ? isl_stat_ok : isl_stat_error; in print_pw_aff_body_wrap()
3060 __isl_take isl_printer *p, __isl_keep isl_union_pw_aff *upa) in print_union_pw_aff_body() argument
3062 struct isl_union_print_data data = { p, 1 }; in print_union_pw_aff_body()
3064 p = isl_printer_print_str(p, s_open_set[0]); in print_union_pw_aff_body()
3065 data.p = p; in print_union_pw_aff_body()
3068 data.p = isl_printer_free(data.p); in print_union_pw_aff_body()
3069 p = data.p; in print_union_pw_aff_body()
3070 p = isl_printer_print_str(p, s_close_set[0]); in print_union_pw_aff_body()
3072 return p; in print_union_pw_aff_body()
3080 __isl_take isl_printer *p, __isl_keep isl_union_pw_aff *upa) in print_union_pw_aff_isl() argument
3086 p = print_param_tuple(p, space, &data); in print_union_pw_aff_isl()
3088 p = print_union_pw_aff_body(p, upa); in print_union_pw_aff_isl()
3089 return p; in print_union_pw_aff_isl()
3097 __isl_take isl_printer *p, __isl_keep isl_union_pw_aff *upa) in isl_printer_print_union_pw_aff() argument
3099 if (!p || !upa) in isl_printer_print_union_pw_aff()
3100 return isl_printer_free(p); in isl_printer_print_union_pw_aff()
3102 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_union_pw_aff()
3103 return print_union_pw_aff_isl(p, upa); in isl_printer_print_union_pw_aff()
3104 isl_die(isl_printer_get_ctx(p), isl_error_unsupported, in isl_printer_print_union_pw_aff()
3105 "unsupported output format", return isl_printer_free(p)); in isl_printer_print_union_pw_aff()
3117 static __isl_give isl_printer *print_dim_ma(__isl_take isl_printer *p, in print_dim_ma() argument
3125 p = print_aff_body(p, space, ma->u.p[pos]); in print_dim_ma()
3131 p = print_name(space, p, type, pos, data->latex); in print_dim_ma()
3135 return p; in print_dim_ma()
3138 static __isl_give isl_printer *print_multi_aff(__isl_take isl_printer *p, in print_multi_aff() argument
3145 return isl_print_space(maff->space, p, 0, &data); in print_multi_aff()
3148 static __isl_give isl_printer *print_multi_aff_isl(__isl_take isl_printer *p, in print_multi_aff_isl() argument
3156 p = print_param_tuple(p, maff->space, &data); in print_multi_aff_isl()
3157 p = isl_printer_print_str(p, "{ "); in print_multi_aff_isl()
3158 p = print_multi_aff(p, maff); in print_multi_aff_isl()
3159 p = isl_printer_print_str(p, " }"); in print_multi_aff_isl()
3160 return p; in print_multi_aff_isl()
3162 isl_printer_free(p); in print_multi_aff_isl()
3166 __isl_give isl_printer *isl_printer_print_multi_aff(__isl_take isl_printer *p, in isl_printer_print_multi_aff() argument
3169 if (!p || !maff) in isl_printer_print_multi_aff()
3172 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_multi_aff()
3173 return print_multi_aff_isl(p, maff); in isl_printer_print_multi_aff()
3174 isl_die(p->ctx, isl_error_unsupported, "unsupported output format", in isl_printer_print_multi_aff()
3177 isl_printer_free(p); in isl_printer_print_multi_aff()
3182 __isl_take isl_printer *p, __isl_keep isl_pw_multi_aff *pma) in print_pw_multi_aff_body() argument
3193 p = isl_printer_print_str(p, "; "); in print_pw_multi_aff_body()
3194 p = print_multi_aff(p, pma->p[i].maff); in print_pw_multi_aff_body()
3195 space = isl_multi_aff_get_domain_space(pma->p[i].maff); in print_pw_multi_aff_body()
3196 p = print_disjuncts(set_to_map(pma->p[i].set), space, p, 0); in print_pw_multi_aff_body()
3199 return p; in print_pw_multi_aff_body()
3201 isl_printer_free(p); in print_pw_multi_aff_body()
3205 static __isl_give isl_printer *print_pw_multi_aff_isl(__isl_take isl_printer *p, in print_pw_multi_aff_isl() argument
3213 p = print_param_tuple(p, pma->dim, &data); in print_pw_multi_aff_isl()
3214 p = isl_printer_print_str(p, "{ "); in print_pw_multi_aff_isl()
3215 p = print_pw_multi_aff_body(p, pma); in print_pw_multi_aff_isl()
3216 p = isl_printer_print_str(p, " }"); in print_pw_multi_aff_isl()
3217 return p; in print_pw_multi_aff_isl()
3219 isl_printer_free(p); in print_pw_multi_aff_isl()
3227 __isl_take isl_printer *p, __isl_keep isl_pw_multi_aff *pma) in print_unnamed_pw_multi_aff_c() argument
3234 p = isl_printer_print_str(p, "("); in print_unnamed_pw_multi_aff_c()
3235 p = print_set_c(p, space, pma->p[i].set); in print_unnamed_pw_multi_aff_c()
3236 p = isl_printer_print_str(p, ") ? ("); in print_unnamed_pw_multi_aff_c()
3237 p = print_aff_c(p, pma->p[i].maff->u.p[0]); in print_unnamed_pw_multi_aff_c()
3238 p = isl_printer_print_str(p, ") : "); in print_unnamed_pw_multi_aff_c()
3242 return print_aff_c(p, pma->p[pma->n - 1].maff->u.p[0]); in print_unnamed_pw_multi_aff_c()
3245 static __isl_give isl_printer *print_pw_multi_aff_c(__isl_take isl_printer *p, in print_pw_multi_aff_c() argument
3254 isl_die(p->ctx, isl_error_unsupported, in print_pw_multi_aff_c()
3259 return isl_printer_free(p); in print_pw_multi_aff_c()
3262 return print_unnamed_pw_multi_aff_c(p, pma); in print_pw_multi_aff_c()
3264 isl_die(p->ctx, isl_error_unsupported, in print_pw_multi_aff_c()
3268 p = isl_printer_print_str(p, name); in print_pw_multi_aff_c()
3270 isl_die(p->ctx, isl_error_unsupported, in print_pw_multi_aff_c()
3273 return p; in print_pw_multi_aff_c()
3275 isl_printer_free(p); in print_pw_multi_aff_c()
3280 __isl_take isl_printer *p, __isl_keep isl_pw_multi_aff *pma) in isl_printer_print_pw_multi_aff() argument
3282 if (!p || !pma) in isl_printer_print_pw_multi_aff()
3285 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_pw_multi_aff()
3286 return print_pw_multi_aff_isl(p, pma); in isl_printer_print_pw_multi_aff()
3287 if (p->output_format == ISL_FORMAT_C) in isl_printer_print_pw_multi_aff()
3288 return print_pw_multi_aff_c(p, pma); in isl_printer_print_pw_multi_aff()
3289 isl_die(p->ctx, isl_error_unsupported, "unsupported output format", in isl_printer_print_pw_multi_aff()
3292 isl_printer_free(p); in isl_printer_print_pw_multi_aff()
3303 data->p = isl_printer_print_str(data->p, "; "); in print_pw_multi_aff_body_wrap()
3306 data->p = print_pw_multi_aff_body(data->p, pma); in print_pw_multi_aff_body_wrap()
3313 __isl_take isl_printer *p, __isl_keep isl_union_pw_multi_aff *upma) in print_union_pw_multi_aff_isl() argument
3320 p = print_param_tuple(p, space, &space_data); in print_union_pw_multi_aff_isl()
3322 p = isl_printer_print_str(p, s_open_set[0]); in print_union_pw_multi_aff_isl()
3323 data.p = p; in print_union_pw_multi_aff_isl()
3327 p = data.p; in print_union_pw_multi_aff_isl()
3328 p = isl_printer_print_str(p, s_close_set[0]); in print_union_pw_multi_aff_isl()
3329 return p; in print_union_pw_multi_aff_isl()
3333 __isl_take isl_printer *p, __isl_keep isl_union_pw_multi_aff *upma) in isl_printer_print_union_pw_multi_aff() argument
3335 if (!p || !upma) in isl_printer_print_union_pw_multi_aff()
3338 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_union_pw_multi_aff()
3339 return print_union_pw_multi_aff_isl(p, upma); in isl_printer_print_union_pw_multi_aff()
3340 isl_die(p->ctx, isl_error_unsupported, "unsupported output format", in isl_printer_print_union_pw_multi_aff()
3343 isl_printer_free(p); in isl_printer_print_union_pw_multi_aff()
3358 static __isl_give isl_printer *print_dim_mpa(__isl_take isl_printer *p, in print_dim_mpa() argument
3373 p = print_name(space, p, type, pos, data->latex); in print_dim_mpa()
3375 return p; in print_dim_mpa()
3378 pa = mpa->u.p[pos]; in print_dim_mpa()
3380 return isl_printer_print_str(p, "(0 : false)"); in print_dim_mpa()
3382 need_parens = pa->n != 1 || !isl_set_plain_is_universe(pa->p[0].set); in print_dim_mpa()
3384 p = isl_printer_print_str(p, "("); in print_dim_mpa()
3389 p = isl_printer_print_str(p, "; "); in print_dim_mpa()
3390 p = print_aff_body(p, space, pa->p[i].aff); in print_dim_mpa()
3391 p = print_disjuncts(pa->p[i].set, space, p, 0); in print_dim_mpa()
3395 p = isl_printer_print_str(p, ")"); in print_dim_mpa()
3397 return p; in print_dim_mpa()
3405 static __isl_give isl_printer *print_multi_pw_aff_isl(__isl_take isl_printer *p, in print_multi_pw_aff_isl() argument
3412 return isl_printer_free(p); in print_multi_pw_aff_isl()
3414 p = print_param_tuple(p, mpa->space, &data); in print_multi_pw_aff_isl()
3415 p = isl_printer_print_str(p, "{ "); in print_multi_pw_aff_isl()
3418 p = isl_print_space(mpa->space, p, 0, &data); in print_multi_pw_aff_isl()
3421 return isl_printer_free(p); in print_multi_pw_aff_isl()
3426 p = print_disjuncts_set(mpa->u.dom, space, p, 0); in print_multi_pw_aff_isl()
3429 p = isl_printer_print_str(p, " }"); in print_multi_pw_aff_isl()
3430 return p; in print_multi_pw_aff_isl()
3434 __isl_take isl_printer *p, __isl_keep isl_multi_pw_aff *mpa) in isl_printer_print_multi_pw_aff() argument
3436 if (!p || !mpa) in isl_printer_print_multi_pw_aff()
3437 return isl_printer_free(p); in isl_printer_print_multi_pw_aff()
3439 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_multi_pw_aff()
3440 return print_multi_pw_aff_isl(p, mpa); in isl_printer_print_multi_pw_aff()
3441 isl_die(p->ctx, isl_error_unsupported, "unsupported output format", in isl_printer_print_multi_pw_aff()
3442 return isl_printer_free(p)); in isl_printer_print_multi_pw_aff()
3452 static __isl_give isl_printer *print_dim_mv(__isl_take isl_printer *p, in print_dim_mv() argument
3458 return isl_printer_print_val(p, mv->u.p[pos]); in print_dim_mv()
3460 return print_name(data->space, p, data->type, pos, data->latex); in print_dim_mv()
3465 static __isl_give isl_printer *print_multi_val_isl(__isl_take isl_printer *p, in print_multi_val_isl() argument
3471 return isl_printer_free(p); in print_multi_val_isl()
3473 p = print_param_tuple(p, mv->space, &data); in print_multi_val_isl()
3474 p = isl_printer_print_str(p, "{ "); in print_multi_val_isl()
3477 p = isl_print_space(mv->space, p, 0, &data); in print_multi_val_isl()
3478 p = isl_printer_print_str(p, " }"); in print_multi_val_isl()
3479 return p; in print_multi_val_isl()
3487 __isl_take isl_printer *p, __isl_keep isl_multi_val *mv) in isl_printer_print_multi_val() argument
3489 if (!p || !mv) in isl_printer_print_multi_val()
3490 return isl_printer_free(p); in isl_printer_print_multi_val()
3492 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_multi_val()
3493 return print_multi_val_isl(p, mv); in isl_printer_print_multi_val()
3494 isl_die(p->ctx, isl_error_unsupported, "unsupported output format", in isl_printer_print_multi_val()
3495 return isl_printer_free(p)); in isl_printer_print_multi_val()
3505 static __isl_give isl_printer *print_dim_mi(__isl_take isl_printer *p, in print_dim_mi() argument
3511 return isl_printer_print_id(p, mi->u.p[pos]); in print_dim_mi()
3513 return print_name(data->space, p, data->type, pos, data->latex); in print_dim_mi()
3518 static __isl_give isl_printer *print_multi_id_isl(__isl_take isl_printer *p, in print_multi_id_isl() argument
3525 p = print_param_tuple(p, space, &data); in print_multi_id_isl()
3526 p = isl_printer_print_str(p, "{ "); in print_multi_id_isl()
3529 p = isl_print_space(space, p, 0, &data); in print_multi_id_isl()
3530 p = isl_printer_print_str(p, " }"); in print_multi_id_isl()
3531 return p; in print_multi_id_isl()
3539 __isl_take isl_printer *p, __isl_keep isl_multi_id *mi) in isl_printer_print_multi_id() argument
3541 if (!p || !mi) in isl_printer_print_multi_id()
3542 return isl_printer_free(p); in isl_printer_print_multi_id()
3544 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_multi_id()
3545 return print_multi_id_isl(p, mi); in isl_printer_print_multi_id()
3546 isl_die(isl_printer_get_ctx(p), isl_error_unsupported, in isl_printer_print_multi_id()
3547 "unsupported output format", return isl_printer_free(p)); in isl_printer_print_multi_id()
3558 static __isl_give isl_printer *print_union_pw_aff_dim(__isl_take isl_printer *p, in print_union_pw_aff_dim() argument
3565 p = print_union_pw_aff_body(p, upa); in print_union_pw_aff_dim()
3568 return p; in print_union_pw_aff_dim()
3581 __isl_take isl_printer *p, __isl_keep isl_multi_union_pw_aff *mupa) in print_multi_union_pw_aff_isl() argument
3588 return isl_printer_free(p); in print_multi_union_pw_aff_isl()
3591 return isl_printer_free(p); in print_multi_union_pw_aff_isl()
3594 p = print_param_tuple(p, space, &data); in print_multi_union_pw_aff_isl()
3597 p = isl_printer_print_str(p, "("); in print_multi_union_pw_aff_isl()
3602 p = isl_print_space(space, p, 0, &data); in print_multi_union_pw_aff_isl()
3606 p = isl_printer_print_str(p, " : "); in print_multi_union_pw_aff_isl()
3607 p = isl_printer_print_union_set_isl_body(p, mupa->u.dom); in print_multi_union_pw_aff_isl()
3608 p = isl_printer_print_str(p, ")"); in print_multi_union_pw_aff_isl()
3611 return p; in print_multi_union_pw_aff_isl()
3619 __isl_take isl_printer *p, __isl_keep isl_multi_union_pw_aff *mupa) in isl_printer_print_multi_union_pw_aff() argument
3621 if (!p || !mupa) in isl_printer_print_multi_union_pw_aff()
3622 return isl_printer_free(p); in isl_printer_print_multi_union_pw_aff()
3624 if (p->output_format == ISL_FORMAT_ISL) in isl_printer_print_multi_union_pw_aff()
3625 return print_multi_union_pw_aff_isl(p, mupa); in isl_printer_print_multi_union_pw_aff()
3626 isl_die(isl_printer_get_ctx(p), isl_error_unsupported, in isl_printer_print_multi_union_pw_aff()
3627 "unsupported output format", return isl_printer_free(p)); in isl_printer_print_multi_union_pw_aff()