rocsparse_sgtsv Interface Reference

rocsparse_sgtsv Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_sgtsv Interface Reference
hipfort_rocsparse::rocsparse_sgtsv Interface Reference

Tridiagonal solver with pivoting. More...

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_sgtsv_ (handle, m, n, dl, d, du, b, ldb, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_sgtsv_rank_0 (handle, m, n, dl, d, du, b, ldb, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_sgtsv_rank_1 (handle, m, n, dl, d, du, b, ldb, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_sgtsv_full_rank (handle, m, n, dl, d, du, b, ldb, temp_buffer)
 

Detailed Description

Tridiagonal solver with pivoting.

rocsparse_gtsv solves a tridiagonal system for multiple right-hand sides using pivoting

\[ T*B = B \]

where \(T\) is a sparse tridiagonal matrix and \(B\) is a dense \(ldb \times n\) matrix storing the right-hand side vectors in column order. The tridiagonal matrix \(T\) is defined by three vectors: dl for the lower diagonal, d for the main diagonal, and du for the upper diagonal.

Solving the tridiagonal system involves two steps. First, call rocsparse_Xgtsv_buffer_size() to determine the size of the required temporary storage buffer. After this is determined, allocate this buffer and pass it to rocsparse_Xgtsv() to perform the actual solve. The \(B\) dense matrix, which initially stores the n right-hand side vectors, is overwritten with the n solution vectors after the call to rocsparse_Xgtsv().

Note
This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
This routine supports execution in a hipGraph context.
Parameters
[in]handle- handle to the rocSPARSE library context queue.
[in]m- size of the tri-diagonal linear system (must be >= 2).
[in]n- number of columns in the dense matrix B.
[in]dl- lower diagonal of tri-diagonal system. The first entry must be zero.
[in]d- main diagonal of tri-diagonal system.
[in]du- upper diagonal of tri-diagonal system. The last entry must be zero.
[in,out]B- dense matrix of size ( ldb, n ).
[in]ldb- leading dimension of B. Must satisfy ldb >= max(1, m).
[in]temp_buffer- temporary storage buffer allocated by the user.
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem, n, or ldb is invalid.
rocsparse_status_invalid_pointerdl, d, du, B, or temp_buffer pointer is invalid.
rocsparse_status_internal_erroran internal error occurred.
Example

Member Function/Subroutine Documentation

◆ rocsparse_sgtsv_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sgtsv::rocsparse_sgtsv_ ( type(c_ptr), value  handle,
integer(c_int), value  m,
integer(c_int), value  n,
type(c_ptr), value  dl,
type(c_ptr), value  d,
type(c_ptr), value  du,
type(c_ptr), value  b,
integer(c_int), value  ldb,
type(c_ptr), value  temp_buffer 
)

◆ rocsparse_sgtsv_full_rank()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sgtsv::rocsparse_sgtsv_full_rank ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
real(c_float), dimension(:), target  dl,
real(c_float), dimension(:), target  d,
real(c_float), dimension(:), target  du,
real(c_float), dimension(:,:), target  b,
integer(c_int)  ldb,
type(c_ptr)  temp_buffer 
)

◆ rocsparse_sgtsv_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sgtsv::rocsparse_sgtsv_rank_0 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
real(c_float), target  dl,
real(c_float), target  d,
real(c_float), target  du,
real(c_float), target  b,
integer(c_int)  ldb,
type(c_ptr)  temp_buffer 
)

◆ rocsparse_sgtsv_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sgtsv::rocsparse_sgtsv_rank_1 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
real(c_float), dimension(:), target  dl,
real(c_float), dimension(:), target  d,
real(c_float), dimension(:), target  du,
real(c_float), dimension(:), target  b,
integer(c_int)  ldb,
type(c_ptr)  temp_buffer 
)

The documentation for this interface was generated from the following file: