__isl_give isl_set_list *isl_set_list_add(
__isl_take isl_set_list *list,
__isl_take isl_set *el);
+ __isl_give isl_set_list *isl_set_list_concat(
+ __isl_take isl_set_list *list1,
+ __isl_take isl_set_list *list2);
void *isl_set_list_free(__isl_take isl_set_list *list);
C<isl_set_list_alloc> creates an empty list with a capacity for
__isl_give isl_##EL##_list *isl_##EL##_list_add( \
__isl_take isl_##EL##_list *list, \
__isl_take struct isl_##EL *el); \
+__isl_give isl_##EL##_list *isl_##EL##_list_concat( \
+ __isl_take isl_##EL##_list *list1, \
+ __isl_take isl_##EL##_list *list2); \
int isl_##EL##_list_n_##EL(__isl_keep isl_##EL##_list *list); \
__isl_give struct isl_##EL *isl_##EL##_list_get_##EL( \
__isl_keep isl_##EL##_list *list, int index); \
return NULL;
}
+__isl_give LIST(EL) *FN(LIST(EL),concat)(__isl_take LIST(EL) *list1,
+ __isl_take LIST(EL) *list2)
+{
+ int i;
+ isl_ctx *ctx;
+ LIST(EL) *res;
+
+ if (!list1 || !list2)
+ goto error;
+
+ ctx = FN(LIST(EL),get_ctx)(list1);
+ res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
+ for (i = 0; i < list1->n; ++i)
+ res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
+ for (i = 0; i < list2->n; ++i)
+ res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
+
+ FN(LIST(EL),free)(list1);
+ FN(LIST(EL),free)(list2);
+ return res;
+error:
+ FN(LIST(EL),free)(list1);
+ FN(LIST(EL),free)(list2);
+ return NULL;
+}
+
__isl_give isl_printer *CAT(isl_printer_print_,LIST(BASE))(
__isl_take isl_printer *p, __isl_keep LIST(EL) *list)
{