KmlScaissBicgstabSetUserSpmv?I
Associate with the user-defined matrix-vector multiplication function. This interface must be used together with the matrix-free initialization interface.
Interface Definition
C interface:
int KmlScaissBicgstabSetUserSpmvSI(KmlScasolverTask **handle, void *ustruct, int (*fptr)(void *ustruct, const float *x, float *y));
int KmlScaissBicgstabSetUserSpmvDI(KmlScasolverTask **handle, void *ustruct, int (*fptr)(void *ustruct, const double *x, double *y));
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
handle |
KmlScasolverTask ** |
Solver handle, which is a variable passed from a previous step. |
Input/Output |
ustruct |
void * |
Pointer to user data. This parameter is transferred as the first parameter each time the preconditioner is called. |
Input |
(*fptr) |
int |
Pointer to the user-defined function that performs the matrix-vector multiplication. This function multiplies the matrix by its second parameter. |
Input |
Return Value
Return Value |
Type |
Description |
|---|---|---|
KMLSS_NO_ERROR |
int |
Normal execution. |
KMLSS_DATA_SIZE |
int |
The value of nd is not 1. |
KMLSS_NULL_ARGUMENT |
int |
A null argument exists in {handle, data}. |