warp.sparse.bsr_mv#
- warp.sparse.bsr_mv(
- A,
- x,
- y=None,
- alpha=1.0,
- beta=0.0,
- transpose=False,
- work_buffer=None,
- tile_size=0,
Perform the sparse matrix-vector product
y := alpha * A * x + beta * yand returny.The
xandyvectors are allowed to alias.- Parameters:
A (BsrMatrix[_MatrixBlockType[Rows, Cols, Scalar] | _ScalarBlockType[Scalar]] | _BsrExpression[_MatrixBlockType[Rows, Cols, Scalar] | _ScalarBlockType[Scalar]]) – Read-only, left matrix operand of the matrix-vector product.
x (Array[Vector[Cols, Scalar] | Scalar]) – Read-only, right vector operand of the matrix-vector product.
y (Array[Vector[Rows, Scalar] | Scalar] | None) – Mutable affine operand and result vector. If
yis not provided, it will be allocated and treated as zero.alpha (Scalar) – Uniform scaling factor for
x. If zero,xwill not be read and may be left uninitialized.beta (Scalar) – Uniform scaling factor for
y. If zero,ywill not be read and may be left uninitialized.transpose (bool) – If
True, use the transpose of the matrixA. In this case the result is non-deterministic.work_buffer (Array[Vector[Rows, Scalar] | Scalar] | None) – Temporary storage is required if and only if
xandyare the same vector. If provided, thework_bufferarray will be used for this purpose, otherwise a temporary allocation will be performed.tile_size (int) – If a positive integer, use tiles of this size to compute the matrix-matrix product. If negative, disable tile-based computation. Defaults to
0, which determines whether to use tiles using using an heuristic based on the matrix shape and number of non-zeros..
- Return type:
Array[Vector[Rows, Scalar] | Scalar]