ViennaCL - The Vienna Computing Library  1.6.2
Free open-source GPU-accelerated linear algebra and solver library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cg.hpp File Reference

The conjugate gradient method is implemented here. More...

#include <vector>
#include <map>
#include <cmath>
#include <numeric>
#include "viennacl/forwards.h"
#include "viennacl/tools/tools.hpp"
#include "viennacl/linalg/ilu.hpp"
#include "viennacl/linalg/prod.hpp"
#include "viennacl/linalg/inner_prod.hpp"
#include "viennacl/linalg/norm_2.hpp"
#include "viennacl/traits/clear.hpp"
#include "viennacl/traits/size.hpp"
#include "viennacl/meta/result_of.hpp"
#include "viennacl/linalg/iterative_operations.hpp"

Go to the source code of this file.

Classes

class  viennacl::linalg::cg_tag
 A tag for the conjugate gradient Used for supplying solver parameters and for dispatching the solve() function. More...
 
class  viennacl::linalg::detail::z_handler< VectorT, PreconditionerT >
 handles the no_precond case at minimal overhead More...
 
class  viennacl::linalg::detail::z_handler< VectorT, viennacl::linalg::no_precond >
 

Namespaces

 viennacl
 Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
 
 viennacl::linalg
 Provides all linear algebra operations which are not covered by operator overloads.
 
 viennacl::linalg::detail
 Namespace holding implementation details for linear algebra routines. Usually not of interest for a library user.
 

Functions

template<typename MatrixT , typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::detail::pipelined_solve (MatrixT const &A, viennacl::vector< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Implementation of a pipelined conjugate gradient algorithm (no preconditioner), specialized for ViennaCL types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::compressed_matrix< NumericT > const &A, viennacl::vector_base< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::compressed_matrix< NumericT > const &A, viennacl::vector< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::compressed_matrix< NumericT > const &A, viennacl::vector_range< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::compressed_matrix< NumericT > const &A, viennacl::vector_slice< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::coordinate_matrix< NumericT > const &A, viennacl::vector_base< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::coordinate_matrix< NumericT > const &A, viennacl::vector< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::coordinate_matrix< NumericT > const &A, viennacl::vector_range< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::coordinate_matrix< NumericT > const &A, viennacl::vector_slice< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::ell_matrix< NumericT > const &A, viennacl::vector_base< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::ell_matrix< NumericT > const &A, viennacl::vector< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::ell_matrix< NumericT > const &A, viennacl::vector_range< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::ell_matrix< NumericT > const &A, viennacl::vector_slice< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::sliced_ell_matrix< NumericT > const &A, viennacl::vector_base< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::sliced_ell_matrix< NumericT > const &A, viennacl::vector< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::sliced_ell_matrix< NumericT > const &A, viennacl::vector_range< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::sliced_ell_matrix< NumericT > const &A, viennacl::vector_slice< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::hyb_matrix< NumericT > const &A, viennacl::vector_base< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::hyb_matrix< NumericT > const &A, viennacl::vector< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::hyb_matrix< NumericT > const &A, viennacl::vector_range< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename NumericT >
viennacl::vector< NumericT > viennacl::linalg::solve (viennacl::hyb_matrix< NumericT > const &A, viennacl::vector_slice< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
 Overload for the pipelined BiCGStab implementation for the ViennaCL sparse matrix types. More...
 
template<typename MatrixT , typename VectorT , typename PreconditionerT >
VectorT viennacl::linalg::solve (MatrixT const &matrix, VectorT const &rhs, cg_tag const &tag, PreconditionerT const &precond)
 Implementation of the preconditioned conjugate gradient solver, generic implementation for non-ViennaCL types. More...
 
template<typename MatrixT , typename VectorT >
VectorT viennacl::linalg::solve (MatrixT const &matrix, VectorT const &rhs, cg_tag const &tag)
 

Detailed Description

The conjugate gradient method is implemented here.

Definition in file cg.hpp.