source: Daodan/MSYS2/mingw32/include/isl/list.h@ 1189

Last change on this file since 1189 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 4.4 KB
Line 
1/*
2 * Copyright 2008-2009 Katholieke Universiteit Leuven
3 *
4 * Use of this software is governed by the MIT license
5 *
6 * Written by Sven Verdoolaege, K.U.Leuven, Departement
7 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
8 */
9
10#ifndef ISL_LIST_H
11#define ISL_LIST_H
12
13#include <isl/ctx.h>
14#include <isl/printer_type.h>
15
16#if defined(__cplusplus)
17extern "C" {
18#endif
19
20#define ISL_DECLARE_LIST_TYPE2(EL,EXPORT) \
21struct isl_##EL; \
22struct EXPORT isl_##EL##_list; \
23typedef struct isl_##EL##_list isl_##EL##_list;
24#define ISL_DECLARE_LIST_TYPE(EL) \
25 ISL_DECLARE_LIST_TYPE2(EL,)
26#define ISL_DECLARE_EXPORTED_LIST_TYPE(EL) \
27 ISL_DECLARE_LIST_TYPE2(EL,__isl_export)
28#define ISL_DECLARE_LIST_FN3(EL,CONSTRUCTOR,EXPORT) \
29isl_ctx *isl_##EL##_list_get_ctx(__isl_keep isl_##EL##_list *list); \
30EXPORT \
31__isl_give isl_##EL##_list *isl_##EL##_to_list(__isl_take isl_##EL *el);\
32CONSTRUCTOR \
33__isl_give isl_##EL##_list *isl_##EL##_list_from_##EL( \
34 __isl_take isl_##EL *el); \
35CONSTRUCTOR \
36__isl_give isl_##EL##_list *isl_##EL##_list_alloc(isl_ctx *ctx, int n); \
37__isl_give isl_##EL##_list *isl_##EL##_list_copy( \
38 __isl_keep isl_##EL##_list *list); \
39__isl_null isl_##EL##_list *isl_##EL##_list_free( \
40 __isl_take isl_##EL##_list *list); \
41EXPORT \
42__isl_give isl_##EL##_list *isl_##EL##_list_add( \
43 __isl_take isl_##EL##_list *list, \
44 __isl_take isl_##EL *el); \
45EXPORT \
46__isl_give isl_##EL##_list *isl_##EL##_list_insert( \
47 __isl_take isl_##EL##_list *list, unsigned pos, \
48 __isl_take isl_##EL *el); \
49EXPORT \
50__isl_give isl_##EL##_list *isl_##EL##_list_drop( \
51 __isl_take isl_##EL##_list *list, unsigned first, unsigned n); \
52EXPORT \
53__isl_give isl_##EL##_list *isl_##EL##_list_clear( \
54 __isl_take isl_##EL##_list *list); \
55__isl_give isl_##EL##_list *isl_##EL##_list_swap( \
56 __isl_take isl_##EL##_list *list, unsigned pos1, \
57 unsigned pos2); \
58__isl_give isl_##EL##_list *isl_##EL##_list_reverse( \
59 __isl_take isl_##EL##_list *list); \
60EXPORT \
61__isl_give isl_##EL##_list *isl_##EL##_list_concat( \
62 __isl_take isl_##EL##_list *list1, \
63 __isl_take isl_##EL##_list *list2); \
64EXPORT \
65isl_size isl_##EL##_list_size(__isl_keep isl_##EL##_list *list); \
66isl_size isl_##EL##_list_n_##EL(__isl_keep isl_##EL##_list *list); \
67EXPORT \
68__isl_give isl_##EL *isl_##EL##_list_get_at( \
69 __isl_keep isl_##EL##_list *list, int index); \
70__isl_give struct isl_##EL *isl_##EL##_list_get_##EL( \
71 __isl_keep isl_##EL##_list *list, int index); \
72__isl_give struct isl_##EL##_list *isl_##EL##_list_set_##EL( \
73 __isl_take struct isl_##EL##_list *list, int index, \
74 __isl_take struct isl_##EL *el); \
75EXPORT \
76isl_stat isl_##EL##_list_foreach(__isl_keep isl_##EL##_list *list, \
77 isl_stat (*fn)(__isl_take isl_##EL *el, void *user), \
78 void *user); \
79isl_bool isl_##EL##_list_every(__isl_keep isl_##EL##_list *list, \
80 isl_bool (*test)(__isl_keep isl_##EL *el, void *user), \
81 void *user); \
82__isl_give isl_##EL##_list *isl_##EL##_list_map( \
83 __isl_take isl_##EL##_list *list, \
84 __isl_give isl_##EL * (*fn)(__isl_take isl_##EL *el, \
85 void *user), \
86 void *user); \
87__isl_give isl_##EL##_list *isl_##EL##_list_sort( \
88 __isl_take isl_##EL##_list *list, \
89 int (*cmp)(__isl_keep struct isl_##EL *a, \
90 __isl_keep struct isl_##EL *b, \
91 void *user), void *user); \
92isl_stat isl_##EL##_list_foreach_scc(__isl_keep isl_##EL##_list *list, \
93 isl_bool (*follows)(__isl_keep struct isl_##EL *a, \
94 __isl_keep struct isl_##EL *b, void *user), \
95 void *follows_user, \
96 isl_stat (*fn)(__isl_take isl_##EL##_list *scc, void *user), \
97 void *fn_user); \
98__isl_give char *isl_##EL##_list_to_str( \
99 __isl_keep isl_##EL##_list *list); \
100__isl_give isl_printer *isl_printer_print_##EL##_list( \
101 __isl_take isl_printer *p, __isl_keep isl_##EL##_list *list); \
102void isl_##EL##_list_dump(__isl_keep isl_##EL##_list *list);
103#define ISL_DECLARE_LIST_FN(EL) \
104 ISL_DECLARE_LIST_FN3(EL,,)
105#define ISL_DECLARE_EXPORTED_LIST_FN(EL) \
106 ISL_DECLARE_LIST_FN3(EL,__isl_constructor,__isl_export)
107
108#define ISL_DECLARE_LIST(EL) \
109 ISL_DECLARE_LIST_TYPE(EL) \
110 ISL_DECLARE_LIST_FN(EL)
111#define ISL_DECLARE_EXPORTED_LIST(EL) \
112 ISL_DECLARE_EXPORTED_LIST_TYPE(EL) \
113 ISL_DECLARE_EXPORTED_LIST_FN(EL)
114
115#if defined(__cplusplus)
116}
117#endif
118
119#endif
Note: See TracBrowser for help on using the repository browser.