clSPARSE  v0.10.0.0
a software library containing Sparse functions written in OpenCL
Sparse iterative solvers

Functions to setup or execute sparse iterative solvers. More...

enum  PRINT_MODE {
  QUIET = 0,
  NORMAL,
  VERBOSE
}
 Enumeration to control the verbosity of the sparse iterative solver routines. VERBOSE will print helpful diagnostic messages to console.
 
enum  PRECONDITIONER {
  NOPRECOND = 0,
  DIAGONAL
}
 Enumeration to select the preconditioning algorithm used to precondition the sparse data before the iterative solver execution phase.
 
typedef struct _solverControl * clSParseSolverControl
 clSParseSolverControl keeps state relevant for OpenCL operations like kernel execution, memory allocation and synchronization behavior, specifically for sparse iterative solvers
 
CLSPARSE_EXPORT clsparseCreateSolverResult clsparseCreateSolverControl (PRECONDITIONER precond, cl_int maxIters, cl_double relTol, cl_double absTol)
 Create a clSParseSolverControl object to control clsparse iterative solver operations. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseReleaseSolverControl (clSParseSolverControl solverControl)
 Release a clSParseSolverControl object created with clsparseCreateSolverControl. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseSetSolverParams (clSParseSolverControl solverControl, PRECONDITIONER precond, cl_int maxIters, cl_double relTol, cl_double absTol)
 Set clSParseSolverControl state. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseSolverPrintMode (clSParseSolverControl solverControl, PRINT_MODE mode)
 Set the verbosity level of the clSParseSolverControl object. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseScsrcg (cldenseVector *x, const clsparseCsrMatrix *A, const cldenseVector *b, clSParseSolverControl solverControl, clsparseControl control)
 Execute a single precision Conjugate Gradients solver. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseDcsrcg (cldenseVector *x, const clsparseCsrMatrix *A, const cldenseVector *b, clSParseSolverControl solverControl, clsparseControl control)
 Execute a double precision Conjugate Gradients solver. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseScsrbicgStab (cldenseVector *x, const clsparseCsrMatrix *A, const cldenseVector *b, clSParseSolverControl solverControl, clsparseControl control)
 Execute a single precision Bi-Conjugate Gradients Stabilized solver. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseDcsrbicgStab (cldenseVector *x, const clsparseCsrMatrix *A, const cldenseVector *b, clSParseSolverControl solverControl, clsparseControl control)
 Execute a double precision Bi-Conjugate Gradients Stabilized solver. More...
 

Detailed Description

Functions to setup or execute sparse iterative solvers.

Function Documentation

CLSPARSE_EXPORT clsparseCreateSolverResult clsparseCreateSolverControl ( PRECONDITIONER  precond,
cl_int  maxIters,
cl_double  relTol,
cl_double  absTol 
)

Create a clSParseSolverControl object to control clsparse iterative solver operations.

Parameters
[in]precondA valid enumeration constant from PRECONDITIONER
[in]maxItersMaximum number of iterations to converge before timing out
[in]relTolRelative tolerance
[in]absTolAbsolute tolerance
Returns
clsparseSuccess
Examples:
sample-cg.cpp.
CLSPARSE_EXPORT clsparseStatus clsparseDcsrbicgStab ( cldenseVector x,
const clsparseCsrMatrix A,
const cldenseVector b,
clSParseSolverControl  solverControl,
clsparseControl  control 
)

Execute a double precision Bi-Conjugate Gradients Stabilized solver.

Parameters
[in]xthe dense vector to solve for
[in]Aa clSPARSE CSR matrix with double precision data
[in]bthe input dense vector with double precision data
[in]solverControla valid clSParseSolverControl object created with clsparseCreateSolverControl
[in]controlA valid clsparseControl created with clsparseCreateControl
Returns
clsparseSuccess
CLSPARSE_EXPORT clsparseStatus clsparseDcsrcg ( cldenseVector x,
const clsparseCsrMatrix A,
const cldenseVector b,
clSParseSolverControl  solverControl,
clsparseControl  control 
)

Execute a double precision Conjugate Gradients solver.

Parameters
[in]xthe dense vector to solve for
[in]Aa clSPARSE CSR matrix with double precision data
[in]bthe input dense vector with double precision data
[in]solverControla valid clSParseSolverControl object created with clsparseCreateSolverControl
[in]controlA valid clsparseControl created with clsparseCreateControl
Returns
clsparseSuccess
CLSPARSE_EXPORT clsparseStatus clsparseReleaseSolverControl ( clSParseSolverControl  solverControl)

Release a clSParseSolverControl object created with clsparseCreateSolverControl.

Parameters
[in,out]solverControlclSPARSE object created with clsparseCreateSolverControl
Returns
clsparseSuccess
Examples:
sample-cg.cpp.
CLSPARSE_EXPORT clsparseStatus clsparseScsrbicgStab ( cldenseVector x,
const clsparseCsrMatrix A,
const cldenseVector b,
clSParseSolverControl  solverControl,
clsparseControl  control 
)

Execute a single precision Bi-Conjugate Gradients Stabilized solver.

Parameters
[in]xthe dense vector to solve for
[in]Athe clSPARSE CSR matrix with single precision data
[in]bthe input dense vector with single precision data
[in]solverControla valid clSParseSolverControl object created with clsparseCreateSolverControl
[in]controlA valid clsparseControl created with clsparseCreateControl
Returns
clsparseSuccess
CLSPARSE_EXPORT clsparseStatus clsparseScsrcg ( cldenseVector x,
const clsparseCsrMatrix A,
const cldenseVector b,
clSParseSolverControl  solverControl,
clsparseControl  control 
)

Execute a single precision Conjugate Gradients solver.

Parameters
[in]xthe dense vector to solve for
[in]Aa clSPARSE CSR matrix with single precision data
[in]bthe input dense vector with single precision data
[in]solverControla valid clSParseSolverControl object created with clsparseCreateSolverControl
[in]controlA valid clsparseControl created with clsparseCreateControl
Returns
clsparseSuccess
Examples:
sample-cg.cpp.
CLSPARSE_EXPORT clsparseStatus clsparseSetSolverParams ( clSParseSolverControl  solverControl,
PRECONDITIONER  precond,
cl_int  maxIters,
cl_double  relTol,
cl_double  absTol 
)

Set clSParseSolverControl state.

Parameters
[in]solverControlclSPARSE object created with clsparseCreateSolverControl
[in]precondA valid enumeration constant from PRECONDITIONER, how to precondition sparse data
[in]maxItersMaximum number of iterations to converge before timing out
[in]relTolRelative tolerance
[in]absTolAbsolute tolerance
Returns
clsparseSuccess
CLSPARSE_EXPORT clsparseStatus clsparseSolverPrintMode ( clSParseSolverControl  solverControl,
PRINT_MODE  mode 
)

Set the verbosity level of the clSParseSolverControl object.

Parameters
[in]solverControlclSPARSE object created with clsparseCreateSolverControl
[in]modeA valid enumeration constant from PRINT_MODE, to specify verbosity level
Returns
clsparseSuccess
Examples:
sample-cg.cpp.