Extracts values from a specified block of a single-precision matrix.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- Accelerate
Declaration
sparse _status sparse_extract_block_float(sparse _matrix _float A, sparse _index bi, sparse _index bj, sparse _dimension row_stride, sparse _dimension col_stride, float *restrict val);
Parameters
A
The sparse matrix, A, which must have been created with
sparse
or_matrix _block _create _float sparse
._matrix _variable _block _create _float SPARSE
is returned if not met._ILLEGAL _PARAMETER A
holds block dimensions (fixed or variable) set with matrix object creation routine.bi
The block row index for value extraction. Indices are 0 based (first block of matrix is
A[0,0]
). Indices expected to be in the bounds of matrix dimensions, undefined behavior if not met.bj
The block column index for value extraction. Indices are 0 based (first block of matrix is
A[0,0]
). Indices expected to be in the bounds of matrix dimensions, undefined behavior if not met.row_stride
The row stride in number of elements to move from one row to the next for the block
val
.col_stride
The column stride in number of elements to move from one column to the next for the block
val
.val
Pointer to dense block to place the extracted values. Expected to be of size
K * L
whereK * L
is the block size for the matrix object at block indexbi,bj
. This dimensions is set at matrix object creation time.
Return Value
On success SPARSE
is return and val has been updated with the block from block index bi,bj
. If A
creation requirements are not met, SPARSE
is returned and val
is unchanged.
Discussion
Extract the bi,bj
'th block from the sparse matrix A
.