warp.sparse.bsr_row_index#
- warp.sparse.bsr_row_index( ) int[source]#
Return the row containing a block in compact BSR/CSR storage, or -1 if no such row exists.
This overload searches the storage range defined by
offsets. For matrices with padded row capacity, passrow_countsto the row-capacity overload to search active blocks only.- Parameters:
offsets – Array of size at least
1 + row_countcontaining the offsets of the blocks in each row.row_count – Number of rows of blocks.
block_index – Index of the block.
- warp.sparse.bsr_row_index( ) int[source]
Return the row containing an active block in a capacity-aware BSR matrix, or -1 if no such row exists.
This row-capacity overload searches active row ranges
offsets[row]:offsets[row] + row_counts[row]and ignores slack storage. Ifrow_countsisNone, it falls back to compact storage rows defined byoffsets.