ViennaCL - The Vienna Computing Library  1.5.2
Namespaces | Functions
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...

#include "viennacl/forwards.h"
#include "viennacl/scalar.hpp"
#include "viennacl/vector.hpp"
#include "viennacl/vector_proxy.hpp"
#include "viennacl/tools/tools.hpp"
#include "viennacl/meta/enable_if.hpp"
#include "viennacl/meta/predicate.hpp"
#include "viennacl/meta/result_of.hpp"
#include "viennacl/traits/size.hpp"
#include "viennacl/traits/start.hpp"
#include "viennacl/traits/handle.hpp"
#include "viennacl/traits/stride.hpp"
#include "viennacl/linalg/detail/op_applier.hpp"
#include "viennacl/linalg/host_based/common.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 NumericT , typename F , typename ScalarType1 >
void am (matrix_base< NumericT, F > &mat1, matrix_base< NumericT, F > const &mat2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha)
 
template<typename NumericT , typename F , typename ScalarType1 , typename ScalarType2 >
void ambm (matrix_base< NumericT, F > &mat1, matrix_base< NumericT, F > const &mat2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT, F > const &mat3, ScalarType2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT , typename F , typename ScalarType1 , typename ScalarType2 >
void ambm_m (matrix_base< NumericT, F > &mat1, matrix_base< NumericT, F > const &mat2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT, F > const &mat3, ScalarType2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT , typename F >
void matrix_assign (matrix_base< NumericT, F > &mat, NumericT s, bool clear=false)
 
template<typename NumericT , typename F >
void matrix_diagonal_assign (matrix_base< NumericT, F > &mat, NumericT s)
 
template<typename NumericT , typename F >
void matrix_diag_from_vector (const vector_base< NumericT > &vec, int k, matrix_base< NumericT, F > &mat)
 
template<typename NumericT , typename F >
void matrix_diag_to_vector (const matrix_base< NumericT, F > &mat, int k, vector_base< NumericT > &vec)
 
template<typename NumericT , typename F >
void matrix_row (const matrix_base< NumericT, F > &mat, unsigned int i, vector_base< NumericT > &vec)
 
template<typename NumericT , typename F >
void matrix_column (const matrix_base< NumericT, F > &mat, unsigned int j, vector_base< NumericT > &vec)
 
template<typename NumericT , typename F , typename OP >
void element_op (matrix_base< NumericT, F > &A, matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_element_binary< OP > > const &proxy)
 Implementation of the element-wise operations A = B .* C and A = B ./ C (using MATLAB syntax) More...
 
template<typename NumericT , typename F , typename OP >
void element_op (matrix_base< NumericT, F > &A, matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_element_unary< OP > > const &proxy)
 
template<typename NumericT , typename F >
void prod_impl (const matrix_base< NumericT, F > &mat, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
 Carries out matrix-vector multiplication. More...
 
template<typename NumericT , typename F >
void prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans > &mat_trans, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
 Carries out matrix-vector multiplication with a transposed matrix. More...
 
template<typename A , typename B , typename C , typename NumericT >
void prod (A &a, B &b, C &c, vcl_size_t C_size1, vcl_size_t C_size2, vcl_size_t A_size2, NumericT alpha, NumericT beta)
 
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType >
void prod_impl (const matrix_base< NumericT, F1 > &A, const matrix_base< NumericT, F2 > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType >
void prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &A, const matrix_base< NumericT, F2 > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType >
void prod_impl (const matrix_base< NumericT, F1 > &A, const viennacl::matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType >
void prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &A, const viennacl::matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename NumericT , typename F , typename S1 >
void scaled_rank_1_update (matrix_base< NumericT, F > &mat1, S1 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...
 

Detailed Description

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