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))>#
Returns the index of the block at block-coordinates (row, col), or -1 if no such block exists. Assumes that the segments of
bsr_columnscorresponding to each row are sorted.- Parameters:
row (int) – Row of the block.
col (int) – Column of the block.
bsr_offsets (array(ndim=1, dtype=int32)) – Array of size at least
1 + rowcontaining the offsets of the blocks in each row.bsr_columns (array(ndim=1, dtype=int32)) – Array of size at least equal to
bsr_offsets[row + 1]containing the column indices of the blocks.
- Return type: