Revision 8d80c9e1d5a8aaea123b670ff2dd04a5208d5bbe authored by Ben Hermans on 04 May 2020, 08:48:24 UTC, committed by Ben Hermans on 04 May 2020, 08:48:24 UTC
1 parent 24cf946
upper_diag.c
#include "types.h"
#include "global.h"
#include "upper_diag.h"
void ladel_to_upper_diag(ladel_sparse_matrix *M)
{
ladel_int index, row, col, Mptemp, nzM = 0;
for (col = 0; col < M->ncol; col++)
{
Mptemp = M->p[col];
M->p[col] = nzM;
for (index = Mptemp; index < M->p[col+1]; index++)
{
row = M->i[index];
if (row <= col)
{
M->i[nzM] = row;
if (M->values) M->x[nzM] = M->x[index];
nzM++;
}
}
}
M->p[M->ncol] = nzM;
ladel_sparse_realloc(M, nzM);
}

Computing file changes ...