warp.sparse.bsr_axpy#
- warp.sparse.bsr_axpy(
- x,
- y=None,
- alpha=1.0,
- beta=1.0,
- masked=False,
- work_arrays=None,
Perform the sparse matrix addition
y := alpha * X + beta * yon BSR matricesxandyand returny.The
xandymatrices are allowed to alias.- Parameters:
x (BsrMatrix[BlockType] | _BsrExpression[BlockType]) – Read-only first operand.
y (BsrMatrix[_MatrixBlockType[Rows, Cols, Scalar] | _ScalarBlockType[Scalar]] | None) – Mutable second operand and output matrix. If
yis not provided, it will be allocated and treated as zero.alpha (Scalar) – Uniform scaling factor for
x.beta (Scalar) – Uniform scaling factor for
y.masked (bool) – If
True, keep the non-zero topology ofyunchanged.work_arrays (bsr_axpy_work_arrays | None) – In most cases, this function will require the use of temporary storage. This storage can be reused across calls by passing an instance of
bsr_axpy_work_arraysinwork_arrays.
- Return type:
BsrMatrix[_MatrixBlockType[Rows, Cols, Scalar] | _ScalarBlockType[Scalar]]