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
copy.c
#include "types.h"
#include "global.h"
void ladel_sparse_copy(ladel_sparse_matrix *M, ladel_sparse_matrix *M_copy)
{
if (!M || !M_copy)
{
M_copy = NULL;
} else
{
M_copy->ncol = M->ncol;
M_copy->nrow = M->nrow;
M_copy->nzmax = M->nzmax;
M_copy->symmetry = M->symmetry;
M_copy->values = M->values;
ladel_int index;
for (index = 0; index < M->ncol+1; index++) M_copy->p[index] = M->p[index];
for (index = 0; index < M->nzmax; index++)
{
M_copy->i[index] = M->i[index];
if (M->values) M_copy->x[index] = M->x[index];
}
}
}
void ladel_int_vector_copy(ladel_int *x, ladel_int size, ladel_int *y)
{
ladel_int index;
for (index = 0; index < size; index++)
{
y[index] = x[index];
}
}

Computing file changes ...