pub unsafe extern "C" fn cusparseCreateBsr(
spMatDescr: *mut cusparseSpMatDescr_t,
brows: i64,
bcols: i64,
bnnz: i64,
rowBlockSize: i64,
colBlockSize: i64,
bsrRowOffsets: *mut c_void,
bsrColInd: *mut c_void,
bsrValues: *mut c_void,
bsrRowOffsetsType: cusparseIndexType_t,
bsrColIndType: cusparseIndexType_t,
idxBase: cusparseIndexBase_t,
valueType: cudaDataType,
order: cusparseOrder_t,
) -> cusparseStatus_tExpand description
This function initializes the sparse matrix descriptor spMatDescr for the Block Compressed Row (BSR) format.
cusparseCreateBsr has the following constraints:
bsrRowOffsets,bsrColInd, andbsrValuesmust be aligned to the size of the datatypes specified bybsrRowOffsetsType,bsrColIndType, andvalueType, respectively. See cudaDataType_t for the description of the datatypes.
ยงParameters
spMatDescr: Sparse matrix descriptor.brows: Number of block rows of the sparse matrix.bcols: Number of block columns of the sparse matrix.bnnz: Number of blocks of the sparse matrix.rowBlockSize: Number of rows of each block.colBlockSize: Number of columns of each block.bsrRowOffsets: Block row offsets of the sparse matrix. Array of sizebrows + 1.bsrColInd: Block column indices of the sparse matrix. Array of sizebnnz.bsrValues: Values of the sparse matrix. Array of sizebnnz * rowBlockSize * colBlockSize.bsrRowOffsetsType: Data type ofbsrRowOffsets.bsrColIndType: Data type ofbsrColInd.idxBase: Base index ofbsrRowOffsetsandbsrColInd.valueType: Datatype ofbsrValues.order: Enumerator specifying the memory layout of values in each block.