First commit : 0.14.0 version (with roadmap in doc instead of
[cloog/uuh.git] / include / cloog / matrix.h
blob46830e1ec73419a521a06e3b4a3cb8bc18e355b8
2 /**-------------------------------------------------------------------**
3 ** CLooG **
4 **-------------------------------------------------------------------**
5 ** matrix.h **
6 **-------------------------------------------------------------------**
7 ** First version: april 17th 2005 **
8 **-------------------------------------------------------------------**/
11 /******************************************************************************
12 * CLooG : the Chunky Loop Generator (experimental) *
13 ******************************************************************************
14 * *
15 * Copyright (C) 2005 Cedric Bastoul *
16 * *
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 *
20 * version. *
21 * *
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 *
25 * for more details. *
26 * *
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 *
30 * *
31 * CLooG, the Chunky Loop Generator *
32 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
33 * *
34 ******************************************************************************/
37 #ifndef CLOOG_MATRIX_H
38 #define CLOOG_MATRIX_H
39 #if defined(__cplusplus)
40 extern "C"
42 #endif
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.
54 * Matrix;
57 #define CloogMatrix Matrix
59 /******************************************************************************
60 * PolyLib interface *
61 ******************************************************************************/
62 void cloog_matrix_print(FILE *, CloogMatrix *) ;
63 void cloog_matrix_free(CloogMatrix *) ;
64 CloogMatrix * cloog_matrix_alloc(unsigned, unsigned) ;
67 /******************************************************************************
68 * Useful prototypes *
69 ******************************************************************************/
70 void cloog_matrix_leak_up() ;
73 /******************************************************************************
74 * Structure display function *
75 ******************************************************************************/
76 void cloog_matrix_print_structure(FILE *, CloogMatrix *, int) ;
78 /******************************************************************************
79 * Reading function *
80 ******************************************************************************/
81 CloogMatrix * cloog_matrix_read(FILE *) ;
83 /******************************************************************************
84 * Processing functions *
85 ******************************************************************************/
86 void cloog_matrix_normalize(CloogMatrix *, int) ;
87 void cloog_matrix_equality_update(CloogMatrix *, int, int) ;
88 CloogMatrix * cloog_matrix_copy(CloogMatrix *) ;
89 Value * cloog_matrix_vector_copy(Value *, int) ;
90 Value * cloog_matrix_vector_simplify(Value*, CloogMatrix*, int, int, int);
91 CloogMatrix * cloog_matrix_simplify(CloogMatrix *, CloogMatrix *, int, int) ;
92 void cloog_matrix_vector_free(Value *, int) ;
94 #if defined(__cplusplus)
96 #endif
97 #endif /* define _H */