83 for (i = 0; i <
f->n_group; ++i) {
85 fprintf(stderr,
", ");
86 fprintf(stderr,
"%d",
f->len[i]);
88 fprintf(stderr,
"]\n");
110 if (nvar < 0 || !Q || !U)
127 for (i = 0; i <
n; ++i)
162 for (i = 0; i < H->n_row; ++i)
164 for (i = 0, j = 0; i < H->n_col; ++i) {
165 for ( ; j < H->n_row; ++j)
170 for (i = 0; i < H->n_col; ++i) {
187 while (g->
cnt[
p] == 0)
203 for (k = i + 1; k < H->n_col && j >= g->
pos[k]; ++k) {
231 for (i = 0; i < H->n_col && g->
cnt[0] < H->n_col; ++i) {
232 if (g->
pos[i] == H->n_row)
236 for (j = g->
pos[i] + 1; j < H->n_row; ++j) {
245 for (i = 1; i < H->n_col; ++i)
285 H =
isl_mat_alloc(bset->ctx, bset->n_eq + bset->n_ineq, nvar);
299 if (g.
cnt[0] == nvar) {
310 while (done != nvar) {
312 for (i = 1; i < g.
cnt[
group]; ++i) {
315 for (j = done + g.
cnt[
group]; j < nvar; ++j)
320 "internal error",
goto error);
360 if (nparam < 0 || nvar < 0)
366 for (i = 0,
n = 0; i <
f->n_group; ++i) {
371 nparam +
n +
f->len[i], nvar -
n -
f->len[i]);
375 n +
f->len[i], nvar -
n -
f->len[i]);
380 if (every < 0 || !every)
for(int c0=1;c0< 3 *M - 1;c0+=3)
#define isl_die(ctx, errno, msg, code)
#define isl_assert(ctx, test, code)
#define isl_alloc_array(ctx, type, n)
#define isl_alloc_type(ctx, type)
isl_stat isl_stat(*) void user)
isl_bool isl_bool(* test)(__isl_keep ISL_KEY *key, __isl_keep ISL_VAL *val, void *user)
static int update_group_i_with_row_j(struct isl_factor_groups *g, int i, int j, __isl_keep isl_mat *H)
static int update_groups(struct isl_factor_groups *g, __isl_keep isl_mat *H)
__isl_give isl_factorizer * isl_factorizer_identity(__isl_keep isl_basic_set *bset)
static void clear_groups(struct isl_factor_groups *g)
static void update_group(struct isl_factor_groups *g, int k)
void isl_factorizer_dump(__isl_take isl_factorizer *f)
static int init_groups(struct isl_factor_groups *g, __isl_keep isl_mat *H)
isl_ctx * isl_factorizer_get_ctx(__isl_keep isl_factorizer *f)
__isl_give isl_factorizer * isl_basic_set_factorizer(__isl_keep isl_basic_set *bset)
static __isl_give isl_factorizer * isl_factorizer_alloc(__isl_keep isl_basic_set *bset, __isl_take isl_morph *morph, int n_group)
__isl_give isl_bool isl_factorizer_every_factor_basic_set(__isl_keep isl_factorizer *f, isl_bool(*test)(__isl_keep isl_basic_set *bset, void *user), void *user)
__isl_give isl_factorizer * isl_factorizer_groups(__isl_keep isl_basic_set *bset, __isl_take isl_mat *Q, __isl_take isl_mat *U, int n, int *len)
__isl_null isl_factorizer * isl_factorizer_free(__isl_take isl_factorizer *f)
#define isl_int_is_zero(i)
__isl_give isl_basic_set * isl_basic_set_drop(__isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first, unsigned n)
__isl_give isl_basic_set * isl_basic_set_drop_constraints_involving(__isl_take isl_basic_set *bset, unsigned first, unsigned n)
isl_stat isl_basic_set_check_no_locals(__isl_keep isl_basic_set *bset)
void isl_mat_sub_copy(struct isl_ctx *ctx, isl_int **dst, isl_int **src, unsigned n_row, unsigned dst_col, unsigned src_col, unsigned n_col)
__isl_give isl_morph * isl_morph_identity(__isl_keep isl_basic_set *bset)
__isl_null isl_morph * isl_morph_free(__isl_take isl_morph *morph)
__isl_give isl_morph * isl_morph_alloc(__isl_take isl_basic_set *dom, __isl_take isl_basic_set *ran, __isl_take isl_mat *map, __isl_take isl_mat *inv)
void isl_morph_print_internal(__isl_take isl_morph *morph, FILE *out)
__isl_give isl_basic_set * isl_morph_basic_set(__isl_take isl_morph *morph, __isl_take isl_basic_set *bset)
__isl_give isl_morph * isl_morph_copy(__isl_keep isl_morph *morph)
unsigned isl_space_offset(__isl_keep isl_space *space, enum isl_dim_type type)
struct isl_basic_set isl_basic_set
__isl_give isl_mat * isl_mat_copy(__isl_keep isl_mat *mat)
__isl_give isl_mat * isl_mat_identity(isl_ctx *ctx, unsigned n_row)
__isl_give isl_mat * isl_mat_swap_cols(__isl_take isl_mat *mat, unsigned i, unsigned j)
__isl_give isl_mat * isl_mat_left_hermite(__isl_take isl_mat *M, int neg, __isl_give isl_mat **U, __isl_give isl_mat **Q)
__isl_give isl_mat * isl_mat_diagonal(__isl_take isl_mat *mat1, __isl_take isl_mat *mat2)
__isl_give isl_mat * isl_mat_swap_rows(__isl_take isl_mat *mat, unsigned i, unsigned j)
__isl_null isl_mat * isl_mat_free(__isl_take isl_mat *mat)
__isl_give isl_mat * isl_mat_alloc(isl_ctx *ctx, unsigned n_row, unsigned n_col)
isl_size isl_basic_set_dim(__isl_keep isl_basic_set *bset, enum isl_dim_type type)
__isl_give isl_space * isl_basic_set_get_space(__isl_keep isl_basic_set *bset)
__isl_null isl_basic_set * isl_basic_set_free(__isl_take isl_basic_set *bset)
isl_ctx * isl_basic_set_get_ctx(__isl_keep isl_basic_set *bset)
__isl_give isl_basic_set * isl_basic_set_copy(__isl_keep isl_basic_set *bset)
__isl_give isl_basic_set * isl_basic_set_universe(__isl_take isl_space *space)
__isl_give isl_space * isl_space_copy(__isl_keep isl_space *space)
__isl_give isl_space * isl_space_drop_dims(__isl_take isl_space *space, enum isl_dim_type type, unsigned first, unsigned num)
__isl_give isl_space * isl_space_add_dims(__isl_take isl_space *space, enum isl_dim_type type, unsigned n)