ALP User Documentation  0.8.preview
Algebraic Programming User Documentation
Typedefs | Enumerations | Functions
solver.h File Reference

Defines the solver transition path API. More...

Go to the source code of this file.

Typedefs

typedef void * sparse_cg_handle_t
 A solver handle for the Conjugate Gradient algorithm.
 
typedef int(* sparse_cg_preconditioner_dxx_t) (double *const, const double *const, void *const)
 A user-defined preconditioner function type for CG solver that employ double-precision floating-point nonzero values. More...
 
typedef int(* sparse_cg_preconditioner_sxx_t) (float *const, const float *const, void *const)
 A user-defined preconditioner function type for CG solver that employ single-precision floating-point nonzero values. More...
 

Enumerations

enum  sparse_err_t {
  NO_ERROR, NULL_ARGUMENT, ILLEGAL_ARGUMENT, OUT_OF_MEMORY,
  FAILED, UNKNOWN
}
 The various error codes sparse solver library functions may return. More...
 

Functions

sparse_err_t sparse_cg_destroy_dii (sparse_cg_handle_t handle)
 Destroys a valid CG solver handle. More...
 
sparse_err_t sparse_cg_destroy_diz (sparse_cg_handle_t handle)
 Destroys a valid CG solver handle. More...
 
sparse_err_t sparse_cg_destroy_dzz (sparse_cg_handle_t handle)
 Destroys a valid CG solver handle. More...
 
sparse_err_t sparse_cg_destroy_sii (sparse_cg_handle_t handle)
 Destroys a valid CG solver handle. More...
 
sparse_err_t sparse_cg_destroy_siz (sparse_cg_handle_t handle)
 Destroys a valid CG solver handle. More...
 
sparse_err_t sparse_cg_destroy_szz (sparse_cg_handle_t handle)
 Destroys a valid CG solver handle. More...
 
sparse_err_t sparse_cg_get_iter_count_dii (const sparse_cg_handle_t handle, size_t *const iters)
 Retrieves the number of iterations the given CG solver has employed. More...
 
sparse_err_t sparse_cg_get_iter_count_diz (const sparse_cg_handle_t handle, size_t *const iters)
 Retrieves the number of iterations the given CG solver has employed. More...
 
sparse_err_t sparse_cg_get_iter_count_dzz (const sparse_cg_handle_t handle, size_t *const iters)
 Retrieves the number of iterations the given CG solver has employed. More...
 
sparse_err_t sparse_cg_get_iter_count_sii (const sparse_cg_handle_t handle, size_t *const iters)
 Retrieves the number of iterations the given CG solver has employed. More...
 
sparse_err_t sparse_cg_get_iter_count_siz (const sparse_cg_handle_t handle, size_t *const iters)
 Retrieves the number of iterations the given CG solver has employed. More...
 
sparse_err_t sparse_cg_get_iter_count_szz (const sparse_cg_handle_t handle, size_t *const iters)
 Retrieves the number of iterations the given CG solver has employed. More...
 
sparse_err_t sparse_cg_get_preconditioner_dii (const sparse_cg_handle_t handle, sparse_cg_preconditioner_dxx_t *const preconditioner, void **const data)
 Retrieves the currently active preconditioner. More...
 
sparse_err_t sparse_cg_get_preconditioner_diz (const sparse_cg_handle_t handle, sparse_cg_preconditioner_dxx_t *const preconditioner, void **const data)
 Retrieves the currently active preconditioner. More...
 
sparse_err_t sparse_cg_get_preconditioner_dzz (const sparse_cg_handle_t handle, sparse_cg_preconditioner_dxx_t *const preconditioner, void **const data)
 Retrieves the currently active preconditioner. More...
 
sparse_err_t sparse_cg_get_preconditioner_sii (const sparse_cg_handle_t handle, sparse_cg_preconditioner_sxx_t *const preconditioner, void **const data)
 Retrieves the currently active preconditioner. More...
 
sparse_err_t sparse_cg_get_preconditioner_siz (const sparse_cg_handle_t handle, sparse_cg_preconditioner_sxx_t *const preconditioner, void **const data)
 Retrieves the currently active preconditioner. More...
 
sparse_err_t sparse_cg_get_preconditioner_szz (const sparse_cg_handle_t handle, sparse_cg_preconditioner_sxx_t *const preconditioner, void **const data)
 Retrieves the currently active preconditioner. More...
 
sparse_err_t sparse_cg_get_residual_dii (const sparse_cg_handle_t handle, double *const tol)
 Retrieves the residual the given CG solve has achieved. More...
 
sparse_err_t sparse_cg_get_residual_diz (const sparse_cg_handle_t handle, double *const tol)
 Retrieves the residual the given CG solve has achieved. More...
 
sparse_err_t sparse_cg_get_residual_dzz (const sparse_cg_handle_t handle, double *const tol)
 Retrieves the residual the given CG solve has achieved. More...
 
sparse_err_t sparse_cg_get_residual_sii (const sparse_cg_handle_t handle, float *const tol)
 Retrieves the residual the given CG solve has achieved. More...
 
sparse_err_t sparse_cg_get_residual_siz (const sparse_cg_handle_t handle, float *const tol)
 Retrieves the residual the given CG solve has achieved. More...
 
sparse_err_t sparse_cg_get_residual_szz (const sparse_cg_handle_t handle, float *const tol)
 Retrieves the residual the given CG solve has achieved. More...
 
sparse_err_t sparse_cg_get_size_dii (sparse_cg_handle_t const handle, size_t *const size)
 Retrieves the system size for a given CG solver handle. More...
 
sparse_err_t sparse_cg_get_size_diz (sparse_cg_handle_t const handle, size_t *const size)
 Retrieves the system size for a given CG solver handle. More...
 
sparse_err_t sparse_cg_get_size_dzz (sparse_cg_handle_t const handle, size_t *const size)
 Retrieves the system size for a given CG solver handle. More...
 
sparse_err_t sparse_cg_get_size_sii (sparse_cg_handle_t const handle, size_t *const size)
 Retrieves the system size for a given CG solver handle. More...
 
sparse_err_t sparse_cg_get_size_siz (sparse_cg_handle_t const handle, size_t *const size)
 Retrieves the system size for a given CG solver handle. More...
 
sparse_err_t sparse_cg_get_size_szz (sparse_cg_handle_t const handle, size_t *const size)
 Retrieves the system size for a given CG solver handle. More...
 
sparse_err_t sparse_cg_get_tolerance_dii (const sparse_cg_handle_t handle, double *const tol)
 Gets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_get_tolerance_diz (const sparse_cg_handle_t handle, double *const tol)
 Gets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_get_tolerance_dzz (const sparse_cg_handle_t handle, double *const tol)
 Gets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_get_tolerance_sii (const sparse_cg_handle_t handle, float *const tol)
 Gets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_get_tolerance_siz (const sparse_cg_handle_t handle, float *const tol)
 Gets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_get_tolerance_szz (const sparse_cg_handle_t handle, float *const tol)
 Gets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_init_dii (sparse_cg_handle_t *const handle, const size_t n, const double *const a, const int *const ja, const int *const ia)
 Initialises a sparse_cg_handle_t object. More...
 
sparse_err_t sparse_cg_init_diz (sparse_cg_handle_t *const handle, const size_t n, const double *const a, const int *const ja, const size_t *const ia)
 Initialises a sparse_cg_handle_t object. More...
 
sparse_err_t sparse_cg_init_dzz (sparse_cg_handle_t *const handle, const size_t n, const double *const a, const size_t *const ja, const size_t *const ia)
 Initialises a sparse_cg_handle_t object. More...
 
sparse_err_t sparse_cg_init_sii (sparse_cg_handle_t *const handle, const size_t n, const float *const a, const int *const ja, const int *const ia)
 Initialises a sparse_cg_handle_t object. More...
 
sparse_err_t sparse_cg_init_siz (sparse_cg_handle_t *const handle, const size_t n, const float *const a, const int *const ja, const size_t *const ia)
 Initialises a sparse_cg_handle_t object. More...
 
sparse_err_t sparse_cg_init_szz (sparse_cg_handle_t *const handle, const size_t n, const float *const a, const size_t *const ja, const size_t *const ia)
 Initialises a sparse_cg_handle_t object. More...
 
sparse_err_t sparse_cg_set_max_iter_count_dii (sparse_cg_handle_t handle, const size_t max_iters)
 Sets the current maximum number of iterations for the given CG solver. More...
 
sparse_err_t sparse_cg_set_max_iter_count_diz (sparse_cg_handle_t handle, const size_t max_iters)
 Sets the current maximum number of iterations for the given CG solver. More...
 
sparse_err_t sparse_cg_set_max_iter_count_dzz (sparse_cg_handle_t handle, const size_t max_iters)
 Sets the current maximum number of iterations for the given CG solver. More...
 
sparse_err_t sparse_cg_set_max_iter_count_sii (sparse_cg_handle_t handle, const size_t max_iters)
 Sets the current maximum number of iterations for the given CG solver. More...
 
sparse_err_t sparse_cg_set_max_iter_count_siz (sparse_cg_handle_t handle, const size_t max_iters)
 Sets the current maximum number of iterations for the given CG solver. More...
 
sparse_err_t sparse_cg_set_max_iter_count_szz (sparse_cg_handle_t handle, const size_t max_iters)
 Sets the current maximum number of iterations for the given CG solver. More...
 
sparse_err_t sparse_cg_set_preconditioner_dii (const sparse_cg_handle_t handle, const sparse_cg_preconditioner_dxx_t preconditioner, void *const data)
 Sets a new preconditioner to apply during a next solve call. More...
 
sparse_err_t sparse_cg_set_preconditioner_diz (const sparse_cg_handle_t handle, const sparse_cg_preconditioner_dxx_t preconditioner, void *const data)
 Sets a new preconditioner to apply during a next solve call. More...
 
sparse_err_t sparse_cg_set_preconditioner_dzz (const sparse_cg_handle_t handle, const sparse_cg_preconditioner_dxx_t preconditioner, void *const data)
 Sets a new preconditioner to apply during a next solve call. More...
 
sparse_err_t sparse_cg_set_preconditioner_sii (const sparse_cg_handle_t handle, const sparse_cg_preconditioner_sxx_t preconditioner, void *const data)
 Sets a new preconditioner to apply during a next solve call. More...
 
sparse_err_t sparse_cg_set_preconditioner_siz (const sparse_cg_handle_t handle, const sparse_cg_preconditioner_sxx_t preconditioner, void *const data)
 Sets a new preconditioner to apply during a next solve call. More...
 
sparse_err_t sparse_cg_set_preconditioner_szz (const sparse_cg_handle_t handle, const sparse_cg_preconditioner_sxx_t preconditioner, void *const data)
 Sets a new preconditioner to apply during a next solve call. More...
 
sparse_err_t sparse_cg_set_tolerance_dii (sparse_cg_handle_t handle, const double tol)
 Sets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_set_tolerance_diz (sparse_cg_handle_t handle, const double tol)
 Sets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_set_tolerance_dzz (sparse_cg_handle_t handle, const double tol)
 Sets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_set_tolerance_sii (sparse_cg_handle_t handle, const float tol)
 Sets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_set_tolerance_siz (sparse_cg_handle_t handle, const float tol)
 Sets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_set_tolerance_szz (sparse_cg_handle_t handle, const float tol)
 Sets the current accepted relative tolerance for the given CG solver. More...
 
sparse_err_t sparse_cg_solve_dii (sparse_cg_handle_t handle, double *const x, const double *const b)
 Executes a solve using a given CG solver handle, a given right-hand side b, and an initial guess x. More...
 
sparse_err_t sparse_cg_solve_diz (sparse_cg_handle_t handle, double *const x, const double *const b)
 Executes a solve using a given CG solver handle, a given right-hand side b, and an initial guess x. More...
 
sparse_err_t sparse_cg_solve_dzz (sparse_cg_handle_t handle, double *const x, const double *const b)
 Executes a solve using a given CG solver handle, a given right-hand side b, and an initial guess x. More...
 
sparse_err_t sparse_cg_solve_sii (sparse_cg_handle_t handle, float *const x, const float *const b)
 Executes a solve using a given CG solver handle, a given right-hand side b, and an initial guess x. More...
 
sparse_err_t sparse_cg_solve_siz (sparse_cg_handle_t handle, float *const x, const float *const b)
 Executes a solve using a given CG solver handle, a given right-hand side b, and an initial guess x. More...
 
sparse_err_t sparse_cg_solve_szz (sparse_cg_handle_t handle, float *const x, const float *const b)
 Executes a solve using a given CG solver handle, a given right-hand side b, and an initial guess x. More...
 

Detailed Description

Defines the solver transition path API.

See also
blas_sparse.h for the SparseBLAS transition path API
spblas_impl.h for the SpBLAS transition path API
Author
A. N. Yzelman
Date
5th of October, 2023