2 * Copyright 2008-2009 Katholieke Universiteit Leuven
4 * Use of this software is governed by the GNU LGPLv2.1 license
6 * Written by Sven Verdoolaege, K.U.Leuven, Departement
7 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
15 #include <isl/printer.h>
17 #if defined(__cplusplus)
22 typedef struct isl_dim isl_dim;
29 isl_dim_set = isl_dim_out,
34 isl_ctx *isl_dim_get_ctx(__isl_keep isl_dim *dim);
35 __isl_give isl_dim *isl_dim_alloc(isl_ctx *ctx,
36 unsigned nparam, unsigned n_in, unsigned n_out);
37 __isl_give isl_dim *isl_dim_set_alloc(isl_ctx *ctx,
38 unsigned nparam, unsigned dim);
39 __isl_give isl_dim *isl_dim_copy(__isl_keep isl_dim *dim);
40 struct isl_dim *isl_dim_cow(struct isl_dim *dim);
41 void isl_dim_free(__isl_take isl_dim *dim);
43 __isl_give isl_dim *isl_dim_set_tuple_name(__isl_take isl_dim *dim,
44 enum isl_dim_type type, const char *s);
45 const char *isl_dim_get_tuple_name(__isl_keep isl_dim *dim,
46 enum isl_dim_type type);
47 __isl_give isl_dim *isl_dim_set_tuple_id(__isl_take isl_dim *dim,
48 enum isl_dim_type type, __isl_take isl_id *id);
49 __isl_give isl_dim *isl_dim_reset_tuple_id(__isl_take isl_dim *dim,
50 enum isl_dim_type type);
51 __isl_give isl_id *isl_dim_get_tuple_id(__isl_keep isl_dim *dim,
52 enum isl_dim_type type);
54 __isl_give isl_dim *isl_dim_set_dim_id(__isl_take isl_dim *dim,
55 enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
56 __isl_give isl_id *isl_dim_get_dim_id(__isl_keep isl_dim *dim,
57 enum isl_dim_type type, unsigned pos);
59 int isl_dim_find_dim_by_id(__isl_keep isl_dim *dim, enum isl_dim_type type,
60 __isl_keep isl_id *id);
62 __isl_give isl_dim *isl_dim_set_name(__isl_take isl_dim *dim,
63 enum isl_dim_type type, unsigned pos,
64 __isl_keep const char *name);
65 __isl_keep const char *isl_dim_get_name(__isl_keep isl_dim *dim,
66 enum isl_dim_type type, unsigned pos);
68 struct isl_dim *isl_dim_extend(struct isl_dim *dim,
69 unsigned nparam, unsigned n_in, unsigned n_out);
70 __isl_give isl_dim *isl_dim_add(__isl_take isl_dim *dim, enum isl_dim_type type,
72 __isl_give isl_dim *isl_dim_move(__isl_take isl_dim *dim,
73 enum isl_dim_type dst_type, unsigned dst_pos,
74 enum isl_dim_type src_type, unsigned src_pos, unsigned n);
75 __isl_give isl_dim *isl_dim_insert(__isl_take isl_dim *dim,
76 enum isl_dim_type type, unsigned pos, unsigned n);
77 __isl_give isl_dim *isl_dim_join(__isl_take isl_dim *left,
78 __isl_take isl_dim *right);
79 struct isl_dim *isl_dim_product(struct isl_dim *left, struct isl_dim *right);
80 __isl_give isl_dim *isl_dim_range_product(__isl_take isl_dim *left,
81 __isl_take isl_dim *right);
82 __isl_give isl_dim *isl_dim_map_from_set(__isl_take isl_dim *dim);
83 __isl_give isl_dim *isl_dim_reverse(__isl_take isl_dim *dim);
84 __isl_give isl_dim *isl_dim_drop(__isl_take isl_dim *dim,
85 enum isl_dim_type type, unsigned first, unsigned num);
86 struct isl_dim *isl_dim_drop_inputs(struct isl_dim *dim,
87 unsigned first, unsigned n);
88 struct isl_dim *isl_dim_drop_outputs(struct isl_dim *dim,
89 unsigned first, unsigned n);
90 __isl_give isl_dim *isl_dim_domain(__isl_take isl_dim *dim);
91 __isl_give isl_dim *isl_dim_from_domain(__isl_take isl_dim *dim);
92 __isl_give isl_dim *isl_dim_range(__isl_take isl_dim *dim);
93 __isl_give isl_dim *isl_dim_from_range(__isl_take isl_dim *dim);
94 struct isl_dim *isl_dim_underlying(struct isl_dim *dim, unsigned n_div);
96 __isl_give isl_dim *isl_dim_align_params(__isl_take isl_dim *dim1,
97 __isl_take isl_dim *dim2);
99 int isl_dim_is_wrapping(__isl_keep isl_dim *dim);
100 __isl_give isl_dim *isl_dim_wrap(__isl_take isl_dim *dim);
101 __isl_give isl_dim *isl_dim_unwrap(__isl_take isl_dim *dim);
103 int isl_dim_can_zip(__isl_keep isl_dim *dim);
104 __isl_give isl_dim *isl_dim_zip(__isl_take isl_dim *dim);
106 int isl_dim_equal(struct isl_dim *dim1, struct isl_dim *dim2);
107 int isl_dim_match(struct isl_dim *dim1, enum isl_dim_type dim1_type,
108 struct isl_dim *dim2, enum isl_dim_type dim2_type);
109 int isl_dim_tuple_match(__isl_keep isl_dim *dim1, enum isl_dim_type dim1_type,
110 __isl_keep isl_dim *dim2, enum isl_dim_type dim2_type);
111 int isl_dim_compatible(struct isl_dim *dim1, struct isl_dim *dim2);
112 unsigned isl_dim_size(__isl_keep isl_dim *dim, enum isl_dim_type type);
113 unsigned isl_dim_total(struct isl_dim *dim);
115 __isl_give isl_printer *isl_printer_print_dim(__isl_take isl_printer *p,
116 __isl_keep isl_dim *dim);
117 void isl_dim_dump(__isl_keep isl_dim *dim);
119 #if defined(__cplusplus)