pub unsafe extern "C" fn cusparseCbsrsm2_bufferSize(
handle: cusparseHandle_t,
dirA: cusparseDirection_t,
transA: cusparseOperation_t,
transXY: cusparseOperation_t,
mb: c_int,
n: c_int,
nnzb: c_int,
descrA: cusparseMatDescr_t,
bsrSortedVal: *mut cuComplex,
bsrSortedRowPtr: *const c_int,
bsrSortedColInd: *const c_int,
blockSize: c_int,
info: bsrsm2Info_t,
pBufferSizeInBytes: *mut c_int,
) -> cusparseStatus_tExpand description
This function returns size of buffer used in bsrsm2(), a new sparse triangular linear system op(A)*op(X)=$\alpha$op(B).
A is an (mb*blockDim)x(mb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA); B and X are the right-hand-side and the solution matrices; $\alpha$ is a scalar; and
$\operatorname{op}(A) = \text{CUSPARSE_OPERATION_NON_TRANSPOSE}$
Although there are six combinations in terms of parameter trans and the upper (and lower) triangular part of A, bsrsm2_bufferSize() returns the maximum size of the buffer among these combinations. The buffer size depends on dimension mb,blockDim and the number of nonzeros of the matrix, nnzb. If the user changes the matrix, it is necessary to call bsrsm2_bufferSize() again to get the correct buffer size, otherwise a segmentation fault may occur.
- The routine requires no extra storage.
- The routine supports asynchronous execution.
- The routine supports CUDA graph capture.