ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
matrix_operations.hpp File Reference

Implementations of dense matrix related operations, including matrix-vector products, using a plain single-threaded or OpenMP-enabled execution on CPU. More...

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 DestNumericT , typename SrcNumericT >
void viennacl::linalg::host_based::convert (matrix_base< DestNumericT > &mat1, matrix_base< SrcNumericT > const &mat2)
 
template<typename NumericT , typename SizeT , typename DistanceT >
void viennacl::linalg::host_based::trans (const matrix_expression< const matrix_base< NumericT, SizeT, DistanceT >, const matrix_base< NumericT, SizeT, DistanceT >, op_trans > &proxy, matrix_base< NumericT > &temp_trans)
 
template<typename NumericT , typename ScalarT1 >
void viennacl::linalg::host_based::am (matrix_base< NumericT > &mat1, matrix_base< NumericT > const &mat2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha)
 
template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::host_based::ambm (matrix_base< NumericT > &mat1, matrix_base< NumericT > const &mat2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT > const &mat3, ScalarT2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::host_based::ambm_m (matrix_base< NumericT > &mat1, matrix_base< NumericT > const &mat2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT > const &mat3, ScalarT2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT >
void viennacl::linalg::host_based::matrix_assign (matrix_base< NumericT > &mat, NumericT s, bool clear=false)
 
template<typename NumericT >
void viennacl::linalg::host_based::matrix_diagonal_assign (matrix_base< NumericT > &mat, NumericT s)
 
template<typename NumericT >
void viennacl::linalg::host_based::matrix_diag_from_vector (const vector_base< NumericT > &vec, int k, matrix_base< NumericT > &mat)
 
template<typename NumericT >
void viennacl::linalg::host_based::matrix_diag_to_vector (const matrix_base< NumericT > &mat, int k, vector_base< NumericT > &vec)
 
template<typename NumericT >
void viennacl::linalg::host_based::matrix_row (const matrix_base< NumericT > &mat, unsigned int i, vector_base< NumericT > &vec)
 
template<typename NumericT >
void viennacl::linalg::host_based::matrix_column (const matrix_base< NumericT > &mat, unsigned int j, vector_base< NumericT > &vec)
 
template<typename NumericT , typename OpT >
void viennacl::linalg::host_based::element_op (matrix_base< NumericT > &A, matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_element_binary< OpT > > const &proxy)
 Implementation of the element-wise operations A = B .* C and A = B ./ C (using MATLAB syntax) More...
 
template<typename NumericT , typename OpT >
void viennacl::linalg::host_based::element_op (matrix_base< NumericT > &A, matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_element_unary< OpT > > const &proxy)
 
template<typename NumericT >
void viennacl::linalg::host_based::prod_impl (const matrix_base< NumericT > &mat, bool trans, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
 Carries out matrix-vector multiplication. More...
 
template<typename MatrixAccT1 , typename MatrixAccT2 , typename MatrixAccT3 , typename NumericT >
void viennacl::linalg::host_based::detail::prod (MatrixAccT1 &A, MatrixAccT2 &B, MatrixAccT3 &C, vcl_size_t C_size1, vcl_size_t C_size2, vcl_size_t A_size2, NumericT alpha, NumericT beta)
 
template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::host_based::prod_impl (const matrix_base< NumericT > &A, bool trans_A, const matrix_base< NumericT > &B, bool trans_B, matrix_base< NumericT > &C, ScalarT1 alpha, ScalarT2 beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::scaled_rank_1_update (matrix_base< NumericT > &mat1, ScalarT const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, const vector_base< NumericT > &vec1, const vector_base< NumericT > &vec2)
 The implementation of the operation mat += alpha * vec1 * vec2^T, i.e. a scaled rank 1 update. More...
 
template<typename NumericT , typename S1 >
void viennacl::linalg::host_based::bidiag_pack_impl (matrix_base< NumericT > &A, vector_base< S1 > &D, vector_base< S1 > &S)
 This function stores the diagonal and the superdiagonal of a matrix in two vectors. More...
 
template<typename NumericT , typename VectorType >
void viennacl::linalg::host_based::bidiag_pack (matrix_base< NumericT > &A, VectorType &dh, VectorType &sh)
 
template<typename NumericT >
void viennacl::linalg::host_based::house_update_A_left (matrix_base< NumericT > &A, vector_base< NumericT > &D, vcl_size_t start)
 This function applies a householder transformation to a matrix. A <- P * A with a householder reflection P. More...
 
template<typename NumericT >
void viennacl::linalg::host_based::house_update_A_right (matrix_base< NumericT > &A, vector_base< NumericT > &D)
 This function applies a householder transformation to a matrix: A <- A * P with a householder reflection P. More...
 
template<typename NumericT >
void viennacl::linalg::host_based::house_update_QL (matrix_base< NumericT > &Q, vector_base< NumericT > &D, vcl_size_t A_size1)
 This function updates the matrix Q, which is needed for the computation of the eigenvectors. More...
 
template<typename NumericT >
void viennacl::linalg::host_based::givens_next (matrix_base< NumericT > &Q, vector_base< NumericT > &tmp1, vector_base< NumericT > &tmp2, int l, int m)
 This function updates the matrix Q. It is part of the tql2 algorithm. More...
 
template<typename NumericT , typename S1 >
void viennacl::linalg::host_based::copy_vec (matrix_base< NumericT > &A, vector_base< S1 > &V, vcl_size_t row_start, vcl_size_t col_start, bool copy_col)
 This function copies a row or a column from a matrix to a vector. More...
 

Detailed Description

Implementations of dense matrix related operations, including matrix-vector products, using a plain single-threaded or OpenMP-enabled execution on CPU.

Definition in file matrix_operations.hpp.