9 if (reset)
for (index = 0; index < M->
nrow; index++) y[index] = 0;
11 for (col = 0; col < M->
ncol; col++)
13 y[M->
i[index]] += M->
x[index] * x[col];
20 if (reset)
for (index = 0; index < M->
ncol; index++) y[index] = 0;
22 for (col = 0; col < M->
ncol; col++)
24 y[col] += M->
x[index] * x[M->
i[index]];
31 if (reset)
for (index = 0; index < M->
ncol; index++) y[index] = 0;
33 for (col = 0; col < M->
ncol; col++)
35 y[M->
i[index]] += (M->
i[index] == col) ? 0.0 : M->
x[index] * x[col];
#define FALSE
For booleans.
#define LADEL_FOR(index, M, col)
Loop through a column of a sparse matrix.
Memory allocation routines.
void ladel_tpose_matvec(const ladel_sparse_matrix *M, const ladel_double *x, ladel_double *y, ladel_int reset)
Computes or (for reset==TRUE of FALSE respectively).
void ladel_symmetric_matvec(const ladel_sparse_matrix *M, const ladel_double *x, ladel_double *y, ladel_int reset)
Computes (for a symmetric matrix M) or (for reset==TRUE of FALSE respectively).
void ladel_matvec(const ladel_sparse_matrix *M, const ladel_double *x, ladel_double *y, ladel_int reset)
Computes or (for reset==TRUE of FALSE respectively).
Routines to compute matrix vector products.
Structures and types used in LADEL routines.
int64_t ladel_int
Type for integer numbers (default: int64_t)
double ladel_double
Type for floating point numbers (default: double)
Sparse matrix in compressed column storage.
ladel_int ncol
number of columns
ladel_double * x
numerical values (size nzmax)
ladel_int nrow
number of rows
ladel_int * i
row pointers (size nzmax)