1#ifndef VIENNASHE_SOLVERS_SOLVE_HPP
2#define VIENNASHE_SOLVERS_SOLVE_HPP
28#include "viennacl/linalg/norm_2.hpp"
47 template <
typename MatrixType,
50 VectorType
const & rhs,
63 VectorType result(rhs.size());
64 std::fill(result.begin(), result.end(), 0);
78#ifdef VIENNASHE_HAVE_GPU_SOLVER
Convenience header file for all the ViennaCL solver bindings.
Defines a set of checker functors for micro-tests within ViennaSHE.
The main SHE configuration class. To be adjusted by the user for his/her needs.
Internal tag used for the specification of a dense linear solver (Gauss, single-threaded)
Internal tag used for the specification of a GPU-accelerated linear solver.
Exception for the case that an invalid solver is in use.
A configuration class holding options for use within the different linear solvers.
Internal tag used for the specification of a CPU-based multi-threaded linear solver.
Internal tag used for the specification of a CPU-based PETSC solver.
Internal tag used for the specification of a single-threaded linear solver.
Exception for the case that a linear solver fails (typically with NaN due to zero inner product)
Implements a dense Gauss solver.
VectorType::value_type norm_2(VectorType const &v)
VectorType solve_impl(MatrixType &system_matrix, VectorType const &rhs, linear_solver_config const &config)
Public interface for solving a system of linear equations.
std::vector< double > solve(viennashe::math::sparse_matrix< double > &A, std::vector< double > const &b, linear_solver_config const &config)
Public interface for solving a system of linear equations represented using a sparse matrix.
long matrix_consistency_check(MatrixType const &matrix)
Checks a matrix for empty rows.
void check_vector_for_valid_entries(VectorType const &vec, std::string message="Location not specified")
Checks a vector for valid entries (i.e. no NaN).
The main ViennaSHE namespace. All functionality resides inside this namespace.
The SHE configuration class is defined here.
Provides the exceptions used inside the viennashe::she namespace.
@ petsc_parallel_AMGX_solver
PETSC-assisted solver (Hypre AMG)
@ gpu_parallel_linear_solver
multi-threaded solver (block ILUT)
@ parallel_linear_solver
single-threaded solver (using ILUT)
@ serial_linear_solver
Gauss solver (use for systems up to ~1000-by-1000 only)
@ petsc_parallel_linear_solver
gpu-assisted solver (block ILUT)