This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lno] More fixes
- From: Sebastian Pop <sebastian dot pop at cri dot ensmp dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 Jul 2004 17:37:18 +0200
- Subject: Re: [lno] More fixes
Hi,
A small patch for the hermite right and left.
2004-07-30 Sebastian Pop <pop@cri.ensmp.fr>
* lambda-mat.c (lambda_matrix_right_hermite,
lambda_matrix_left_hermite): Fix the bounds for the iteration on
columns.
Index: lambda-mat.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/lambda-mat.c,v
retrieving revision 1.1.2.5
diff -c -c -3 -p -r1.1.2.5 lambda-mat.c
*** lambda-mat.c 29 Jul 2004 22:54:22 -0000 1.1.2.5
--- lambda-mat.c 30 Jul 2004 16:50:21 -0000
*************** lambda_matrix_hermite (lambda_matrix mat
*** 459,465 ****
/* Given an M x N integer matrix A, this function determines an M x
M unimodular matrix U, and an M x N echelon matrix S such that
! "U.MAT = S". This decomposition is also known as "right Hermite".
Ref: Algorithm 2.1 page 33 in "Loop Transformations for
Restructuring Compilers" Utpal Banerjee. */
--- 459,465 ----
/* Given an M x N integer matrix A, this function determines an M x
M unimodular matrix U, and an M x N echelon matrix S such that
! "U.A = S". This decomposition is also known as "right Hermite".
Ref: Algorithm 2.1 page 33 in "Loop Transformations for
Restructuring Compilers" Utpal Banerjee. */
*************** lambda_matrix_right_hermite (lambda_matr
*** 473,479 ****
lambda_matrix_copy (A, S, m, n);
lambda_matrix_id (U, m);
! for (j = 0; j < m; j++)
{
if (lambda_vector_first_nz (S[j], m, i0) < m)
{
--- 473,479 ----
lambda_matrix_copy (A, S, m, n);
lambda_matrix_id (U, m);
! for (j = 0; j < n; j++)
{
if (lambda_vector_first_nz (S[j], m, i0) < m)
{
*************** lambda_matrix_right_hermite (lambda_matr
*** 493,499 ****
lambda_matrix_row_add (S, n, i, i-1, -factor);
lambda_matrix_row_exchange (S, i, i-1);
!
lambda_matrix_row_add (U, m, i, i-1, -factor);
lambda_matrix_row_exchange (U, i, i-1);
}
--- 493,499 ----
lambda_matrix_row_add (S, n, i, i-1, -factor);
lambda_matrix_row_exchange (S, i, i-1);
!
lambda_matrix_row_add (U, m, i, i-1, -factor);
lambda_matrix_row_exchange (U, i, i-1);
}
*************** lambda_matrix_left_hermite (lambda_matri
*** 518,524 ****
lambda_matrix_copy (A, S, m, n);
lambda_matrix_id (V, m);
! for (j = 0; j < m; j++)
{
if (lambda_vector_first_nz (S[j], m, i0) < m)
{
--- 518,524 ----
lambda_matrix_copy (A, S, m, n);
lambda_matrix_id (V, m);
! for (j = 0; j < n; j++)
{
if (lambda_vector_first_nz (S[j], m, i0) < m)
{