107 #ifndef _H_ALP_SPARSE_LINSOLVERS 108 #define _H_ALP_SPARSE_LINSOLVERS 211 const double *
const,
250 const float *
const a,
const int *
const ja,
const int *
const ia
263 const double *
const a,
const int *
const ja,
const int *
const ia
277 const float *
const a,
const int *
const ja,
const size_t *
const ia
291 const double *
const a,
const int *
const ja,
const size_t *
const ia
305 const float *
const a,
const size_t *
const ja,
const size_t *
const ia
319 const double *
const a,
const size_t *
const ja,
const size_t *
const ia
1661 #endif // end ifdef _H_ALP_LINSOLVERS 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.
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.
Illegal NULL pointer provided as argument.
Definition: solver.h:128
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.
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.
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.
sparse_err_t sparse_cg_destroy_siz(sparse_cg_handle_t handle)
Destroys a valid CG solver handle.
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.
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.
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.
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.
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.
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.
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.
sparse_err_t sparse_cg_destroy_sii(sparse_cg_handle_t handle)
Destroys a valid CG solver handle.
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.
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...
Definition: solver.h:182
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.
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.
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.
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.
sparse_err_t sparse_cg_destroy_szz(sparse_cg_handle_t handle)
Destroys a valid CG solver handle.
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.
sparse_err_t sparse_cg_destroy_dii(sparse_cg_handle_t handle)
Destroys a valid CG solver handle.
void * sparse_cg_handle_t
A solver handle for the Conjugate Gradient algorithm.
Definition: solver.h:159
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.
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.
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.
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.
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.
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.
An unknown error has been encountered.
Definition: solver.h:152
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.
sparse_err_t sparse_cg_destroy_diz(sparse_cg_handle_t handle)
Destroys a valid CG solver handle.
sparse_err_t sparse_cg_destroy_dzz(sparse_cg_handle_t handle)
Destroys a valid CG solver handle.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
The call has completed successfully.
Definition: solver.h:123
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.
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.
sparse_err_t
The various error codes sparse solver library functions may return.
Definition: solver.h:120
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.
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.
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.
Out of memory error detected during call.
Definition: solver.h:138
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.
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.
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.
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.
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.
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.
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...
Definition: solver.h:209
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.
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.
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.
size_t size(const Vector< DataType, backend, Coords > &x) noexcept
Request the size of a given vector.
Definition: io.hpp:235
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.
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.
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.
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.
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.
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.
The algorithm has failed achieving its intended result.
Definition: solver.h:144
Illegal argument provided.
Definition: solver.h:133
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.
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.
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.