ViennaCL - The Vienna Computing Library
1.5.1
|
Holds all compute kernels with conventional host-based execution (buffers in CPU RAM). More...
Namespaces | |
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) More... | |
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) More... | |
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) More... | |
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) More... | |
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. More... | |
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 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... | |
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. More... | |
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 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 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<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... | |
template<class T > | |
void | _axpy (const T *, T *, vcl_size_t, T) |
template<class T > | |
T | _dot (vcl_size_t, const T *, const T *) |
template<class T > | |
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 > | |
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) More... | |
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. More... | |
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. More... | |
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. More... | |
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) More... | |
template<typename T > | |
void | vector_swap (vector_base< T > &vec1, vector_base< T > &vec2) |
Swaps the contents of two vectors, data is copied. More... | |
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) More... | |
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) More... | |
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). More... | |
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. More... | |
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. More... | |
template<typename T , typename S2 > | |
void | norm_inf_impl (vector_base< T > const &vec1, S2 &result) |
Computes the supremum-norm of a vector. More... | |
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. More... | |
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. More... | |
Holds all compute kernels with conventional host-based execution (buffers in CPU RAM).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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)
vec1 | The result vector (or -range, or -slice) |
proxy | The 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)
vec1 | The result vector (or -range, or -slice) |
proxy | The 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)
A | The result matrix (or -range, or -slice) |
proxy | The 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.
vec1 | The vector |
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).
vec1 | The first vector |
vec2 | The second vector |
result | The 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.
A | A dense column-major matrix to be factorized |
m | The height of the matrix |
n | The width of the matrix |
block_size | The 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.
A | A dense row-major matrix to be factorized |
m | The height of the matrix |
n | The width of the matrix |
block_size | The block size to be used |
num_threads | Number 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)
A | The system matrix |
B | The 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)
A | The system matrix |
proxy_B | The 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)
proxy_A | The transposed system matrix proxy |
B | The 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)
proxy_A | The transposed system matrix proxy |
proxy_B | The 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.
proxy | The system matrix proxy |
vec | The 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.
L | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
tag | The 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.
L | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
tag | The 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.
U | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
tag | The 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.
U | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
tag | The 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.
proxy | Proxy object for a transposed CSR-matrix |
vec | The right hand side vector |
tag | The 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.
proxy | Proxy object for a transposed CSR-matrix |
vec | The right hand side vector |
tag | The 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.
proxy | Proxy object for a transposed CSR-matrix |
vec | The right hand side vector |
tag | The 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.
proxy | Proxy object for a transposed CSR-matrix |
vec | The right hand side vector |
tag | The 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)
A | A dense hermitian matrix to be tridiagonalized |
n | The height and width of the hermitian matrix |
block_size | The block size to be used |
num_threads | The 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.
A | A dense row-major matrix to be factorized |
m | The height of the matrix |
n | The width of the matrix |
piv | The optional pivot vector to store the pivot indices. If piv is NULL, no partial pivoting will be performed. |
block_size | The 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.
vec1 | The vector |
result | The 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.
vec1 | The vector |
result | The result scalar |
void viennacl::linalg::host_based::norm_inf_impl | ( | vector_base< T > const & | vec1, |
S2 & | result | ||
) |
Computes the supremum-norm of a vector.
vec1 | The vector |
result | The result scalar |
void viennacl::linalg::host_based::plane_rotation | ( | vector_base< T > & | vec1, |
vector_base< T > & | vec2, | ||
T | alpha, | ||
T | beta | ||
) |
Computes a plane rotation of two vectors.
Computes (x,y) <- (alpha * x + beta * y, -beta * x + alpha * y)
vec1 | The first vector |
vec2 | The second vector |
alpha | The first transformation coefficient |
beta | The 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);
mat | The matrix |
vec | The vector |
result | The 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);
sp_mat | The sparse matrix |
d_mat | The dense matrix |
result | The 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));
sp_mat | The sparse matrix |
d_mat | The transposed dense matrix |
result | The 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);
mat | The matrix |
vec | The vector |
result | The 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;
mat_trans | The transposed matrix proxy |
vec | The vector |
result | The 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);
mat | The matrix |
vec | The vector |
result | The 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);
mat | The matrix |
vec | The vector |
result | The 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);
sp_mat | The Sparse Matrix (Coordinate format) |
d_mat | The Dense Matrix |
result | The 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));
sp_mat | The Sparse Matrix (Coordinate format) |
d_mat | The Dense Transposed Matrix |
result | The 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);
mat | The matrix |
vec | The vector |
result | The 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);
sp_mat | The sparse(ELL) matrix |
d_mat | The dense matrix |
result | The 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));
sp_mat | The sparse matrix |
d_mat | The transposed dense matrix |
result | The 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);
mat | The matrix |
vec | The vector |
result | The 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);
mat | The sparse matrix A |
d_mat | The dense matrix B |
result | The 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));
mat | The sparse matrix A |
d_mat | The dense matrix B |
result | The 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);
mat1 | The matrix to be updated |
alpha | The scaling factor (either a viennacl::scalar<>, float, or double) |
reciprocal_alpha | Use 1/alpha instead of alpha |
flip_sign_alpha | Use -alpha instead of alpha |
vec1 | The first vector |
vec2 | The 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.
s1 | The first scalar |
s2 | The 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)
vec1 | The vector to which the value should be assigned |
alpha | The value to be assigned |
up_to_internal_size | Specifies 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.
vec1 | The first vector (or -range, or -slice) |
vec2 | The second vector (or -range, or -slice) |