Routines to copy matrices and vectors.
Definition in file ladel_copy.h.
#include "ladel_types.h"
Go to the source code of this file.
Functions | |
ladel_sparse_matrix * | ladel_sparse_allocate_and_copy (ladel_sparse_matrix *M) |
Copies a matrix into a newly allocated one. More... | |
void | ladel_sparse_copy (ladel_sparse_matrix *M, ladel_sparse_matrix *M_copy) |
Copies a matrix (preallocated) More... | |
void | ladel_int_vector_copy (ladel_int *x, ladel_int size, ladel_int *y) |
Copies an integer vector (preallocated) More... | |
void | ladel_double_vector_copy (ladel_double *x, ladel_int size, ladel_double *y) |
Copies a double vector (preallocated) More... | |
void ladel_double_vector_copy | ( | ladel_double * | x, |
ladel_int | size, | ||
ladel_double * | y | ||
) |
Copies a double vector (preallocated)
x | Vector to be copied |
size | Size of the vector |
y | Resulting copy |
Definition at line 47 of file ladel_copy.c.
Copies an integer vector (preallocated)
x | Vector to be copied |
size | Size of the vector |
y | Resulting copy |
Definition at line 38 of file ladel_copy.c.
ladel_sparse_matrix * ladel_sparse_allocate_and_copy | ( | ladel_sparse_matrix * | M | ) |
Copies a matrix into a newly allocated one.
Note that even if there is superfluous space in M (i.e. M->nz indicates the number of nonzeros per column), the returned matrix will fit the required size exactly, and not make use of the nz array.
M | Matrix to be copied |
Definition at line 5 of file ladel_copy.c.
void ladel_sparse_copy | ( | ladel_sparse_matrix * | M, |
ladel_sparse_matrix * | M_copy | ||
) |
Copies a matrix (preallocated)
M | Matrix to be copied |
M_copy | Resulting copy |
Definition at line 12 of file ladel_copy.c.