Skip to main content

cusolverDnXsytrs

Function cusolverDnXsytrs 

Source
pub unsafe extern "C" fn cusolverDnXsytrs(
    handle: cusolverDnHandle_t,
    uplo: cublasFillMode_t,
    n: i64,
    nrhs: i64,
    dataTypeA: cudaDataType,
    A: *const c_void,
    lda: i64,
    ipiv: *const i64,
    dataTypeB: cudaDataType,
    B: *mut c_void,
    ldb: i64,
    bufferOnDevice: *mut c_void,
    workspaceInBytesOnDevice: size_t,
    bufferOnHost: *mut c_void,
    workspaceInBytesOnHost: size_t,
    info: *mut c_int,
) -> cusolverStatus_t
Expand description

The helper functions below can calculate the sizes needed for pre-allocated buffers.

The following routine:

solves a system of linear equations using the generic API interface.

A contains the factorization from cusolverDn<t>sytrf(), only lower or upper part is meaningful, the other part is not touched.

If input parameter uplo is cublasFillMode_t::CUBLAS_FILL_MODE_LOWER, the details of the factorization are stores as: $$ A = L\*D\*L^{T} $$

If input parameter uplo is cublasFillMode_t::CUBLAS_FILL_MODE_UPPER, the details of the factorization are stores as: $$ A = U\*D\*U^{T} $$

The user has to provide the pivot indices that can be obtained by cusolverDn<t>sytrf() as well as device and host work spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice and workspaceInBytesOnHost are sizes in bytes of the device and host work spaces, and they are returned by cusolverDnXsytrs_bufferSize. To factorize and solve the symmetric system without pivoting, the user should set devIpiv = NULL when calling cusolverDn<t>sytrf and cusolverDnXsytrs.

If output parameter devInfo = -i (less than zero), the i-th parameter is wrong (not counting handle).

List of input arguments for cusolverDnXsytrs_bufferSize and cusolverDnXsytrs:

The generic API has two different types: dataTypeA is data type of the matrix A, dataTypeB is data type of the matrix A. cusolverDnXsytrs only supports the following four combinations:

Valid combination of data type and compute type

DataTypeADataTypeBMeaning
CUDA_R_32FCUDA_R_32FSSYTRS
CUDA_R_64FCUDA_R_64FDSYTRS
CUDA_C_32FCUDA_C_32FCSYTRS
CUDA_C_64FCUDA_C_64FZSYTRS

§Parameters

  • handle: Handle to the cuSolverDN library context.
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced.
  • n: Number of rows and columns of matrix A.
  • nrhs: Number of right-hand sides.
  • dataTypeA: Data type of array A.
  • A: Array of dimension lda * n with lda is not less than max(1,n).
  • lda: Leading dimension of two-dimensional array used to store matrix A.
  • dataTypeB: Data type of array B.
  • B: Array of dimension ldb * nrhs with ldb is not less than max(1,nrhs).
  • ldb: Leading dimension of two-dimensional array used to store matrix B.
  • bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes.
  • workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by cusolverDnXsytrs_bufferSize.
  • bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes.
  • workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by cusolverDnXsytrs_bufferSize.

§Return value