warp.sparse.bsr_assign#

warp.sparse.bsr_assign(dest, src, structure_only=False, masked=False)[source]#

Copy the content of the src BSR matrix to dest.

Parameters:
  • src (BsrMatrix[_MatrixBlockType[Any, Any, Any] | _ScalarBlockType[Any]] | _BsrExpression[_MatrixBlockType[Any, Any, Any] | _ScalarBlockType[Any]]) – Matrix to be copied.

  • dest (BsrMatrix[_MatrixBlockType[Rows, Cols, Scalar] | _ScalarBlockType[Scalar]]) – Destination matrix. May have a different block shape or scalar type than src, in which case the required casting will be performed.

  • structure_only (bool) – If True, only the non-zero indices are copied, and uninitialized value storage is allocated to accommodate at least src.nnz blocks. If structure_only is False, values are also copied with implicit casting if the two matrices use distinct scalar types.

  • masked (bool) – If True, keep the non-zero topology of dest unchanged.