warp.sparse.bsr_assign#
- warp.sparse.bsr_assign(dest, src, structure_only=False, topology=None)[source]#
Copy the content of the
srcBSR matrix todest.- 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 leastsrc.nnzblocks. Ifstructure_onlyisFalse, values are also copied with implicit casting if the two matrices use distinct scalar types.topology (Literal['compact', 'masked', 'padded'] | None) – Optional topology policy.
"compact"keeps the existing compact rebuild behavior,"masked"keeps the non-zero topology ofdestunchanged, and"padded"copies each source row into existing destination row capacity without changingdest.offsetsand records capacity overflow indest.status_sync().