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
qr.hpp File Reference

Implementation of a simultaneous QR factorization of multiple matrices. Experimental. More...

#include <utility>
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <vector>
#include <math.h>
#include <cmath>
#include <sstream>
#include "viennacl/ocl/backend.hpp"
#include "boost/numeric/ublas/vector.hpp"
#include "boost/numeric/ublas/matrix.hpp"
#include "boost/numeric/ublas/matrix_proxy.hpp"
#include "boost/numeric/ublas/storage.hpp"
#include "boost/numeric/ublas/io.hpp"
#include "boost/numeric/ublas/matrix_expression.hpp"
#include "boost/numeric/ublas/detail/matrix_assign.hpp"
#include "viennacl/vector.hpp"
#include "viennacl/matrix.hpp"
#include "viennacl/linalg/detail/spai/block_matrix.hpp"
#include "viennacl/linalg/detail/spai/block_vector.hpp"
#include "viennacl/linalg/opencl/kernels/spai.hpp"

Go to the source code of this file.

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 T , typename InputIteratorT >
void viennacl::linalg::detail::spai::Print (std::ostream &ostr, InputIteratorT it_begin, InputIteratorT it_end)
 
template<typename VectorT , typename MatrixT >
void viennacl::linalg::detail::spai::write_to_block (VectorT &con_A_I_J, unsigned int start_ind, std::vector< unsigned int > const &I, std::vector< unsigned int > const &J, MatrixT &m)
 
template<typename VectorT >
void viennacl::linalg::detail::spai::print_continious_matrix (VectorT &con_A_I_J, std::vector< cl_uint > &blocks_ind, std::vector< std::vector< unsigned int > > const &g_I, std::vector< std::vector< unsigned int > > const &g_J)
 
template<typename VectorT >
void viennacl::linalg::detail::spai::print_continious_vector (VectorT &con_v, std::vector< cl_uint > &block_ind, std::vector< std::vector< unsigned int > > const &g_J)
 
void viennacl::linalg::detail::spai::compute_blocks_size (std::vector< std::vector< unsigned int > > const &g_I, std::vector< std::vector< unsigned int > > const &g_J, unsigned int &sz, std::vector< cl_uint > &blocks_ind, std::vector< cl_uint > &matrix_dims)
 **************************************** BLOCK FUNCTIONS ************************************// More...
 
template<typename SizeT >
void viennacl::linalg::detail::spai::get_size (std::vector< std::vector< SizeT > > const &inds, SizeT &size)
 Computes size of particular container of index set. More...
 
template<typename SizeT >
void viennacl::linalg::detail::spai::init_start_inds (std::vector< std::vector< SizeT > > const &inds, std::vector< cl_uint > &start_inds)
 Initializes start indices of particular index set. More...
 
template<typename MatrixT , typename NumericT >
void viennacl::linalg::detail::spai::dot_prod (MatrixT const &A, unsigned int beg_ind, NumericT &res)
 Dot prod of particular column of martix A with it's self starting at a certain index beg_ind. More...
 
template<typename MatrixT , typename VectorT , typename NumericT >
void viennacl::linalg::detail::spai::custom_inner_prod (MatrixT const &A, VectorT const &v, unsigned int col_ind, unsigned int start_ind, NumericT &res)
 Dot prod of particular matrix column with arbitrary vector: A(:, col_ind) More...
 
template<typename MatrixT , typename VectorT >
void viennacl::linalg::detail::spai::copy_vector (MatrixT const &A, VectorT &v, unsigned int beg_ind)
 Copying part of matrix column. More...
 
template<typename MatrixT , typename VectorT , typename NumericT >
void viennacl::linalg::detail::spai::householder_vector (MatrixT const &A, unsigned int j, VectorT &v, NumericT &b)
 Computation of Householder vector, householder reflection c.f. Gene H. Golub, Charles F. Van Loan "Matrix Computations" 3rd edition p.210. More...
 
template<typename MatrixT , typename VectorT , typename NumericT >
void viennacl::linalg::detail::spai::apply_householder_reflection (MatrixT &A, unsigned int iter_cnt, VectorT &v, NumericT b)
 Inplace application of Householder vector to a matrix A. More...
 
template<typename MatrixT , typename VectorT >
void viennacl::linalg::detail::spai::store_householder_vector (MatrixT &A, unsigned int ind, VectorT &v)
 Storage of vector v in column(A, ind), starting from ind-1 index of a column. More...
 
template<typename MatrixT , typename VectorT >
void viennacl::linalg::detail::spai::single_qr (MatrixT &R, VectorT &b_v)
 Inplace QR factorization via Householder reflections c.f. Gene H. Golub, Charles F. Van Loan "Matrix Computations" 3rd edition p.224. More...
 
template<typename SizeT >
void viennacl::linalg::detail::spai::get_max_block_size (std::vector< std::vector< SizeT > > const &inds, SizeT &max_size)
 Getting max size of rows/columns from container of index set. More...
 
template<typename MatrixT , typename VectorT , typename NumericT >
void viennacl::linalg::detail::spai::custom_dot_prod (MatrixT const &A, VectorT const &v, unsigned int ind, NumericT &res)
 Dot_prod(column(A, ind), v) starting from index ind+1. More...
 
template<typename MatrixT , typename VectorT >
void viennacl::linalg::detail::spai::apply_q_trans_vec (MatrixT const &R, VectorT const &b_v, VectorT &y)
 Recovery Q from matrix R and vector of betas b_v. More...
 
template<typename MatrixT , typename VectorT >
void viennacl::linalg::detail::spai::apply_q_trans_mat (MatrixT const &R, VectorT const &b_v, MatrixT &A)
 Multiplication of Q'*A, where Q is in implicit for lower part of R and vector of betas - b_v. More...
 
template<typename NumericT >
void viennacl::linalg::detail::spai::block_qr (std::vector< std::vector< unsigned int > > &g_I, std::vector< std::vector< unsigned int > > &g_J, block_matrix &g_A_I_J_vcl, block_vector &g_bv_vcl, std::vector< cl_uint > &g_is_update, viennacl::context ctx)
 Inplace QR factorization via Householder reflections c.f. Gene H. Golub, Charles F. Van Loan "Matrix Computations" 3rd edition p.224 performed on GPU. More...
 

Detailed Description

Implementation of a simultaneous QR factorization of multiple matrices. Experimental.

SPAI code contributed by Nikolay Lukash

Definition in file qr.hpp.