ViennaCL - The Vienna Computing Library  1.5.1
Namespaces | Functions
sparse_matrix_operations.hpp File Reference

Implementations of operations using sparse matrices on the CPU using a single thread or OpenMP. More...

#include <list>
#include "viennacl/forwards.h"
#include "viennacl/scalar.hpp"
#include "viennacl/vector.hpp"
#include "viennacl/tools/tools.hpp"
#include "viennacl/linalg/host_based/common.hpp"
#include "viennacl/linalg/host_based/vector_operations.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::host_based
 Holds all compute kernels with conventional host-based execution (buffers in CPU RAM).
 
 viennacl::linalg::host_based::detail
 Helper functions for the host-based linear algebra backend.
 

Functions

template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void row_info (compressed_matrix< ScalarType, MAT_ALIGNMENT > const &mat, vector_base< ScalarType > &vec, viennacl::linalg::detail::row_info_types info_selector)
 
template<class ScalarType , unsigned int ALIGNMENT>
void prod_impl (const viennacl::compressed_matrix< ScalarType, ALIGNMENT > &mat, const viennacl::vector_base< ScalarType > &vec, viennacl::vector_base< ScalarType > &result)
 Carries out matrix-vector multiplication with a compressed_matrix. More...
 
template<class ScalarType , typename NumericT , unsigned int ALIGNMENT, typename F1 , typename F2 >
void prod_impl (const viennacl::compressed_matrix< ScalarType, ALIGNMENT > &sp_mat, const viennacl::matrix_base< NumericT, F1 > &d_mat, viennacl::matrix_base< NumericT, F2 > &result)
 Carries out sparse_matrix-matrix multiplication first matrix being compressed. More...
 
template<class ScalarType , typename NumericT , unsigned int ALIGNMENT, typename F1 , typename F2 >
void prod_impl (const viennacl::compressed_matrix< ScalarType, ALIGNMENT > &sp_mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT, F1 >, const viennacl::matrix_base< NumericT, F1 >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT, F2 > &result)
 Carries out matrix-trans(matrix) multiplication first matrix being compressed and the second transposed. More...
 
template<typename NumericT , typename ConstScalarTypeArray , typename ScalarTypeArray , typename SizeTypeArray >
void csr_inplace_solve (SizeTypeArray const &row_buffer, SizeTypeArray const &col_buffer, ConstScalarTypeArray const &element_buffer, ScalarTypeArray &vec_buffer, vcl_size_t num_cols, viennacl::linalg::unit_lower_tag)
 
template<typename NumericT , typename ConstScalarTypeArray , typename ScalarTypeArray , typename SizeTypeArray >
void csr_inplace_solve (SizeTypeArray const &row_buffer, SizeTypeArray const &col_buffer, ConstScalarTypeArray const &element_buffer, ScalarTypeArray &vec_buffer, vcl_size_t num_cols, viennacl::linalg::lower_tag)
 
template<typename NumericT , typename ConstScalarTypeArray , typename ScalarTypeArray , typename SizeTypeArray >
void csr_inplace_solve (SizeTypeArray const &row_buffer, SizeTypeArray const &col_buffer, ConstScalarTypeArray const &element_buffer, ScalarTypeArray &vec_buffer, vcl_size_t num_cols, viennacl::linalg::unit_upper_tag)
 
template<typename NumericT , typename ConstScalarTypeArray , typename ScalarTypeArray , typename SizeTypeArray >
void csr_inplace_solve (SizeTypeArray const &row_buffer, SizeTypeArray const &col_buffer, ConstScalarTypeArray const &element_buffer, ScalarTypeArray &vec_buffer, vcl_size_t num_cols, viennacl::linalg::upper_tag)
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void inplace_solve (compressed_matrix< ScalarType, MAT_ALIGNMENT > const &L, vector_base< ScalarType > &vec, viennacl::linalg::unit_lower_tag tag)
 Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions. More...
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void inplace_solve (compressed_matrix< ScalarType, MAT_ALIGNMENT > const &L, vector_base< ScalarType > &vec, viennacl::linalg::lower_tag tag)
 Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions. More...
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void inplace_solve (compressed_matrix< ScalarType, MAT_ALIGNMENT > const &U, vector_base< ScalarType > &vec, viennacl::linalg::unit_upper_tag tag)
 Inplace solution of a upper triangular compressed_matrix with unit diagonal. Typically used for LU substitutions. More...
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void inplace_solve (compressed_matrix< ScalarType, MAT_ALIGNMENT > const &U, vector_base< ScalarType > &vec, viennacl::linalg::upper_tag tag)
 Inplace solution of a upper triangular compressed_matrix. Typically used for LU substitutions. More...
 
template<typename NumericT , typename ConstScalarTypeArray , typename ScalarTypeArray , typename SizeTypeArray >
void csr_trans_inplace_solve (SizeTypeArray const &row_buffer, SizeTypeArray const &col_buffer, ConstScalarTypeArray const &element_buffer, ScalarTypeArray &vec_buffer, vcl_size_t num_cols, viennacl::linalg::unit_lower_tag)
 
template<typename NumericT , typename ConstScalarTypeArray , typename ScalarTypeArray , typename SizeTypeArray >
void csr_trans_inplace_solve (SizeTypeArray const &row_buffer, SizeTypeArray const &col_buffer, ConstScalarTypeArray const &element_buffer, ScalarTypeArray &vec_buffer, vcl_size_t num_cols, viennacl::linalg::lower_tag)
 
template<typename NumericT , typename ConstScalarTypeArray , typename ScalarTypeArray , typename SizeTypeArray >
void csr_trans_inplace_solve (SizeTypeArray const &row_buffer, SizeTypeArray const &col_buffer, ConstScalarTypeArray const &element_buffer, ScalarTypeArray &vec_buffer, vcl_size_t num_cols, viennacl::linalg::unit_upper_tag)
 
template<typename NumericT , typename ConstScalarTypeArray , typename ScalarTypeArray , typename SizeTypeArray >
void csr_trans_inplace_solve (SizeTypeArray const &row_buffer, SizeTypeArray const &col_buffer, ConstScalarTypeArray const &element_buffer, ScalarTypeArray &vec_buffer, vcl_size_t num_cols, viennacl::linalg::upper_tag)
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void block_inplace_solve (const matrix_expression< const compressed_matrix< ScalarType, MAT_ALIGNMENT >, const compressed_matrix< ScalarType, MAT_ALIGNMENT >, op_trans > &L, viennacl::backend::mem_handle const &, vcl_size_t, vector_base< ScalarType > const &, vector_base< ScalarType > &vec, viennacl::linalg::unit_lower_tag)
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void block_inplace_solve (const matrix_expression< const compressed_matrix< ScalarType, MAT_ALIGNMENT >, const compressed_matrix< ScalarType, MAT_ALIGNMENT >, op_trans > &L, viennacl::backend::mem_handle const &, vcl_size_t, vector_base< ScalarType > const &L_diagonal, vector_base< ScalarType > &vec, viennacl::linalg::lower_tag)
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void block_inplace_solve (const matrix_expression< const compressed_matrix< ScalarType, MAT_ALIGNMENT >, const compressed_matrix< ScalarType, MAT_ALIGNMENT >, op_trans > &U, viennacl::backend::mem_handle const &, vcl_size_t, vector_base< ScalarType > const &, vector_base< ScalarType > &vec, viennacl::linalg::unit_upper_tag)
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void block_inplace_solve (const matrix_expression< const compressed_matrix< ScalarType, MAT_ALIGNMENT >, const compressed_matrix< ScalarType, MAT_ALIGNMENT >, op_trans > &U, viennacl::backend::mem_handle const &, vcl_size_t, vector_base< ScalarType > const &U_diagonal, vector_base< ScalarType > &vec, viennacl::linalg::upper_tag)
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void inplace_solve (matrix_expression< const compressed_matrix< ScalarType, MAT_ALIGNMENT >, const compressed_matrix< ScalarType, MAT_ALIGNMENT >, op_trans > const &proxy, vector_base< ScalarType > &vec, viennacl::linalg::unit_lower_tag tag)
 Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions. More...
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void inplace_solve (matrix_expression< const compressed_matrix< ScalarType, MAT_ALIGNMENT >, const compressed_matrix< ScalarType, MAT_ALIGNMENT >, op_trans > const &proxy, vector_base< ScalarType > &vec, viennacl::linalg::lower_tag tag)
 Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions. More...
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void inplace_solve (matrix_expression< const compressed_matrix< ScalarType, MAT_ALIGNMENT >, const compressed_matrix< ScalarType, MAT_ALIGNMENT >, op_trans > const &proxy, vector_base< ScalarType > &vec, viennacl::linalg::unit_upper_tag tag)
 Inplace solution of a upper triangular compressed_matrix with unit diagonal. Typically used for LU substitutions. More...
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void inplace_solve (matrix_expression< const compressed_matrix< ScalarType, MAT_ALIGNMENT >, const compressed_matrix< ScalarType, MAT_ALIGNMENT >, op_trans > const &proxy, vector_base< ScalarType > &vec, viennacl::linalg::upper_tag tag)
 Inplace solution of a upper triangular compressed_matrix with unit diagonal. Typically used for LU substitutions. More...
 
template<class ScalarType >
void prod_impl (const viennacl::compressed_compressed_matrix< ScalarType > &mat, const viennacl::vector_base< ScalarType > &vec, viennacl::vector_base< ScalarType > &result)
 Carries out matrix-vector multiplication with a compressed_matrix. More...
 
template<typename ScalarType , unsigned int MAT_ALIGNMENT>
void row_info (coordinate_matrix< ScalarType, MAT_ALIGNMENT > const &mat, vector_base< ScalarType > &vec, viennacl::linalg::detail::row_info_types info_selector)
 
template<class ScalarType , unsigned int ALIGNMENT>
void prod_impl (const viennacl::coordinate_matrix< ScalarType, ALIGNMENT > &mat, const viennacl::vector_base< ScalarType > &vec, viennacl::vector_base< ScalarType > &result)
 Carries out matrix-vector multiplication with a coordinate_matrix. More...
 
template<class ScalarType , unsigned int ALIGNMENT, class NumericT , typename F1 , typename F2 >
void prod_impl (const viennacl::coordinate_matrix< ScalarType, ALIGNMENT > &sp_mat, const viennacl::matrix_base< NumericT, F1 > &d_mat, viennacl::matrix_base< NumericT, F2 > &result)
 Carries out Compressed Matrix(COO)-Dense Matrix multiplication. More...
 
template<class ScalarType , unsigned int ALIGNMENT, class NumericT , typename F1 , typename F2 >
void prod_impl (const viennacl::coordinate_matrix< ScalarType, ALIGNMENT > &sp_mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT, F1 >, const viennacl::matrix_base< NumericT, F1 >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT, F2 > &result)
 Carries out Compressed Matrix(COO)-Dense Transposed Matrix multiplication. More...
 
template<class ScalarType , unsigned int ALIGNMENT>
void prod_impl (const viennacl::ell_matrix< ScalarType, ALIGNMENT > &mat, const viennacl::vector_base< ScalarType > &vec, viennacl::vector_base< ScalarType > &result)
 Carries out matrix-vector multiplication with a ell_matrix. More...
 
template<class ScalarType , typename NumericT , unsigned int ALIGNMENT, typename F1 , typename F2 >
void prod_impl (const viennacl::ell_matrix< ScalarType, ALIGNMENT > &sp_mat, const viennacl::matrix_base< NumericT, F1 > &d_mat, viennacl::matrix_base< NumericT, F2 > &result)
 Carries out ell_matrix-d_matrix multiplication. More...
 
template<class ScalarType , typename NumericT , unsigned int ALIGNMENT, typename F1 , typename F2 >
void prod_impl (const viennacl::ell_matrix< ScalarType, ALIGNMENT > &sp_mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT, F1 >, const viennacl::matrix_base< NumericT, F1 >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT, F2 > &result)
 Carries out matrix-trans(matrix) multiplication first matrix being sparse ell and the second dense transposed. More...
 
template<class ScalarType , unsigned int ALIGNMENT>
void prod_impl (const viennacl::hyb_matrix< ScalarType, ALIGNMENT > &mat, const viennacl::vector_base< ScalarType > &vec, viennacl::vector_base< ScalarType > &result)
 Carries out matrix-vector multiplication with a hyb_matrix. More...
 
template<typename NumericT , unsigned int ALIGNMENT, typename F1 , typename F2 >
void prod_impl (const viennacl::hyb_matrix< NumericT, ALIGNMENT > &mat, const viennacl::matrix_base< NumericT, F1 > &d_mat, viennacl::matrix_base< NumericT, F2 > &result)
 Carries out sparse-matrix-dense-matrix multiplication with a hyb_matrix. More...
 
template<typename NumericT , unsigned int ALIGNMENT, typename F1 , typename F2 >
void prod_impl (const viennacl::hyb_matrix< NumericT, ALIGNMENT > &mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT, F1 >, const viennacl::matrix_base< NumericT, F1 >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT, F2 > &result)
 Carries out sparse-matrix-transposed-dense-matrix multiplication with a hyb_matrix. More...
 

Detailed Description

Implementations of operations using sparse matrices on the CPU using a single thread or OpenMP.