add isl_basic_{set,map}_partial_lex{min,max}_pw_multi_aff
[isl.git] / include / isl / space.h
blobd3496e0b6fcddd081fe0f0ce2b9ed31566bcfa21
1 /*
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
8 */
10 #ifndef ISL_SPACE_H
11 #define ISL_SPACE_H
13 #include <isl/ctx.h>
14 #include <isl/id.h>
15 #include <isl/printer.h>
17 #if defined(__cplusplus)
18 extern "C" {
19 #endif
21 struct isl_space;
22 typedef struct isl_space isl_space;
24 enum isl_dim_type {
25 isl_dim_cst,
26 isl_dim_param,
27 isl_dim_in,
28 isl_dim_out,
29 isl_dim_set = isl_dim_out,
30 isl_dim_div,
31 isl_dim_all
34 isl_ctx *isl_space_get_ctx(__isl_keep isl_space *dim);
35 __isl_give isl_space *isl_space_alloc(isl_ctx *ctx,
36 unsigned nparam, unsigned n_in, unsigned n_out);
37 __isl_give isl_space *isl_space_set_alloc(isl_ctx *ctx,
38 unsigned nparam, unsigned dim);
39 __isl_give isl_space *isl_space_params_alloc(isl_ctx *ctx, unsigned nparam);
40 __isl_give isl_space *isl_space_copy(__isl_keep isl_space *dim);
41 void isl_space_free(__isl_take isl_space *dim);
43 int isl_space_is_params(__isl_keep isl_space *space);
44 int isl_space_is_set(__isl_keep isl_space *space);
46 __isl_give isl_space *isl_space_set_tuple_name(__isl_take isl_space *dim,
47 enum isl_dim_type type, const char *s);
48 const char *isl_space_get_tuple_name(__isl_keep isl_space *dim,
49 enum isl_dim_type type);
50 __isl_give isl_space *isl_space_set_tuple_id(__isl_take isl_space *dim,
51 enum isl_dim_type type, __isl_take isl_id *id);
52 __isl_give isl_space *isl_space_reset_tuple_id(__isl_take isl_space *dim,
53 enum isl_dim_type type);
54 int isl_space_has_tuple_id(__isl_keep isl_space *dim, enum isl_dim_type type);
55 __isl_give isl_id *isl_space_get_tuple_id(__isl_keep isl_space *dim,
56 enum isl_dim_type type);
58 __isl_give isl_space *isl_space_set_dim_id(__isl_take isl_space *dim,
59 enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
60 int isl_space_has_dim_id(__isl_keep isl_space *dim,
61 enum isl_dim_type type, unsigned pos);
62 __isl_give isl_id *isl_space_get_dim_id(__isl_keep isl_space *dim,
63 enum isl_dim_type type, unsigned pos);
65 int isl_space_find_dim_by_id(__isl_keep isl_space *dim, enum isl_dim_type type,
66 __isl_keep isl_id *id);
67 int isl_space_find_dim_by_name(__isl_keep isl_space *space,
68 enum isl_dim_type type, const char *name);
70 __isl_give isl_space *isl_space_set_dim_name(__isl_take isl_space *dim,
71 enum isl_dim_type type, unsigned pos,
72 __isl_keep const char *name);
73 __isl_keep const char *isl_space_get_dim_name(__isl_keep isl_space *dim,
74 enum isl_dim_type type, unsigned pos);
76 __isl_give isl_space *isl_space_extend(__isl_take isl_space *dim,
77 unsigned nparam, unsigned n_in, unsigned n_out);
78 __isl_give isl_space *isl_space_add_dims(__isl_take isl_space *dim, enum isl_dim_type type,
79 unsigned n);
80 __isl_give isl_space *isl_space_move_dims(__isl_take isl_space *dim,
81 enum isl_dim_type dst_type, unsigned dst_pos,
82 enum isl_dim_type src_type, unsigned src_pos, unsigned n);
83 __isl_give isl_space *isl_space_insert_dims(__isl_take isl_space *dim,
84 enum isl_dim_type type, unsigned pos, unsigned n);
85 __isl_give isl_space *isl_space_join(__isl_take isl_space *left,
86 __isl_take isl_space *right);
87 __isl_give isl_space *isl_space_product(__isl_take isl_space *left,
88 __isl_take isl_space *right);
89 __isl_give isl_space *isl_space_domain_product(__isl_take isl_space *left,
90 __isl_take isl_space *right);
91 __isl_give isl_space *isl_space_range_product(__isl_take isl_space *left,
92 __isl_take isl_space *right);
93 __isl_give isl_space *isl_space_map_from_set(__isl_take isl_space *dim);
94 __isl_give isl_space *isl_space_reverse(__isl_take isl_space *dim);
95 __isl_give isl_space *isl_space_drop_dims(__isl_take isl_space *dim,
96 enum isl_dim_type type, unsigned first, unsigned num);
97 __isl_give isl_space *isl_space_drop_inputs(__isl_take isl_space *dim,
98 unsigned first, unsigned n);
99 __isl_give isl_space *isl_space_drop_outputs(__isl_take isl_space *dim,
100 unsigned first, unsigned n);
101 __isl_give isl_space *isl_space_domain(__isl_take isl_space *dim);
102 __isl_give isl_space *isl_space_from_domain(__isl_take isl_space *dim);
103 __isl_give isl_space *isl_space_range(__isl_take isl_space *dim);
104 __isl_give isl_space *isl_space_from_range(__isl_take isl_space *dim);
105 __isl_give isl_space *isl_space_params(__isl_take isl_space *space);
106 __isl_give isl_space *isl_space_set_from_params(__isl_take isl_space *space);
108 __isl_give isl_space *isl_space_align_params(__isl_take isl_space *dim1,
109 __isl_take isl_space *dim2);
111 int isl_space_is_wrapping(__isl_keep isl_space *dim);
112 __isl_give isl_space *isl_space_wrap(__isl_take isl_space *dim);
113 __isl_give isl_space *isl_space_unwrap(__isl_take isl_space *dim);
115 int isl_space_can_zip(__isl_keep isl_space *dim);
116 __isl_give isl_space *isl_space_zip(__isl_take isl_space *dim);
118 int isl_space_is_equal(__isl_keep isl_space *dim1, __isl_keep isl_space *dim2);
119 int isl_space_match(__isl_keep isl_space *dim1, enum isl_dim_type dim1_type,
120 __isl_keep isl_space *dim2, enum isl_dim_type dim2_type);
121 int isl_space_tuple_match(__isl_keep isl_space *dim1, enum isl_dim_type dim1_type,
122 __isl_keep isl_space *dim2, enum isl_dim_type dim2_type);
123 int isl_space_compatible(__isl_keep isl_space *dim1,
124 __isl_keep isl_space *dim2);
125 unsigned isl_space_dim(__isl_keep isl_space *dim, enum isl_dim_type type);
127 __isl_give isl_printer *isl_printer_print_space(__isl_take isl_printer *p,
128 __isl_keep isl_space *dim);
129 void isl_space_dump(__isl_keep isl_space *dim);
131 #if defined(__cplusplus)
133 #endif
135 #endif