-/* Given a matrix M (mat) and a size n (size), replace mat
- * by the matrix
- *
- * [ M 0 ]
- * [ 0 I ]
- *
- * where I is an n x n identity matrix.
- */
-static struct isl_mat *append_identity(struct isl_mat *mat, unsigned size)
-{
- int i;
- unsigned n_row, n_col;
-
- n_row = mat->n_row;
- n_col = mat->n_col;
- mat = isl_mat_extend(mat, n_row + size, n_col + size);
- if (!mat)
- return NULL;
- for (i = 0; i < n_row; ++i)
- isl_seq_clr(mat->row[i] + n_col, size);
- for (i = 0; i < size; ++i) {
- isl_seq_clr(mat->row[n_row + i], n_col + size);
- isl_int_set_si(mat->row[n_row + i][n_col + i], 1);
- }
- return mat;
-}
-