warp.sparse.bsr_row_index#

warp.sparse.bsr_row_index = <Function bsr_row_index(offsets: array(ndim=1, dtype=int32), row_count: int, block_index: int)>#

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. If row_counts is None, it falls back to compact storage rows defined by offsets.

Parameters:
  • offsets (array(ndim=1, dtype=int32))

  • row_count (int)

  • block_index (int)

  • row_counts (array(ndim=1, dtype=int32))

Return type:

int