X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fisl%2Flist.h;h=0a7724189b96f82d771b7e40442d973e35acfcf3;hb=c53ceda9cc1f9556507c9956647975a1d661a380;hp=e0dbfedfccf0963a6acc8b6616f5504b37292190;hpb=64e0c9a630d2cec74cc60b23156cf63a3083de43;p=platform%2Fupstream%2Fisl.git diff --git a/include/isl/list.h b/include/isl/list.h index e0dbfed..0a77241 100644 --- a/include/isl/list.h +++ b/include/isl/list.h @@ -1,7 +1,7 @@ /* * Copyright 2008-2009 Katholieke Universiteit Leuven * - * Use of this software is governed by the GNU LGPLv2.1 license + * 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 @@ -17,10 +17,11 @@ extern "C" { #endif -#define ISL_DECLARE_LIST(EL) \ +#define ISL_DECLARE_LIST_TYPE(EL) \ struct isl_##EL; \ struct isl_##EL##_list; \ -typedef struct isl_##EL##_list isl_##EL##_list; \ +typedef struct isl_##EL##_list isl_##EL##_list; +#define ISL_DECLARE_LIST_FN(EL) \ isl_ctx *isl_##EL##_list_get_ctx(__isl_keep isl_##EL##_list *list); \ __isl_give isl_##EL##_list *isl_##EL##_list_from_##EL( \ __isl_take struct isl_##EL *el); \ @@ -31,24 +32,41 @@ void *isl_##EL##_list_free(__isl_take isl_##EL##_list *list); \ __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_insert( \ + __isl_take isl_##EL##_list *list, unsigned pos, \ + __isl_take struct isl_##EL *el); \ +__isl_give isl_##EL##_list *isl_##EL##_list_drop( \ + __isl_take isl_##EL##_list *list, unsigned first, unsigned n); \ __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); \ +__isl_give struct isl_##EL##_list *isl_##EL##_list_set_##EL( \ + __isl_take struct isl_##EL##_list *list, int index, \ + __isl_take struct isl_##EL *el); \ int isl_##EL##_list_foreach(__isl_keep isl_##EL##_list *list, \ int (*fn)(__isl_take struct isl_##EL *el, void *user), \ void *user); \ +__isl_give isl_##EL##_list *isl_##EL##_list_sort( \ + __isl_take isl_##EL##_list *list, \ + int (*cmp)(__isl_keep struct isl_##EL *a, \ + __isl_keep struct isl_##EL *b, \ + void *user), void *user); \ +int isl_##EL##_list_foreach_scc(__isl_keep isl_##EL##_list *list, \ + int (*follows)(__isl_keep struct isl_##EL *a, \ + __isl_keep struct isl_##EL *b, void *user), \ + void *follows_user, \ + int (*fn)(__isl_take isl_##EL##_list *scc, void *user), \ + void *fn_user); \ __isl_give isl_printer *isl_printer_print_##EL##_list( \ __isl_take isl_printer *p, __isl_keep isl_##EL##_list *list); \ void isl_##EL##_list_dump(__isl_keep isl_##EL##_list *list); -ISL_DECLARE_LIST(basic_set) -ISL_DECLARE_LIST(set) -ISL_DECLARE_LIST(aff) -ISL_DECLARE_LIST(pw_aff) -ISL_DECLARE_LIST(band) +#define ISL_DECLARE_LIST(EL) \ + ISL_DECLARE_LIST_TYPE(EL) \ + ISL_DECLARE_LIST_FN(EL) #if defined(__cplusplus) }