KmlDss(Spd/Hpd)Clean?I
Release the internal data structure and point the handle to a null pointer.
Interface Definition
C interfaces:
int KmlDssSpdCleanSI(KmlSolverTask **pHandle);
int KmlDssSpdCleanDI(KmlSolverTask **pHandle);
int KmlDssHpdCleanCI(KmlSolverTask **pHandle);
int KmlDssHpdCleanZI(KmlSolverTask **pHandle);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
pHandle |
KmlSolverTask ** |
Solver handle, which is a variable passed from a previous step. |
Input/Output |
Return Value
Return Value |
Type |
Description |
|---|---|---|
KMLSS_NO_ERROR |
int |
The execution is successful. |
KMLSS_NULL_ARGUMENT |
int |
Invalid parameter. |
KMLSS_BAD_HANDLE |
int |
The format of pHandle is incorrect. |
Dependencies
#include "kml_dss.h" or #include "kml_solver.h"
Examples
C interface:
int n = 2;
int ia[3] = {0,2,4};
int ja[4] = {0,1,0,1};
double a[4] = {2,1,1,2};
double b[2] = {3,1};
double x[2];
int nrhs = 1;
int ldx = n, ldb = n;
KmlSolverTask* matrix_handle = NULL;
int ierr = KmlDssSpdInitDI(&matrix_handle, n, a, ja, ia);
if (ierr != 0) {
printf("\nERROR in KmlDssSpdInitDI: %d", ierr);
}
ierr = KmlDssSpdAnalyzeDI(&matrix_handle);
if (ierr != 0) {
printf("\nERROR in KmlDssSpdAnalyzeDI: %d", ierr);
}
ierr = KmlDssSpdFactorizeDI(&matrix_handle);
if (ierr != 0) {
printf("\nERROR in KmlDssSpdFactorizeDI: %d", ierr);
}
ierr = KmlDssSpdSolveDI(&matrix_handle, nrhs, x, ldx, b, ldb);
if (ierr != 0) {
printf("\nERROR in KmlDssSpdSolveDI: %d", ierr);
}
ierr = KmlDssSpdCleanDI(&matrix_handle);
if (ierr != 0) {
printf("\nERROR in KmlDssSpdCleanDI: %d", ierr);
}
Parent topic: LLT/LLH (DEPRECATED)