warp.sparse.bsr_block_index#

warp.sparse.bsr_block_index = <Function bsr_block_index(row: int, col: int, bsr_offsets: array(ndim=1, dtype=int32), bsr_columns: array(ndim=1, dtype=int32))>#

Return the active block index in a capacity-aware BSR matrix, or -1 if no such block exists.

This row-capacity overload searches bsr_offsets[row]:bsr_offsets[row] + bsr_row_counts[row] and ignores slack storage. If bsr_row_counts is None, it falls back to compact storage rows defined by bsr_offsets.

Parameters:
  • row (int)

  • col (int)

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

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

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

Return type:

int