|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(CUSOLVERRF_H_) |
|
|
#define CUSOLVERRF_H_ |
|
|
|
|
|
#include "driver_types.h" |
|
|
#include "cuComplex.h" |
|
|
#include "cusolver_common.h" |
|
|
|
|
|
#if defined(__cplusplus) |
|
|
extern "C" { |
|
|
#endif |
|
|
|
|
|
|
|
|
typedef enum { |
|
|
CUSOLVERRF_RESET_VALUES_FAST_MODE_OFF = 0, |
|
|
CUSOLVERRF_RESET_VALUES_FAST_MODE_ON = 1 |
|
|
} cusolverRfResetValuesFastMode_t; |
|
|
|
|
|
|
|
|
typedef enum { |
|
|
CUSOLVERRF_MATRIX_FORMAT_CSR = 0, |
|
|
CUSOLVERRF_MATRIX_FORMAT_CSC = 1 |
|
|
} cusolverRfMatrixFormat_t; |
|
|
|
|
|
|
|
|
typedef enum { |
|
|
CUSOLVERRF_UNIT_DIAGONAL_STORED_L = 0, |
|
|
CUSOLVERRF_UNIT_DIAGONAL_STORED_U = 1, |
|
|
CUSOLVERRF_UNIT_DIAGONAL_ASSUMED_L = 2, |
|
|
CUSOLVERRF_UNIT_DIAGONAL_ASSUMED_U = 3 |
|
|
} cusolverRfUnitDiagonal_t; |
|
|
|
|
|
|
|
|
typedef enum { |
|
|
CUSOLVERRF_FACTORIZATION_ALG0 = 0, |
|
|
CUSOLVERRF_FACTORIZATION_ALG1 = 1, |
|
|
CUSOLVERRF_FACTORIZATION_ALG2 = 2, |
|
|
} cusolverRfFactorization_t; |
|
|
|
|
|
|
|
|
typedef enum { |
|
|
CUSOLVERRF_TRIANGULAR_SOLVE_ALG1 = 1, |
|
|
CUSOLVERRF_TRIANGULAR_SOLVE_ALG2 = 2, |
|
|
CUSOLVERRF_TRIANGULAR_SOLVE_ALG3 = 3 |
|
|
} cusolverRfTriangularSolve_t; |
|
|
|
|
|
|
|
|
typedef enum { |
|
|
CUSOLVERRF_NUMERIC_BOOST_NOT_USED = 0, |
|
|
CUSOLVERRF_NUMERIC_BOOST_USED = 1 |
|
|
} cusolverRfNumericBoostReport_t; |
|
|
|
|
|
|
|
|
struct cusolverRfCommon; |
|
|
typedef struct cusolverRfCommon* cusolverRfHandle_t; |
|
|
|
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfCreate(cusolverRfHandle_t* handle); |
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfDestroy(cusolverRfHandle_t handle); |
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfGetMatrixFormat( |
|
|
cusolverRfHandle_t handle, |
|
|
cusolverRfMatrixFormat_t* format, |
|
|
cusolverRfUnitDiagonal_t* diag); |
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfSetMatrixFormat( |
|
|
cusolverRfHandle_t handle, |
|
|
cusolverRfMatrixFormat_t format, |
|
|
cusolverRfUnitDiagonal_t diag); |
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfSetNumericProperties( |
|
|
cusolverRfHandle_t handle, |
|
|
double zero, |
|
|
double boost); |
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfGetNumericProperties( |
|
|
cusolverRfHandle_t handle, |
|
|
double* zero, |
|
|
double* boost); |
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfGetNumericBoostReport( |
|
|
cusolverRfHandle_t handle, |
|
|
cusolverRfNumericBoostReport_t* report); |
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfSetAlgs( |
|
|
cusolverRfHandle_t handle, |
|
|
cusolverRfFactorization_t factAlg, |
|
|
cusolverRfTriangularSolve_t solveAlg); |
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfGetAlgs( |
|
|
cusolverRfHandle_t handle, |
|
|
cusolverRfFactorization_t* factAlg, |
|
|
cusolverRfTriangularSolve_t* solveAlg); |
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfGetResetValuesFastMode( |
|
|
cusolverRfHandle_t handle, |
|
|
cusolverRfResetValuesFastMode_t* fastMode); |
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI cusolverRfSetResetValuesFastMode( |
|
|
cusolverRfHandle_t handle, |
|
|
cusolverRfResetValuesFastMode_t fastMode); |
|
|
|
|
|
|
|
|
|
|
|
CUSOLVER_DEPRECATED(cuDSS) cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfSetupHost( |
|
|
int n, |
|
|
int nnzA, |
|
|
int* h_csrRowPtrA, |
|
|
int* h_csrColIndA, |
|
|
double* h_csrValA, |
|
|
int nnzL, |
|
|
int* h_csrRowPtrL, |
|
|
int* h_csrColIndL, |
|
|
double* h_csrValL, |
|
|
int nnzU, |
|
|
int* h_csrRowPtrU, |
|
|
int* h_csrColIndU, |
|
|
double* h_csrValU, |
|
|
int* h_P, |
|
|
int* h_Q, |
|
|
|
|
|
cusolverRfHandle_t handle); |
|
|
|
|
|
CUSOLVER_DEPRECATED(cuDSS) cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfSetupDevice( |
|
|
int n, |
|
|
int nnzA, |
|
|
int* csrRowPtrA, |
|
|
int* csrColIndA, |
|
|
double* csrValA, |
|
|
int nnzL, |
|
|
int* csrRowPtrL, |
|
|
int* csrColIndL, |
|
|
double* csrValL, |
|
|
int nnzU, |
|
|
int* csrRowPtrU, |
|
|
int* csrColIndU, |
|
|
double* csrValU, |
|
|
int* P, |
|
|
int* Q, |
|
|
|
|
|
cusolverRfHandle_t handle); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CUSOLVER_DEPRECATED(cuDSS) cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfResetValues( |
|
|
int n, |
|
|
int nnzA, |
|
|
int* csrRowPtrA, |
|
|
int* csrColIndA, |
|
|
double* csrValA, |
|
|
int* P, |
|
|
int* Q, |
|
|
|
|
|
cusolverRfHandle_t handle); |
|
|
|
|
|
|
|
|
CUSOLVER_DEPRECATED(cuDSS) cusolverStatus_t CUSOLVERAPI cusolverRfAnalyze(cusolverRfHandle_t handle); |
|
|
|
|
|
|
|
|
CUSOLVER_DEPRECATED(cuDSS) cusolverStatus_t CUSOLVERAPI cusolverRfRefactor(cusolverRfHandle_t handle); |
|
|
|
|
|
|
|
|
CUSOLVER_DEPRECATED(cuDSS) cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfAccessBundledFactorsDevice( |
|
|
cusolverRfHandle_t handle, |
|
|
|
|
|
int* nnzM, |
|
|
|
|
|
int** Mp, |
|
|
int** Mi, |
|
|
double** Mx); |
|
|
|
|
|
CUSOLVER_DEPRECATED(cuDSS) cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfExtractBundledFactorsHost( |
|
|
cusolverRfHandle_t handle, |
|
|
|
|
|
int* h_nnzM, |
|
|
int** h_Mp, |
|
|
int** h_Mi, |
|
|
double** h_Mx); |
|
|
|
|
|
|
|
|
CUSOLVER_DEPRECATED(cuDSS) cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfExtractSplitFactorsHost( |
|
|
cusolverRfHandle_t handle, |
|
|
|
|
|
int* h_nnzL, |
|
|
int** h_csrRowPtrL, |
|
|
int** h_csrColIndL, |
|
|
double** h_csrValL, |
|
|
int* h_nnzU, |
|
|
int** h_csrRowPtrU, |
|
|
int** h_csrColIndU, |
|
|
double** h_csrValU); |
|
|
|
|
|
|
|
|
CUSOLVER_DEPRECATED(cuDSS) cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfSolve( |
|
|
cusolverRfHandle_t handle, |
|
|
int* P, |
|
|
int* Q, |
|
|
int nrhs, |
|
|
double* Temp, |
|
|
int ldt, |
|
|
|
|
|
double* XF, |
|
|
|
|
|
int ldxf); |
|
|
|
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfBatchSetupHost( |
|
|
int batchSize, |
|
|
int n, |
|
|
int nnzA, |
|
|
int* h_csrRowPtrA, |
|
|
int* h_csrColIndA, |
|
|
double* h_csrValA_array[], |
|
|
int nnzL, |
|
|
int* h_csrRowPtrL, |
|
|
int* h_csrColIndL, |
|
|
double* h_csrValL, |
|
|
int nnzU, |
|
|
int* h_csrRowPtrU, |
|
|
int* h_csrColIndU, |
|
|
double* h_csrValU, |
|
|
int* h_P, |
|
|
int* h_Q, |
|
|
|
|
|
cusolverRfHandle_t handle); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfBatchResetValues( |
|
|
int batchSize, |
|
|
int n, |
|
|
int nnzA, |
|
|
int* csrRowPtrA, |
|
|
int* csrColIndA, |
|
|
double* csrValA_array[], |
|
|
int* P, |
|
|
int* Q, |
|
|
|
|
|
cusolverRfHandle_t handle); |
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfBatchAnalyze(cusolverRfHandle_t handle); |
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfBatchRefactor(cusolverRfHandle_t handle); |
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfBatchSolve( |
|
|
cusolverRfHandle_t handle, |
|
|
int* P, |
|
|
int* Q, |
|
|
int nrhs, |
|
|
double* Temp, |
|
|
int ldt, |
|
|
|
|
|
double* XF_array[], |
|
|
|
|
|
int ldxf); |
|
|
|
|
|
|
|
|
cusolverStatus_t CUSOLVERAPI |
|
|
cusolverRfBatchZeroPivot( |
|
|
cusolverRfHandle_t handle, |
|
|
|
|
|
int* position); |
|
|
|
|
|
#if defined(__cplusplus) |
|
|
} |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|