2 /**-------------------------------------------------------------------**
4 **-------------------------------------------------------------------**
6 **-------------------------------------------------------------------**
7 ** First version: april 17th 2005 **
8 **-------------------------------------------------------------------**/
11 /******************************************************************************
12 * CLooG : the Chunky Loop Generator (experimental) *
13 ******************************************************************************
15 * Copyright (C) 2005 Cedric Bastoul *
17 * This is free software; you can redistribute it and/or modify it under the *
18 * terms of the GNU General Public License as published by the Free Software *
19 * Foundation; either version 2 of the License, or (at your option) any later *
22 * This software is distributed in the hope that it will be useful, but *
23 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
24 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
27 * You should have received a copy of the GNU General Public License along *
28 * with software; if not, write to the Free Software Foundation, Inc., *
29 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
31 * CLooG, the Chunky Loop Generator *
32 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
34 ******************************************************************************/
37 #ifndef CLOOG_MATRIX_H
38 #define CLOOG_MATRIX_H
39 #if defined(__cplusplus)
45 /* The Matrix structure comes directly from PolyLib (defined in polylib/types.h)
46 * here is how it looks like (at least in PolyLib 5.20.0 version).
48 * typedef struct matrix {
49 * unsigned NbRows; // The number of rows (= NbConstraints in Polyhedron).
50 * unsigned NbColumns; // The number of columns (= Dimension+2 in Polyhedron).
51 * Value **p; // An array of pointers to the beginning of each row.
52 * Value *p_Init; // The matrix is stored here, contiguously in memory.
53 * int p_Init_size; // Needed to free the memory allocated by mpz_init.
57 typedef Matrix CloogMatrix
;
59 /******************************************************************************
61 ******************************************************************************/
62 void cloog_matrix_print(FILE *, CloogMatrix
*) ;
63 void cloog_matrix_free(CloogMatrix
*) ;
64 CloogMatrix
* cloog_matrix_alloc(unsigned, unsigned) ;
67 /******************************************************************************
68 * Structure display function *
69 ******************************************************************************/
70 void cloog_matrix_print_structure(FILE *, CloogMatrix
*, int) ;
72 /******************************************************************************
74 ******************************************************************************/
75 CloogMatrix
* cloog_matrix_read(FILE *) ;
77 /******************************************************************************
78 * Processing functions *
79 ******************************************************************************/
80 void cloog_matrix_normalize(CloogMatrix
*, int) ;
81 void cloog_matrix_equality_update(CloogMatrix
*, int, int) ;
82 CloogMatrix
* cloog_matrix_copy(CloogMatrix
*) ;
83 Value
* cloog_matrix_vector_copy(Value
*, int) ;
84 Value
* cloog_matrix_vector_simplify(Value
*, CloogMatrix
*, int, int, int);
85 CloogMatrix
* cloog_matrix_simplify(CloogMatrix
*, CloogMatrix
*, int, int) ;
86 void cloog_matrix_vector_free(Value
*, int) ;
88 #if defined(__cplusplus)
91 #endif /* define _H */