pub unsafe extern "C" fn cusparseSgtsv2(
handle: cusparseHandle_t,
m: c_int,
n: c_int,
dl: *const f32,
d: *const f32,
du: *const f32,
B: *mut f32,
ldb: c_int,
pBuffer: *mut c_void,
) -> cusparseStatus_tExpand description
This function computes the solution of a tridiagonal linear system with multiple right-hand sides:
The coefficient matrix A of each of these tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. Notice that solution X overwrites right-hand-side matrix B on exit.
Assuming A is of size m and base-1, dl, d and du are defined by the following formula:
dl(i):= A(i, i-1) for i=1,2,...,m
The first element of dl is out-of-bound (dl(1):= A(1,0)), so dl(1) = 0.
d(i) = A(i,i) for i=1,2,...,m
du(i) = A(i,i+1) for i=1,2,...,m
The last element of du is out-of-bound (du(m):= A(m,m+1)), so du(m) = 0.
The routine does perform pivoting, which usually results in more accurate and more stable results than cusparse<t>gtsv_nopivot() or cusparse<t>gtsv2_nopivot() at the expense of some execution time.
This function requires a buffer size returned by gtsv2_bufferSizeExt(). The address of pBuffer must be multiple of 128 bytes. If it is not, cusparseStatus_t::CUSPARSE_STATUS_INVALID_VALUE is returned.
- The routine requires no extra storage.
- The routine supports asynchronous execution.
- The routine supports CUDA graph capture.