Tridiagonal linear systems can be easily solved in the framework of the cuSPARSE library by aid of the function:
cuSPARSE also provides
which, at variance with the first mentioned routine, does not perform pivoting. Both the above functions solve the same linear system with multiple right hand sides. A batched routine
also exists which solves multiple linear systems.
For all the above routines, the system matrix is fixed by simply specifying the lower diagonal, the main diagonal and the upper diagonal.
On our Git Hub website we are reporting a fully worked out example using cusparse<t>gtsv() to solve a tridiagonal linear system.