XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ hsr_zusmv()

void hsr_zusmv ( char  uplo,
int  n,
doublecomplex  alpha,
const doublecomplex  val[],
const int  rowptr[],
const int  colind[],
int  base,
const doublecomplex  x[],
int  incx,
doublecomplex  beta,
doublecomplex  y[],
int  incy,
int *  info 
)

y <- αAx + βy (Hermitian matrices) (CSR)

Purpose
This function performs one of the following matrix-vector operations for a sparse Hermitian matrix in CSR format.
y <- αAx + βy
where α and β are scalars, x and y are vectors. A is an n x n sparse Hermitian matrix, and only the upper or lower triangular part is used for computation.
Parameters
[in]uploSpecifies whether the matrix is stored in upper or lower triangular part.
= 'U': A is stored in upper triangular part.
= 'L': A is stored in lower triangular part.
The other triangular elements (not including diagonal elements) are ignored.
[in]nNumber of rows and columns of matrix A. (n >= 0) (If n = 0, returns without computation)
[in]alphaScalar α
[in]val[]Array val[lval] (lval >= nnz)
Values of nonzero elements of matrix A (where nnz is the number of nonzero elements).
[in]rowptr[]Array rowptr[lrowptr] (lrowptr >= n + 1)
Row pointers of matrix A.
[in]colind[]Array colind[lcolind] (lcolind >= nnz)
Column indices of matrix A (where nnz is the number of nonzero elements).
[in]baseIndexing of rowptr[] and colind[].
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
[in]x[]Array x[lx] (lx >= 1 + (n - 1)*|incx|)
Vector x.
[in]incxStorage spacing between elements of x[].
[in]betaScalar β.
[in,out]y[]Array y[ly] (ly >= 1 + (m - 1)*|incy|)
[in] Input vector y (If beta is supplied as zero, y[] needs not be set on input).
[out] Output vector. (= αAx + βy)
[in]incyStorage spacing between elements of y[].
[out]info= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.