ViennaCL - The Vienna Computing Library  1.5.2
Namespaces | Functions
viennacl::linalg::host_based Namespace Reference

Holds all compute kernels with conventional host-based execution (buffers in CPU RAM). More...

Namespaces

namespace  detail
 

Helper functions for the host-based linear algebra backend.


Functions

template<typename NumericT , typename F1 , typename F2 , typename SOLVERTAG >
void inplace_solve (const matrix_base< NumericT, F1 > &A, matrix_base< NumericT, F2 > &B, SOLVERTAG)
 Direct inplace solver for triangular systems with multiple right hand sides, i.e. A \ B (MATLAB notation)
template<typename NumericT , typename F1 , typename F2 , typename SOLVERTAG >
void inplace_solve (const matrix_base< NumericT, F1 > &A, matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > proxy_B, SOLVERTAG)
 Direct inplace solver for triangular systems with multiple transposed right hand sides, i.e. A \ B^T (MATLAB notation)
template<typename NumericT , typename F1 , typename F2 , typename SOLVERTAG >
void inplace_solve (const matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &proxy_A, matrix_base< NumericT, F2 > &B, SOLVERTAG)
 Direct inplace solver for transposed triangular systems with multiple right hand sides, i.e. A^T \ B (MATLAB notation)
template<typename NumericT , typename F1 , typename F2 , typename SOLVERTAG >
void inplace_solve (const matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &proxy_A, matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > proxy_B, SOLVERTAG)
 Direct inplace solver for transposed triangular systems with multiple transposed right hand sides, i.e. A^T \ B^T (MATLAB notation)
template<typename NumericT , typename F , typename SOLVERTAG >
void inplace_solve (const matrix_base< NumericT, F > &mat, vector_base< NumericT > &vec, SOLVERTAG)
template<typename NumericT , typename F , typename SOLVERTAG >
void inplace_solve (const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans > &proxy, vector_base< NumericT > &vec, SOLVERTAG)
 Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems.
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)
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.
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.
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.
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.
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.
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.
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.
template<typename S1 , typename S2 , typename ScalarType1 >
viennacl::enable_if
< viennacl::is_scalar< S1 >
::value &&viennacl::is_scalar
< S2 >::value
&&viennacl::is_any_scalar
< ScalarType1 >::value >::type 
as (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha)
template<typename S1 , typename S2 , typename ScalarType1 , typename S3 , typename ScalarType2 >
viennacl::enable_if
< viennacl::is_scalar< S1 >
::value &&viennacl::is_scalar
< S2 >::value
&&viennacl::is_scalar< S3 >
::value
&&viennacl::is_any_scalar
< ScalarType1 >::value
&&viennacl::is_any_scalar
< ScalarType2 >::value >::type 
asbs (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, S3 const &s3, ScalarType2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
template<typename S1 , typename S2 , typename ScalarType1 , typename S3 , typename ScalarType2 >
viennacl::enable_if
< viennacl::is_scalar< S1 >
::value &&viennacl::is_scalar
< S2 >::value
&&viennacl::is_scalar< S3 >
::value
&&viennacl::is_any_scalar
< ScalarType1 >::value
&&viennacl::is_any_scalar
< ScalarType2 >::value >::type 
asbs_s (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, S3 const &s3, ScalarType2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
template<typename S1 , typename S2 >
viennacl::enable_if
< viennacl::is_scalar< S1 >
::value &&viennacl::is_scalar
< S2 >::value >::type 
swap (S1 &s1, S2 &s2)
 Swaps the contents of two scalars, data is copied.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
template<class T >
void _axpy (const T *, T *, vcl_size_t, T)
template<class T >
_dot (vcl_size_t, const T *, const T *)
template<class T >
_dotc (vcl_size_t, const T *, const T *)
template<class T >
void _swap (vcl_size_t, T *, T *)
template<class T >
void _copy (vcl_size_t, T *, T *)
template<class T >
_nrm2 (const T *, vcl_size_t)
template<typename ScalarType >
void inplace_tred2 (ScalarType **A, vcl_size_t n, vcl_size_t block_size=1, vcl_size_t num_threads=1)
 Inplace reduction of a dense n x n row-major or column-major hermitian (or real symmetric) matrix to tridiagonal form using householder similarity transforms (preserving eigenvalues)
template<typename ScalarType >
bool lu_factorize_row_major (ScalarType **A, vcl_size_t m, vcl_size_t n, vcl_size_t *piv=NULL, vcl_size_t block_size=8)
 Inplace lu factorization of an m x n dense row-major matrix with optional partial pivoting, returning true for an even number of pivots, false for an odd number of pivots. Factorization is successful if there are no nonzero values on the diagonal.
template<typename ScalarType >
std::vector< ScalarType > inplace_qr_col_major (ScalarType **A, vcl_size_t m, vcl_size_t n, vcl_size_t block_size=8)
 Inplace qr factorization of an m x n dense column-major matrix, returning the householder normalization coefficients.
template<typename ScalarType >
std::vector< ScalarType > inplace_qr_row_major (ScalarType **A, vcl_size_t m, vcl_size_t n, vcl_size_t block_size=8, vcl_size_t num_threads=1)
 Inplace qr factorization of an m x n dense row-major matrix, returning the householder normalization coefficients.
template<typename T , typename ScalarType1 >
void av (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha)
template<typename T , typename ScalarType1 , typename ScalarType2 >
void avbv (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
template<typename T , typename ScalarType1 , typename ScalarType2 >
void avbv_v (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
template<typename T >
void vector_assign (vector_base< T > &vec1, const T &alpha, bool up_to_internal_size=false)
 Assign a constant value to a vector (-range/-slice)
template<typename T >
void vector_swap (vector_base< T > &vec1, vector_base< T > &vec2)
 Swaps the contents of two vectors, data is copied.
template<typename T , typename OP >
void element_op (vector_base< T > &vec1, vector_expression< const vector_base< T >, const vector_base< T >, op_element_binary< OP > > const &proxy)
 Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax)
template<typename T , typename OP >
void element_op (vector_base< T > &vec1, vector_expression< const vector_base< T >, const vector_base< T >, op_element_unary< OP > > const &proxy)
 Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax)
template<typename T , typename S3 >
void inner_prod_impl (vector_base< T > const &vec1, vector_base< T > const &vec2, S3 &result)
 Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2).
template<typename T >
void inner_prod_impl (vector_base< T > const &x, vector_tuple< T > const &vec_tuple, vector_base< T > &result)
template<typename T , typename S2 >
void norm_1_impl (vector_base< T > const &vec1, S2 &result)
 Computes the l^1-norm of a vector.
template<typename T , typename S2 >
void norm_2_impl (vector_base< T > const &vec1, S2 &result)
 Computes the l^2-norm of a vector - implementation.
template<typename T , typename S2 >
void norm_inf_impl (vector_base< T > const &vec1, S2 &result)
 Computes the supremum-norm of a vector.
template<typename T >
vcl_size_t index_norm_inf (vector_base< T > const &vec1)
 Computes the index of the first entry that is equal to the supremum-norm in modulus.
template<typename T >
void plane_rotation (vector_base< T > &vec1, vector_base< T > &vec2, T alpha, T beta)
 Computes a plane rotation of two vectors.

Detailed Description

Holds all compute kernels with conventional host-based execution (buffers in CPU RAM).


Function Documentation

void _axpy ( const T *  x,
T *  y,
vcl_size_t  n,
a 
) [inline]
void _copy ( vcl_size_t  n,
T *  cx,
T *  cy 
) [inline]
T _dot ( vcl_size_t  n,
const T *  x,
const T *  y 
) [inline]
T _dotc ( vcl_size_t  n,
const T *  x,
const T *  y 
) [inline]
T _nrm2 ( const T *  x,
vcl_size_t  n 
) [inline]
void _swap ( vcl_size_t  n,
T *  sx,
T *  sy 
) [inline]
void viennacl::linalg::host_based::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 
)
void viennacl::linalg::host_based::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 
)
void viennacl::linalg::host_based::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 
)
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value && viennacl::is_any_scalar<ScalarType1>::value >::type viennacl::linalg::host_based::as ( S1 &  s1,
S2 const &  s2,
ScalarType1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value && viennacl::is_scalar<S3>::value && viennacl::is_any_scalar<ScalarType1>::value && viennacl::is_any_scalar<ScalarType2>::value >::type viennacl::linalg::host_based::asbs ( S1 &  s1,
S2 const &  s2,
ScalarType1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
S3 const &  s3,
ScalarType2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value && viennacl::is_scalar<S3>::value && viennacl::is_any_scalar<ScalarType1>::value && viennacl::is_any_scalar<ScalarType2>::value >::type viennacl::linalg::host_based::asbs_s ( S1 &  s1,
S2 const &  s2,
ScalarType1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
S3 const &  s3,
ScalarType2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)
void viennacl::linalg::host_based::av ( vector_base< T > &  vec1,
vector_base< T > const &  vec2,
ScalarType1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)
void viennacl::linalg::host_based::avbv ( vector_base< T > &  vec1,
vector_base< T > const &  vec2,
ScalarType1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
vector_base< T > const &  vec3,
ScalarType2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)
void viennacl::linalg::host_based::avbv_v ( vector_base< T > &  vec1,
vector_base< T > const &  vec2,
ScalarType1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
vector_base< T > const &  vec3,
ScalarType2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)
void viennacl::linalg::host_based::element_op ( vector_base< T > &  vec1,
vector_expression< const vector_base< T >, const vector_base< T >, op_element_binary< OP > > const &  proxy 
)

Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax)

Parameters:
vec1The result vector (or -range, or -slice)
proxyThe proxy object holding v2, v3 and the operation
void viennacl::linalg::host_based::element_op ( vector_base< T > &  vec1,
vector_expression< const vector_base< T >, const vector_base< T >, op_element_unary< OP > > const &  proxy 
)

Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax)

Parameters:
vec1The result vector (or -range, or -slice)
proxyThe proxy object holding v2, v3 and the operation
void viennacl::linalg::host_based::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)

Parameters:
AThe result matrix (or -range, or -slice)
proxyThe proxy object holding B, C, and the operation
void viennacl::linalg::host_based::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 
)
vcl_size_t viennacl::linalg::host_based::index_norm_inf ( vector_base< T > const &  vec1)

Computes the index of the first entry that is equal to the supremum-norm in modulus.

Parameters:
vec1The vector
Returns:
The result. Note that the result must be a CPU scalar (unsigned int), since gpu scalars are floating point types.
void viennacl::linalg::host_based::inner_prod_impl ( vector_base< T > const &  vec1,
vector_base< T > const &  vec2,
S3 &  result 
)

Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2).

Parameters:
vec1The first vector
vec2The second vector
resultThe result scalar (on the gpu)
void viennacl::linalg::host_based::inner_prod_impl ( vector_base< T > const &  x,
vector_tuple< T > const &  vec_tuple,
vector_base< T > &  result 
)
std::vector<ScalarType> viennacl::linalg::host_based::inplace_qr_col_major ( ScalarType **  A,
vcl_size_t  m,
vcl_size_t  n,
vcl_size_t  block_size = 8 
)

Inplace qr factorization of an m x n dense column-major matrix, returning the householder normalization coefficients.

Parameters:
AA dense column-major matrix to be factorized
mThe height of the matrix
nThe width of the matrix
block_sizeThe block size to be used
std::vector<ScalarType> viennacl::linalg::host_based::inplace_qr_row_major ( ScalarType **  A,
vcl_size_t  m,
vcl_size_t  n,
vcl_size_t  block_size = 8,
vcl_size_t  num_threads = 1 
)

Inplace qr factorization of an m x n dense row-major matrix, returning the householder normalization coefficients.

Parameters:
AA dense row-major matrix to be factorized
mThe height of the matrix
nThe width of the matrix
block_sizeThe block size to be used
num_threadsNumber of threads to be used
void viennacl::linalg::host_based::inplace_solve ( const matrix_base< NumericT, F1 > &  A,
matrix_base< NumericT, F2 > &  B,
SOLVERTAG   
)

Direct inplace solver for triangular systems with multiple right hand sides, i.e. A \ B (MATLAB notation)

Parameters:
AThe system matrix
BThe matrix of row vectors, where the solution is directly written to
void viennacl::linalg::host_based::inplace_solve ( const matrix_base< NumericT, F1 > &  A,
matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans >  proxy_B,
SOLVERTAG   
)

Direct inplace solver for triangular systems with multiple transposed right hand sides, i.e. A \ B^T (MATLAB notation)

Parameters:
AThe system matrix
proxy_BThe proxy for the transposed matrix of row vectors, where the solution is directly written to
void viennacl::linalg::host_based::inplace_solve ( const matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &  proxy_A,
matrix_base< NumericT, F2 > &  B,
SOLVERTAG   
)

Direct inplace solver for transposed triangular systems with multiple right hand sides, i.e. A^T \ B (MATLAB notation)

Parameters:
proxy_AThe transposed system matrix proxy
BThe matrix holding the load vectors, where the solution is directly written to
void viennacl::linalg::host_based::inplace_solve ( const matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &  proxy_A,
matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans >  proxy_B,
SOLVERTAG   
)

Direct inplace solver for transposed triangular systems with multiple transposed right hand sides, i.e. A^T \ B^T (MATLAB notation)

Parameters:
proxy_AThe transposed system matrix proxy
proxy_BThe transposed matrix holding the load vectors, where the solution is directly written to
void viennacl::linalg::host_based::inplace_solve ( const matrix_base< NumericT, F > &  mat,
vector_base< NumericT > &  vec,
SOLVERTAG   
)
void viennacl::linalg::host_based::inplace_solve ( const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans > &  proxy,
vector_base< NumericT > &  vec,
SOLVERTAG   
)

Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems.

Parameters:
proxyThe system matrix proxy
vecThe load vector, where the solution is directly written to
void viennacl::linalg::host_based::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.

Parameters:
LThe matrix
vecThe vector holding the right hand side. Is overwritten by the solution.
tagThe solver tag identifying the respective triangular solver
void viennacl::linalg::host_based::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.

Parameters:
LThe matrix
vecThe vector holding the right hand side. Is overwritten by the solution.
tagThe solver tag identifying the respective triangular solver
void viennacl::linalg::host_based::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.

Parameters:
UThe matrix
vecThe vector holding the right hand side. Is overwritten by the solution.
tagThe solver tag identifying the respective triangular solver
void viennacl::linalg::host_based::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.

Parameters:
UThe matrix
vecThe vector holding the right hand side. Is overwritten by the solution.
tagThe solver tag identifying the respective triangular solver
void viennacl::linalg::host_based::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.

Parameters:
proxyProxy object for a transposed CSR-matrix
vecThe right hand side vector
tagThe solver tag identifying the respective triangular solver
void viennacl::linalg::host_based::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.

Parameters:
proxyProxy object for a transposed CSR-matrix
vecThe right hand side vector
tagThe solver tag identifying the respective triangular solver
void viennacl::linalg::host_based::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.

Parameters:
proxyProxy object for a transposed CSR-matrix
vecThe right hand side vector
tagThe solver tag identifying the respective triangular solver
void viennacl::linalg::host_based::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.

Parameters:
proxyProxy object for a transposed CSR-matrix
vecThe right hand side vector
tagThe solver tag identifying the respective triangular solver
void viennacl::linalg::host_based::inplace_tred2 ( ScalarType **  A,
vcl_size_t  n,
vcl_size_t  block_size = 1,
vcl_size_t  num_threads = 1 
)

Inplace reduction of a dense n x n row-major or column-major hermitian (or real symmetric) matrix to tridiagonal form using householder similarity transforms (preserving eigenvalues)

Parameters:
AA dense hermitian matrix to be tridiagonalized
nThe height and width of the hermitian matrix
block_sizeThe block size to be used
num_threadsThe number of threads to be used with OpenMP
bool viennacl::linalg::host_based::lu_factorize_row_major ( ScalarType **  A,
vcl_size_t  m,
vcl_size_t  n,
vcl_size_t *  piv = NULL,
vcl_size_t  block_size = 8 
)

Inplace lu factorization of an m x n dense row-major matrix with optional partial pivoting, returning true for an even number of pivots, false for an odd number of pivots. Factorization is successful if there are no nonzero values on the diagonal.

Parameters:
AA dense row-major matrix to be factorized
mThe height of the matrix
nThe width of the matrix
pivThe optional pivot vector to store the pivot indices. If piv is NULL, no partial pivoting will be performed.
block_sizeThe block size to be used
void viennacl::linalg::host_based::matrix_assign ( matrix_base< NumericT, F > &  mat,
NumericT  s,
bool  clear = false 
)
void viennacl::linalg::host_based::matrix_column ( const matrix_base< NumericT, F > &  mat,
unsigned int  j,
vector_base< NumericT > &  vec 
)
void viennacl::linalg::host_based::matrix_diag_from_vector ( const vector_base< NumericT > &  vec,
int  k,
matrix_base< NumericT, F > &  mat 
)
void viennacl::linalg::host_based::matrix_diag_to_vector ( const matrix_base< NumericT, F > &  mat,
int  k,
vector_base< NumericT > &  vec 
)
void viennacl::linalg::host_based::matrix_diagonal_assign ( matrix_base< NumericT, F > &  mat,
NumericT  s 
)
void viennacl::linalg::host_based::matrix_row ( const matrix_base< NumericT, F > &  mat,
unsigned int  i,
vector_base< NumericT > &  vec 
)
void viennacl::linalg::host_based::norm_1_impl ( vector_base< T > const &  vec1,
S2 &  result 
)

Computes the l^1-norm of a vector.

Parameters:
vec1The vector
resultThe result scalar
void viennacl::linalg::host_based::norm_2_impl ( vector_base< T > const &  vec1,
S2 &  result 
)

Computes the l^2-norm of a vector - implementation.

Parameters:
vec1The vector
resultThe result scalar
void viennacl::linalg::host_based::norm_inf_impl ( vector_base< T > const &  vec1,
S2 &  result 
)

Computes the supremum-norm of a vector.

Parameters:
vec1The vector
resultThe result scalar
void viennacl::linalg::host_based::plane_rotation ( vector_base< T > &  vec1,
vector_base< T > &  vec2,
alpha,
beta 
)

Computes a plane rotation of two vectors.

Computes (x,y) <- (alpha * x + beta * y, -beta * x + alpha * y)

Parameters:
vec1The first vector
vec2The second vector
alphaThe first transformation coefficient
betaThe second transformation coefficient
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(mat, vec);

Parameters:
matThe matrix
vecThe vector
resultThe result vector
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(sp_mat, d_mat);

Parameters:
sp_matThe sparse matrix
d_matThe dense matrix
resultThe result matrix
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(sp_mat, trans(d_mat));

Parameters:
sp_matThe sparse matrix
d_matThe transposed dense matrix
resultThe result matrix
void viennacl::linalg::host_based::prod_impl ( const matrix_base< NumericT, F > &  mat,
const vector_base< NumericT > &  vec,
vector_base< NumericT > &  result 
)

Carries out matrix-vector multiplication.

Implementation of the convenience expression result = prod(mat, vec);

Parameters:
matThe matrix
vecThe vector
resultThe result vector
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = trans(mat) * vec;

Parameters:
mat_transThe transposed matrix proxy
vecThe vector
resultThe result vector
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(mat, vec);

Parameters:
matThe matrix
vecThe vector
resultThe result vector
void viennacl::linalg::host_based::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.

Implementation of C = prod(A, B);

void viennacl::linalg::host_based::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.

Implementation of C = prod(trans(A), B);

void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(mat, vec);

Parameters:
matThe matrix
vecThe vector
resultThe result vector
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(sp_mat, d_mat);

Parameters:
sp_matThe Sparse Matrix (Coordinate format)
d_matThe Dense Matrix
resultThe Result Matrix
void viennacl::linalg::host_based::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.

Implementation of C = prod(A, trans(B));

void viennacl::linalg::host_based::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.

Implementation of C = prod(trans(A), trans(B));

void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(sp_mat, trans(d_mat));

Parameters:
sp_matThe Sparse Matrix (Coordinate format)
d_matThe Dense Transposed Matrix
resultThe Result Matrix
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(mat, vec);

Parameters:
matThe matrix
vecThe vector
resultThe result vector
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(sp_mat, d_mat);

Parameters:
sp_matThe sparse(ELL) matrix
d_matThe dense matrix
resultThe result dense matrix
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(sp_mat, trans(d_mat));

Parameters:
sp_matThe sparse matrix
d_matThe transposed dense matrix
resultThe result matrix
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result = prod(mat, vec);

Parameters:
matThe matrix
vecThe vector
resultThe result vector
void viennacl::linalg::host_based::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.

Implementation of the convenience expression C = prod(A, B);

Parameters:
matThe sparse matrix A
d_matThe dense matrix B
resultThe dense result matrix C
void viennacl::linalg::host_based::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.

Implementation of the convenience expression C = prod(A, trans(B));

Parameters:
matThe sparse matrix A
d_matThe dense matrix B
resultThe dense result matrix C
void viennacl::linalg::host_based::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.

Implementation of the convenience expression result += alpha * outer_prod(vec1, vec2);

Parameters:
mat1The matrix to be updated
alphaThe scaling factor (either a viennacl::scalar<>, float, or double)
reciprocal_alphaUse 1/alpha instead of alpha
flip_sign_alphaUse -alpha instead of alpha
vec1The first vector
vec2The second vector
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value >::type viennacl::linalg::host_based::swap ( S1 &  s1,
S2 &  s2 
)

Swaps the contents of two scalars, data is copied.

Parameters:
s1The first scalar
s2The second scalar
void viennacl::linalg::host_based::vector_assign ( vector_base< T > &  vec1,
const T &  alpha,
bool  up_to_internal_size = false 
)

Assign a constant value to a vector (-range/-slice)

Parameters:
vec1The vector to which the value should be assigned
alphaThe value to be assigned
up_to_internal_sizeSpecifies whether alpha should also be written to padded memory (mostly used for clearing the whole buffer).
void viennacl::linalg::host_based::vector_swap ( vector_base< T > &  vec1,
vector_base< T > &  vec2 
)

Swaps the contents of two vectors, data is copied.

Parameters:
vec1The first vector (or -range, or -slice)
vec2The second vector (or -range, or -slice)