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,
)[source]#

Perform the sparse matrix-vector product y := alpha * A * x + beta * y and return y.

The x and y vectors 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 y is not provided, it will be allocated and treated as zero.

  • alpha (Scalar) – Uniform scaling factor for x. If zero, x will not be read and may be left uninitialized.

  • beta (Scalar) – Uniform scaling factor for y. If zero, y will not be read and may be left uninitialized.

  • transpose (bool) – If True, use the transpose of the matrix A. In this case the result is non-deterministic.

  • work_buffer (Array[Vector[Rows, Scalar] | Scalar] | None) – Temporary storage is required if and only if x and y are the same vector. If provided, the work_buffer array 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]