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_tExpand 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
| DataTypeA | DataTypeB | Meaning |
|---|---|---|
CUDA_R_32F | CUDA_R_32F | SSYTRS |
CUDA_R_64F | CUDA_R_64F | DSYTRS |
CUDA_C_32F | CUDA_C_32F | CSYTRS |
CUDA_C_64F | CUDA_C_64F | ZSYTRS |
§Parameters
handle: Handle to the cuSolverDN library context.uplo: Indicates if matrixAlower or upper part is stored, the other part is not referenced.n: Number of rows and columns of matrixA.nrhs: Number of right-hand sides.dataTypeA: Data type of arrayA.A: Array of dimensionlda * nwithldais not less thanmax(1,n).lda: Leading dimension of two-dimensional array used to store matrixA.dataTypeB: Data type of arrayB.B: Array of dimensionldb * nrhswithldbis not less thanmax(1,nrhs).ldb: Leading dimension of two-dimensional array used to store matrixB.bufferOnDevice: Device workspace. Array of typevoidof sizeworkspaceInBytesOnDevicebytes.workspaceInBytesOnDevice: Size in bytes ofbufferOnDevice, returned bycusolverDnXsytrs_bufferSize.bufferOnHost: Host workspace. Array of typevoidof sizeworkspaceInBytesOnHostbytes.workspaceInBytesOnHost: Size in bytes ofbufferOnHost, returned bycusolverDnXsytrs_bufferSize.
§Return value
cusolverStatus_t::CUSOLVER_STATUS_INTERNAL_ERROR: An internal operation failed.cusolverStatus_t::CUSOLVER_STATUS_INVALID_VALUE: Invalid parameters were passed (n<0orlda<max(1,n)).cusolverStatus_t::CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED: Data type is not supported.cusolverStatus_t::CUSOLVER_STATUS_NOT_INITIALIZED: The library was not initialized.cusolverStatus_t::CUSOLVER_STATUS_SUCCESS: The operation completed successfully.