Lines Matching defs:LIST

25 #define LIST(EL) xLIST(EL)
29 isl_ctx *FN(LIST(EL),get_ctx)(__isl_keep LIST(EL) *list)
34 __isl_give LIST(EL) *FN(LIST(EL),alloc)(isl_ctx *ctx, int n)
36 LIST(EL) *list;
42 list = isl_alloc(ctx, LIST(EL),
43 sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
55 __isl_give LIST(EL) *FN(LIST(EL),copy)(__isl_keep LIST(EL) *list)
64 __isl_give LIST(EL) *FN(LIST(EL),dup)(__isl_keep LIST(EL) *list)
67 LIST(EL) *dup;
72 dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
76 dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
80 __isl_give LIST(EL) *FN(LIST(EL),cow)(__isl_take LIST(EL) *list)
88 return FN(LIST(EL),dup)(list);
95 * Otherwise, we create a new LIST(EL) and copy the elements.
97 static __isl_give LIST(EL) *FN(LIST(EL),grow)(__isl_take LIST(EL) *list, int n)
101 LIST(EL) *res;
108 ctx = FN(LIST(EL),get_ctx)(list);
111 res = isl_realloc(ctx, list, LIST(EL),
112 sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114 return FN(LIST(EL),free)(list);
122 res = FN(LIST(EL),alloc)(ctx, new_size);
124 return FN(LIST(EL),free)(list);
127 res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129 FN(LIST(EL),free)(list);
133 __isl_give LIST(EL) *FN(LIST(EL),add)(__isl_take LIST(EL) *list,
136 list = FN(LIST(EL),grow)(list, 1);
144 FN(LIST(EL),free)(list);
150 __isl_give LIST(EL) *FN(LIST(EL),drop)(__isl_take LIST(EL) *list,
159 "index out of bounds", return FN(LIST(EL),free)(list));
162 list = FN(LIST(EL),cow)(list);
180 __isl_give LIST(EL) *FN(LIST(EL),insert)(__isl_take LIST(EL) *list,
185 LIST(EL) *res;
189 ctx = FN(LIST(EL),get_ctx)(list);
202 res = FN(LIST(EL),alloc)(ctx, list->n + 1);
204 res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
205 res = FN(LIST(EL),add)(res, el);
207 res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
208 FN(LIST(EL),free)(list);
213 FN(LIST(EL),free)(list);
217 void *FN(LIST(EL),free)(__isl_take LIST(EL) *list)
235 int FN(FN(LIST(EL),n),BASE)(__isl_keep LIST(EL) *list)
240 __isl_give EL *FN(FN(LIST(EL),get),BASE)(__isl_keep LIST(EL) *list, int index)
252 __isl_give LIST(EL) *FN(FN(LIST(EL),set),BASE)(__isl_take LIST(EL) *list,
264 list = FN(LIST(EL),cow)(list);
272 FN(LIST(EL),free)(list);
276 int FN(LIST(EL),foreach)(__isl_keep LIST(EL) *list,
300 S(LIST(EL),sort_data) {
308 static int FN(LIST(EL),cmp)(const void *a, const void *b, void *user)
310 S(LIST(EL),sort_data) *data = user;
320 __isl_give LIST(EL) *FN(LIST(EL),sort)(__isl_take LIST(EL) *list,
323 S(LIST(EL),sort_data) data = { cmp, user };
329 list = FN(LIST(EL),cow)(list);
334 &FN(LIST(EL),cmp), &data) < 0)
335 return FN(LIST(EL),free)(list);
345 S(LIST(EL),foreach_scc_data) {
346 LIST(EL) *list;
355 static int FN(LIST(EL),follows)(int i, int j, void *user)
357 S(LIST(EL),foreach_scc_data) *data = user;
366 static int FN(LIST(EL),call_on_scc)(__isl_keep LIST(EL) *list, int *pos, int n,
367 int (*fn)(__isl_take LIST(EL) *scc, void *user), void *user)
371 LIST(EL) *slice;
373 ctx = FN(LIST(EL),get_ctx)(list);
374 slice = FN(LIST(EL),alloc)(ctx, n);
379 slice = FN(LIST(EL),add)(slice, el);
397 int FN(LIST(EL),foreach_scc)(__isl_keep LIST(EL) *list,
400 int (*fn)(__isl_take LIST(EL) *scc, void *user), void *fn_user)
402 S(LIST(EL),foreach_scc_data) data = { list, follows, follows_user };
412 return fn(FN(LIST(EL),copy)(list), fn_user);
414 ctx = FN(LIST(EL),get_ctx)(list);
416 g = isl_tarjan_graph_init(ctx, n, &FN(LIST(EL),follows), &data);
433 return fn(FN(LIST(EL),copy)(list), fn_user);
435 if (FN(LIST(EL),call_on_scc)(list, g->order + first, i - first,
446 __isl_give LIST(EL) *FN(FN(LIST(EL),from),BASE)(__isl_take EL *el)
449 LIST(EL) *list;
454 list = FN(LIST(EL),alloc)(ctx, 1);
457 list = FN(LIST(EL),add)(list, el);
464 __isl_give LIST(EL) *FN(LIST(EL),concat)(__isl_take LIST(EL) *list1,
465 __isl_take LIST(EL) *list2)
469 LIST(EL) *res;
474 ctx = FN(LIST(EL),get_ctx)(list1);
475 res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
477 res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
479 res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
481 FN(LIST(EL),free)(list1);
482 FN(LIST(EL),free)(list2);
485 FN(LIST(EL),free)(list1);
486 FN(LIST(EL),free)(list2);
490 __isl_give isl_printer *CAT(isl_printer_print_,LIST(BASE))(
491 __isl_take isl_printer *p, __isl_keep LIST(EL) *list)
510 void FN(LIST(EL),dump)(__isl_keep LIST(EL) *list)
517 printer = isl_printer_to_file(FN(LIST(EL),get_ctx)(list), stderr);
518 printer = CAT(isl_printer_print_,LIST(BASE))(printer, list);