|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
tools/polly/lib/External/isl/isl_list_templ.c 31 isl_ctx *FN(LIST(EL),get_ctx)(__isl_keep LIST(EL) *list)
36 __isl_give LIST(EL) *FN(LIST(EL),alloc)(isl_ctx *ctx, int n)
57 __isl_give LIST(EL) *FN(LIST(EL),copy)(__isl_keep LIST(EL) *list)
66 __isl_give LIST(EL) *FN(LIST(EL),dup)(__isl_keep LIST(EL) *list)
74 dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
74 dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
78 dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
78 dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
82 __isl_give LIST(EL) *FN(LIST(EL),cow)(__isl_take LIST(EL) *list)
90 return FN(LIST(EL),dup)(list);
99 static __isl_give LIST(EL) *FN(LIST(EL),grow)(__isl_take LIST(EL) *list, int n)
110 ctx = FN(LIST(EL),get_ctx)(list);
116 return FN(LIST(EL),free)(list);
124 res = FN(LIST(EL),alloc)(ctx, new_size);
126 return FN(LIST(EL),free)(list);
129 res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129 res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
131 FN(LIST(EL),free)(list);
137 static isl_stat FN(LIST(EL),check_index)(__isl_keep LIST(EL) *list, int index)
142 isl_die(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
147 __isl_give LIST(EL) *FN(LIST(EL),add)(__isl_take LIST(EL) *list,
150 list = FN(LIST(EL),grow)(list, 1);
157 FN(EL,free)(el);
158 FN(LIST(EL),free)(list);
164 __isl_give LIST(EL) *FN(LIST(EL),drop)(__isl_take LIST(EL) *list,
173 "index out of bounds", return FN(LIST(EL),free)(list));
176 list = FN(LIST(EL),cow)(list);
180 FN(EL,free)(list->p[first + i]);
194 __isl_give LIST(EL) *FN(LIST(EL),insert)(__isl_take LIST(EL) *list,
203 ctx = FN(LIST(EL),get_ctx)(list);
216 res = FN(LIST(EL),alloc)(ctx, list->n + 1);
218 res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
218 res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
219 res = FN(LIST(EL),add)(res, el);
221 res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
221 res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
222 FN(LIST(EL),free)(list);
226 FN(EL,free)(el);
227 FN(LIST(EL),free)(list);
231 __isl_null LIST(EL) *FN(LIST(EL),free)(__isl_take LIST(EL) *list)
243 FN(EL,free)(list->p[i]);
251 int FN(LIST(EL),size)(__isl_keep LIST(EL) *list)
258 int FN(FN(LIST(EL),n),BASE)(__isl_keep LIST(EL) *list)
258 int FN(FN(LIST(EL),n),BASE)(__isl_keep LIST(EL) *list)
260 return FN(LIST(EL),size)(list);
265 static __isl_keep EL *FN(LIST(EL),peek)(__isl_keep LIST(EL) *list, int index)
267 if (FN(LIST(EL),check_index)(list, index) < 0)
274 __isl_give EL *FN(LIST(EL),get_at)(__isl_keep LIST(EL) *list, int index)
276 return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
276 return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
281 __isl_give EL *FN(FN(LIST(EL),get),BASE)(__isl_keep LIST(EL) *list, int index)
281 __isl_give EL *FN(FN(LIST(EL),get),BASE)(__isl_keep LIST(EL) *list, int index)
283 return FN(LIST(EL),get_at)(list, index);
288 __isl_give LIST(EL) *FN(FN(LIST(EL),set),BASE)(__isl_take LIST(EL) *list,
288 __isl_give LIST(EL) *FN(FN(LIST(EL),set),BASE)(__isl_take LIST(EL) *list,
293 if (FN(LIST(EL),check_index)(list, index) < 0)
296 FN(EL,free)(el);
299 list = FN(LIST(EL),cow)(list);
302 FN(EL,free)(list->p[index]);
306 FN(EL,free)(el);
307 FN(LIST(EL),free)(list);
321 static __isl_give EL *FN(FN(LIST(EL),take),BASE)(__isl_keep LIST(EL) *list,
321 static __isl_give EL *FN(FN(LIST(EL),take),BASE)(__isl_keep LIST(EL) *list,
326 if (FN(LIST(EL),check_index)(list, index) < 0)
329 return FN(FN(LIST(EL),get),BASE)(list, index);
329 return FN(FN(LIST(EL),get),BASE)(list, index);
339 static __isl_give LIST(EL) *FN(FN(LIST(EL),restore),BASE)(
339 static __isl_give LIST(EL) *FN(FN(LIST(EL),restore),BASE)(
342 return FN(FN(LIST(EL),set),BASE)(list, index, el);
342 return FN(FN(LIST(EL),set),BASE)(list, index, el);
347 __isl_give LIST(EL) *FN(LIST(EL),swap)(__isl_take LIST(EL) *list,
354 el1 = FN(FN(LIST(EL),take),BASE)(list, pos1);
354 el1 = FN(FN(LIST(EL),take),BASE)(list, pos1);
355 el2 = FN(FN(LIST(EL),take),BASE)(list, pos2);
355 el2 = FN(FN(LIST(EL),take),BASE)(list, pos2);
356 list = FN(FN(LIST(EL),restore),BASE)(list, pos1, el2);
356 list = FN(FN(LIST(EL),restore),BASE)(list, pos1, el2);
357 list = FN(FN(LIST(EL),restore),BASE)(list, pos2, el1);
357 list = FN(FN(LIST(EL),restore),BASE)(list, pos2, el1);
363 __isl_give LIST(EL) *FN(LIST(EL),reverse)(__isl_take LIST(EL) *list)
367 n = FN(LIST(EL),size)(list);
369 list = FN(LIST(EL),swap)(list, i, n - 1 - i);
373 isl_stat FN(LIST(EL),foreach)(__isl_keep LIST(EL) *list,
382 EL *el = FN(EL,copy)(list->p[i]);
395 __isl_give LIST(EL) *FN(LIST(EL),map)(__isl_keep LIST(EL) *list,
405 EL *el = FN(FN(LIST(EL),take),BASE)(list, i);
405 EL *el = FN(FN(LIST(EL),take),BASE)(list, i);
407 return FN(LIST(EL),free)(list);
409 list = FN(FN(LIST(EL),restore),BASE)(list, i, el);
409 list = FN(FN(LIST(EL),restore),BASE)(list, i, el);
428 static int FN(LIST(EL),cmp)(const void *a, const void *b, void *user)
440 __isl_give LIST(EL) *FN(LIST(EL),sort)(__isl_take LIST(EL) *list,
449 list = FN(LIST(EL),cow)(list);
454 &FN(LIST(EL),cmp), &data) < 0)
455 return FN(LIST(EL),free)(list);
475 static isl_bool FN(LIST(EL),follows)(int i, int j, void *user)
486 static isl_stat FN(LIST(EL),call_on_scc)(__isl_keep LIST(EL) *list, int *pos,
493 ctx = FN(LIST(EL),get_ctx)(list);
494 slice = FN(LIST(EL),alloc)(ctx, n);
498 el = FN(EL,copy)(list->p[pos[i]]);
499 slice = FN(LIST(EL),add)(slice, el);
517 isl_stat FN(LIST(EL),foreach_scc)(__isl_keep LIST(EL) *list,
532 return fn(FN(LIST(EL),copy)(list), fn_user);
534 ctx = FN(LIST(EL),get_ctx)(list);
536 g = isl_tarjan_graph_init(ctx, n, &FN(LIST(EL),follows), &data);
553 return fn(FN(LIST(EL),copy)(list), fn_user);
555 if (FN(LIST(EL),call_on_scc)(list, g->order + first, i - first,
566 __isl_give LIST(EL) *FN(FN(LIST(EL),from),BASE)(__isl_take EL *el)
566 __isl_give LIST(EL) *FN(FN(LIST(EL),from),BASE)(__isl_take EL *el)
573 ctx = FN(EL,get_ctx)(el);
574 list = FN(LIST(EL),alloc)(ctx, 1);
577 list = FN(LIST(EL),add)(list, el);
580 FN(EL,free)(el);
588 static __isl_give LIST(EL) *FN(LIST(EL),concat_inplace)(
594 list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
594 list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
595 FN(LIST(EL),free)(list2);
604 __isl_give LIST(EL) *FN(LIST(EL),concat)(__isl_take LIST(EL) *list1,
615 return FN(LIST(EL),concat_inplace)(list1, list2);
617 ctx = FN(LIST(EL),get_ctx)(list1);
618 res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
620 res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
620 res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
622 res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
622 res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
624 FN(LIST(EL),free)(list1);
625 FN(LIST(EL),free)(list2);
628 FN(LIST(EL),free)(list1);
629 FN(LIST(EL),free)(list2);
653 void FN(LIST(EL),dump)(__isl_keep LIST(EL) *list)
660 printer = isl_printer_to_file(FN(LIST(EL),get_ctx)(list), stderr);