pub unsafe extern "C" fn cusparseDgpsvInterleavedBatch(
handle: cusparseHandle_t,
algo: c_int,
m: c_int,
ds: *mut f64,
dl: *mut f64,
d: *mut f64,
du: *mut f64,
dw: *mut f64,
x: *mut f64,
batchCount: c_int,
pBuffer: *mut c_void,
) -> cusparseStatus_tExpand description
This function computes the solution of multiple penta-diagonal linear systems for i=0,…,batchCount:
The coefficient matrix A of each of these penta-diagonal linear system is defined with five vectors corresponding to its lower (ds, dl), main (d), and upper (du, dw) 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, ds, dl, d, du and dw are defined by the following formula:
ds(i):= A(i, i-2) for i=1,2,...,m
The first two elements of ds is out-of-bound (ds(1):= A(1,-1), ds(2):= A(2,0)), so ds(1) = 0 and ds(2) = 0.
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.
dw(i) = A(i,i+2) for i=1,2,...,m
The last two elements of dw is out-of-bound (dw(m-1):= A(m-1,m+1), dw(m):= A(m,m+2)), so dw(m-1) = 0 and dw(m) = 0.
The data layout is the same as gtsvStridedBatch.
The routine is numerically stable because it uses QR to solve the linear system.
This function requires a buffer size returned by gpsvInterleavedBatch_bufferSizeExt(). The address of pBuffer must be multiple of 128 bytes. If it is not, cusparseStatus_t::CUSPARSE_STATUS_INVALID_VALUE is returned.
The function supports the following properties if pBuffer != NULL:
- The routine requires no extra storage.
- The routine supports asynchronous execution.
- The routine supports CUDA graph capture.
Please visit cuSPARSE Library Samples - cusparseSgpsvInterleavedBatch for a code example.