ViennaCL - The Vienna Computing Library: viennacl/linalg/detail/spai/spai-dynamic.hpp File Reference

ViennaCL - The Vienna Computing Library 1.7.1 Free open-source GPU-accelerated linear algebra and solver library. |

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions
spai-dynamic.hpp File Reference

Implementation of a dynamic SPAI. Provides the routines for automatic pattern updates Experimental. More...

`#include <utility>`
`#include <iostream>`
`#include <fstream>`
`#include <string>`
`#include <algorithm>`
`#include <vector>`
`#include <math.h>`
`#include <map>`
`#include "boost/numeric/ublas/vector.hpp"`
`#include "boost/numeric/ublas/matrix.hpp"`
`#include "boost/numeric/ublas/matrix_proxy.hpp"`
`#include "boost/numeric/ublas/vector_proxy.hpp"`
`#include "boost/numeric/ublas/storage.hpp"`
`#include "boost/numeric/ublas/io.hpp"`
`#include "boost/numeric/ublas/lu.hpp"`
`#include "boost/numeric/ublas/triangular.hpp"`
`#include "boost/numeric/ublas/matrix_expression.hpp"`
`#include "viennacl/linalg/prod.hpp"`
`#include "viennacl/matrix.hpp"`
`#include "viennacl/compressed_matrix.hpp"`
`#include "viennacl/linalg/sparse_matrix_operations.hpp"`
`#include "viennacl/linalg/matrix_operations.hpp"`
`#include "viennacl/scalar.hpp"`
`#include "viennacl/linalg/cg.hpp"`
`#include "viennacl/linalg/inner_prod.hpp"`
`#include "viennacl/linalg/ilu.hpp"`
`#include "viennacl/ocl/backend.hpp"`
`#include "viennacl/linalg/detail/spai/block_matrix.hpp"`
`#include "viennacl/linalg/detail/spai/block_vector.hpp"`
`#include "viennacl/linalg/detail/spai/qr.hpp"`
`#include "viennacl/linalg/detail/spai/spai-static.hpp"`
`#include "viennacl/linalg/detail/spai/spai.hpp"`
`#include "viennacl/linalg/detail/spai/spai_tag.hpp"`
`#include "viennacl/linalg/opencl/kernels/spai.hpp"`

Go to the source code of this file.

## Classes
struct | viennacl::linalg::detail::spai::CompareSecond
| Helper functor for comparing std::pair<> based on the second member. More...

## 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.
| viennacl::linalg::detail::spai
| Implementation namespace for sparse approximate inverse preconditioner.

## Functions
template<typename MatrixT >
void | viennacl::linalg::detail::spai::composeNewR (MatrixT const &A, MatrixT const &R_n, MatrixT &R)
| Composition of new matrix R, that is going to be used in Least Square problem solving. More...
template<typename VectorT >
void | viennacl::linalg::detail::spai::composeNewVector (VectorT const &v_n, VectorT &v)
| Composition of new vector of coefficients beta from QR factorizations(necessary for Q recovery) More...
template<typename SparseVectorT , typename NumericT >
void | viennacl::linalg::detail::spai::sparse_norm_2 (SparseVectorT const &v, NumericT &norm)
| Computation of Euclidean norm for sparse vector. More...
template<typename SparseVectorT , typename NumericT >
void | viennacl::linalg::detail::spai::sparse_inner_prod (SparseVectorT const &v1, SparseVectorT const &v2, NumericT &res_v)
| Dot product of two sparse vectors. More...
template<typename SparseVectorT , typename NumericT >
bool | viennacl::linalg::detail::spai::buildAugmentedIndexSet (std::vector< SparseVectorT > const &A_v_c, SparseVectorT const &res, std::vector< unsigned int > &J, std::vector< unsigned int > &J_u, spai_tag const &tag)
| Building a new set of column indices J_u, cf. Kallischko dissertation p.31. More...
template<typename SparseVectorT >
void | viennacl::linalg::detail::spai::buildNewRowSet (std::vector< SparseVectorT > const &A_v_c, std::vector< unsigned int > const &I, std::vector< unsigned int > const &J_n, std::vector< unsigned int > &I_n)
| Building a new indices to current set of row indices I_n, cf. Kallischko dissertation p.32. More...
template<typename MatrixT >
void | viennacl::linalg::detail::spai::QRBlockComposition (MatrixT const &A_I_J, MatrixT const &A_I_J_u, MatrixT &A_I_u_J_u)
| Composition of new block for QR factorization cf. Kallischko dissertation p.82, figure 4.7. More...
template<typename SparseMatrixT , typename SparseVectorT , typename DenseMatrixT , typename VectorT >
void | viennacl::linalg::detail::spai::block_update (SparseMatrixT const &A, std::vector< SparseVectorT > const &A_v_c, std::vector< SparseVectorT > &g_res, std::vector< bool > &g_is_update, std::vector< std::vector< unsigned int > > &g_I, std::vector< std::vector< unsigned int > > &g_J, std::vector< VectorT > &g_b_v, std::vector< DenseMatrixT > &g_A_I_J, spai_tag const &tag)
| CPU-based dynamic update for SPAI preconditioner. More...
template<typename NumericT >
void | viennacl::linalg::detail::spai::block_q_multiplication (std::vector< std::vector< unsigned int > > const &g_J_u, std::vector< std::vector< unsigned int > > const &g_I, block_matrix &g_A_I_J_vcl, block_vector &g_bv_vcl, block_matrix &g_A_I_J_u_vcl, std::vector< cl_uint > &g_is_update, viennacl::context ctx)
| Performs multiplication Q'*A(I, \tilde J) on GPU. More...
template<typename SizeT >
void | viennacl::linalg::detail::spai::assemble_qr_row_inds (std::vector< std::vector< SizeT > > const &g_I, std::vector< std::vector< SizeT > > const &g_J, std::vector< std::vector< SizeT > > const &g_I_u, std::vector< std::vector< SizeT > > &g_I_q)
| Assembly of container of index row sets: I_q, row indices for new "QR block". More...
template<typename NumericT >
void | viennacl::linalg::detail::spai::assemble_qr_block (std::vector< std::vector< unsigned int > > const &g_J, std::vector< std::vector< unsigned int > > const &g_I, std::vector< std::vector< unsigned int > > const &g_J_u, std::vector< std::vector< unsigned int > > const &g_I_u, std::vector< std::vector< unsigned int > > &g_I_q, block_matrix &g_A_I_J_u_vcl, viennacl::ocl::handle< cl_mem > &matrix_dimensions, block_matrix &g_A_I_u_J_u_vcl, std::vector< cl_uint > &g_is_update, bool is_empty_block, viennacl::context ctx)
| Performs assembly for new QR block. More...
template<typename NumericT >
void | viennacl::linalg::detail::spai::assemble_r (std::vector< std::vector< unsigned int > > &g_I, std::vector< std::vector< unsigned int > > &g_J, block_matrix &g_A_I_J_vcl, block_matrix &g_A_I_J_u_vcl, block_matrix &g_A_I_u_J_u_vcl, block_vector &g_bv_vcl, block_vector &g_bv_vcl_u, std::vector< cl_uint > &g_is_update, viennacl::context ctx)
| Performs assembly for new R matrix on GPU. More...
template<typename NumericT , unsigned int AlignmentV, typename SparseVectorT >
void | viennacl::linalg::detail::spai::block_update (viennacl::compressed_matrix< NumericT, AlignmentV > const &A, std::vector< SparseVectorT > const &A_v_c, std::vector< cl_uint > &g_is_update, std::vector< SparseVectorT > &g_res, std::vector< std::vector< unsigned int > > &g_J, std::vector< std::vector< unsigned int > > &g_I, block_matrix &g_A_I_J_vcl, block_vector &g_bv_vcl, spai_tag const &tag)
| GPU-based block update. More...

## Detailed Description

Implementation of a dynamic SPAI. Provides the routines for automatic pattern updates Experimental.

SPAI code contributed by Nikolay Lukash

Definition in file spai-dynamic.hpp.