ViennaCL - The Vienna Computing Library  1.7.1
Free open-source GPU-accelerated linear algebra and solver library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
viennacl::linalg::host_based Namespace Reference

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

Namespaces

 amg
 
 detail
 Helper functions for the host-based linear algebra backend.
 

Classes

struct  spgemm_output_write_disabled
 
struct  spgemm_output_write_enabled
 

Functions

template<typename NumericT , typename SolverTagT >
void inplace_solve (matrix_base< NumericT > const &A, matrix_base< NumericT > &B, SolverTagT)
 Direct inplace solver for triangular systems with multiple right hand sides, i.e. A \ B (MATLAB notation) More...
 
template<typename NumericT , typename SolverTagT >
void inplace_solve (matrix_base< NumericT > const &mat, vector_base< NumericT > &vec, SolverTagT)
 
template<typename NumericT >
void fft_direct (std::complex< NumericT > *input_complex, std::complex< NumericT > *output, vcl_size_t size, vcl_size_t stride, vcl_size_t batch_num, NumericT sign, viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Direct algoritm kenrnel. More...
 
template<typename NumericT , unsigned int AlignmentV>
void direct (viennacl::vector< NumericT, AlignmentV > const &in, viennacl::vector< NumericT, AlignmentV > &out, vcl_size_t size, vcl_size_t stride, vcl_size_t batch_num, NumericT sign=NumericT(-1), viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Direct 1D algorithm for computing Fourier transformation. More...
 
template<typename NumericT , unsigned int AlignmentV>
void direct (viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > const &in, viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &out, vcl_size_t size, vcl_size_t stride, vcl_size_t batch_num, NumericT sign=NumericT(-1), viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Direct 2D algorithm for computing Fourier transformation. More...
 
template<typename NumericT , unsigned int AlignmentV>
void reorder (viennacl::vector< NumericT, AlignmentV > &in, vcl_size_t size, vcl_size_t stride, vcl_size_t bits_datasize, vcl_size_t batch_num, viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 
template<typename NumericT , unsigned int AlignmentV>
void reorder (viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &in, vcl_size_t size, vcl_size_t stride, vcl_size_t bits_datasize, vcl_size_t batch_num, viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 
template<typename NumericT >
void fft_radix2 (std::complex< NumericT > *input_complex, vcl_size_t batch_num, vcl_size_t bit_size, vcl_size_t size, vcl_size_t stride, NumericT sign, viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Radix-2 algorithm for computing Fourier transformation. Kernel for computing smaller amount of data. More...
 
template<typename NumericT >
void fft_radix2_local (std::complex< NumericT > *input_complex, std::complex< NumericT > *lcl_input, vcl_size_t batch_num, vcl_size_t bit_size, vcl_size_t size, vcl_size_t stride, NumericT sign, viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Radix-2 algorithm for computing Fourier transformation. Kernel for computing bigger amount of data. More...
 
template<typename NumericT , unsigned int AlignmentV>
void radix2 (viennacl::vector< NumericT, AlignmentV > &in, vcl_size_t size, vcl_size_t stride, vcl_size_t batch_num, NumericT sign=NumericT(-1), viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Radix-2 1D algorithm for computing Fourier transformation. More...
 
template<typename NumericT , unsigned int AlignmentV>
void radix2 (viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &in, vcl_size_t size, vcl_size_t stride, vcl_size_t batch_num, NumericT sign=NumericT(-1), viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Radix-2 2D algorithm for computing Fourier transformation. More...
 
template<typename NumericT , unsigned int AlignmentV>
void bluestein (viennacl::vector< NumericT, AlignmentV > &in, viennacl::vector< NumericT, AlignmentV > &out, vcl_size_t)
 Bluestein's algorithm for computing Fourier transformation. More...
 
template<typename NumericT , unsigned int AlignmentV>
void normalize (viennacl::vector< NumericT, AlignmentV > &input)
 Normalize vector with his own size. More...
 
template<typename NumericT , unsigned int AlignmentV>
void multiply_complex (viennacl::vector< NumericT, AlignmentV > const &input1, viennacl::vector< NumericT, AlignmentV > const &input2, viennacl::vector< NumericT, AlignmentV > &output)
 Complex multiplikation of two vectors. More...
 
template<typename NumericT , unsigned int AlignmentV>
void transpose (viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &input)
 Inplace transpose of matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void transpose (viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > const &input, viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &output)
 Transpose matrix. More...
 
template<typename NumericT >
void real_to_complex (viennacl::vector_base< NumericT > const &in, viennacl::vector_base< NumericT > &out, vcl_size_t size)
 Create complex vector from real vector (even elements(2*k) = real part, odd elements(2*k+1) = imaginary part) More...
 
template<typename NumericT >
void complex_to_real (viennacl::vector_base< NumericT > const &in, viennacl::vector_base< NumericT > &out, vcl_size_t size)
 Create real vector from complex vector (even elements(2*k) = real part, odd elements(2*k+1) = imaginary part) More...
 
template<typename NumericT >
void reverse (viennacl::vector_base< NumericT > &in)
 Reverse vector to opposite order and save it in input vector. More...
 
template<typename NumericT >
void extract_L (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L)
 
template<typename NumericT >
void icc_scale (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L)
 Scales the values extracted from A such that A' = DAD has unit diagonal. Updates values from A in L and U accordingly. More...
 
template<typename NumericT >
void icc_chow_patel_sweep (compressed_matrix< NumericT > &L, vector< NumericT > &aij_L)
 Performs one nonlinear relaxation step in the Chow-Patel-ICC using OpenMP (cf. Algorithm 3 in paper, but for L rather than U) More...
 
template<typename NumericT >
void extract_LU (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L, compressed_matrix< NumericT > &U)
 
template<typename NumericT >
void ilu_scale (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L, compressed_matrix< NumericT > &U)
 Scales the values extracted from A such that A' = DAD has unit diagonal. Updates values from A in L and U accordingly. More...
 
template<typename NumericT >
void ilu_transpose (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &B)
 
template<typename NumericT >
void ilu_chow_patel_sweep (compressed_matrix< NumericT > &L, vector< NumericT > const &aij_L, compressed_matrix< NumericT > &U_trans, vector< NumericT > const &aij_U_trans)
 Performs one nonlinear relaxation step in the Chow-Patel-ILU using OpenMP (cf. Algorithm 2 in paper) More...
 
template<typename NumericT >
void ilu_form_neumann_matrix (compressed_matrix< NumericT > &R, vector< NumericT > &diag_R)
 
template<typename NumericT >
void pipelined_cg_vector_update (vector_base< NumericT > &result, NumericT alpha, vector_base< NumericT > &p, vector_base< NumericT > &r, vector_base< NumericT > const &Ap, NumericT beta, vector_base< NumericT > &inner_prod_buffer)
 Performs a joint vector update operation needed for an efficient pipelined CG algorithm. More...
 
template<typename NumericT >
void pipelined_cg_prod (compressed_matrix< NumericT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > &inner_prod_buffer)
 Performs a fused matrix-vector product with a compressed_matrix for an efficient pipelined CG algorithm. More...
 
template<typename NumericT >
void pipelined_cg_prod (coordinate_matrix< NumericT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > &inner_prod_buffer)
 Performs a fused matrix-vector product with a coordinate_matrix for an efficient pipelined CG algorithm. More...
 
template<typename NumericT >
void pipelined_cg_prod (ell_matrix< NumericT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > &inner_prod_buffer)
 Performs a fused matrix-vector product with an ell_matrix for an efficient pipelined CG algorithm. More...
 
template<typename NumericT , typename IndexT >
void pipelined_cg_prod (sliced_ell_matrix< NumericT, IndexT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > &inner_prod_buffer)
 Performs a fused matrix-vector product with an sliced_ell_matrix for an efficient pipelined CG algorithm. More...
 
template<typename NumericT >
void pipelined_cg_prod (hyb_matrix< NumericT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > &inner_prod_buffer)
 Performs a fused matrix-vector product with an hyb_matrix for an efficient pipelined CG algorithm. More...
 
template<typename NumericT >
void pipelined_bicgstab_update_s (vector_base< NumericT > &s, vector_base< NumericT > &r, vector_base< NumericT > const &Ap, vector_base< NumericT > &inner_prod_buffer, vcl_size_t buffer_chunk_size, vcl_size_t buffer_chunk_offset)
 Performs a joint vector update operation needed for an efficient pipelined BiCGStab algorithm. More...
 
template<typename NumericT >
void pipelined_bicgstab_vector_update (vector_base< NumericT > &result, NumericT alpha, vector_base< NumericT > &p, NumericT omega, vector_base< NumericT > const &s, vector_base< NumericT > &residual, vector_base< NumericT > const &As, NumericT beta, vector_base< NumericT > const &Ap, vector_base< NumericT > const &r0star, vector_base< NumericT > &inner_prod_buffer, vcl_size_t buffer_chunk_size)
 Performs a joint vector update operation needed for an efficient pipelined BiCGStab algorithm. More...
 
template<typename NumericT >
void pipelined_bicgstab_prod (compressed_matrix< NumericT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > const &r0star, vector_base< NumericT > &inner_prod_buffer, vcl_size_t buffer_chunk_size, vcl_size_t buffer_chunk_offset)
 Performs a fused matrix-vector product with a compressed_matrix for an efficient pipelined BiCGStab algorithm. More...
 
template<typename NumericT >
void pipelined_bicgstab_prod (coordinate_matrix< NumericT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > const &r0star, vector_base< NumericT > &inner_prod_buffer, vcl_size_t buffer_chunk_size, vcl_size_t buffer_chunk_offset)
 Performs a fused matrix-vector product with a coordinate_matrix for an efficient pipelined BiCGStab algorithm. More...
 
template<typename NumericT >
void pipelined_bicgstab_prod (ell_matrix< NumericT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > const &r0star, vector_base< NumericT > &inner_prod_buffer, vcl_size_t buffer_chunk_size, vcl_size_t buffer_chunk_offset)
 Performs a fused matrix-vector product with an ell_matrix for an efficient pipelined BiCGStab algorithm. More...
 
template<typename NumericT , typename IndexT >
void pipelined_bicgstab_prod (sliced_ell_matrix< NumericT, IndexT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > const &r0star, vector_base< NumericT > &inner_prod_buffer, vcl_size_t buffer_chunk_size, vcl_size_t buffer_chunk_offset)
 Performs a fused matrix-vector product with a sliced_ell_matrix for an efficient pipelined BiCGStab algorithm. More...
 
template<typename NumericT >
void pipelined_bicgstab_prod (hyb_matrix< NumericT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > const &r0star, vector_base< NumericT > &inner_prod_buffer, vcl_size_t buffer_chunk_size, vcl_size_t buffer_chunk_offset)
 Performs a fused matrix-vector product with a hyb_matrix for an efficient pipelined BiCGStab algorithm. More...
 
template<typename T >
void pipelined_gmres_normalize_vk (vector_base< T > &v_k, vector_base< T > const &residual, vector_base< T > &R_buffer, vcl_size_t offset_in_R, vector_base< T > const &inner_prod_buffer, vector_base< T > &r_dot_vk_buffer, vcl_size_t buffer_chunk_size, vcl_size_t buffer_chunk_offset)
 Performs a vector normalization needed for an efficient pipelined GMRES algorithm. More...
 
template<typename T >
void pipelined_gmres_gram_schmidt_stage1 (vector_base< T > const &device_krylov_basis, vcl_size_t v_k_size, vcl_size_t v_k_internal_size, vcl_size_t k, vector_base< T > &vi_in_vk_buffer, vcl_size_t buffer_chunk_size)
 Computes first reduction stage for multiple inner products <v_i, v_k>, i=0..k-1. More...
 
template<typename T >
void pipelined_gmres_gram_schmidt_stage2 (vector_base< T > &device_krylov_basis, vcl_size_t v_k_size, vcl_size_t v_k_internal_size, vcl_size_t k, vector_base< T > const &vi_in_vk_buffer, vector_base< T > &R_buffer, vcl_size_t krylov_dim, vector_base< T > &inner_prod_buffer, vcl_size_t buffer_chunk_size)
 Computes the second reduction stage for multiple inner products <v_i, v_k>, i=0..k-1, then updates v_k -= <v_i, v_k> v_i and computes the first reduction stage for ||v_k||. More...
 
template<typename T >
void pipelined_gmres_update_result (vector_base< T > &result, vector_base< T > const &residual, vector_base< T > const &krylov_basis, vcl_size_t v_k_size, vcl_size_t v_k_internal_size, vector_base< T > const &coefficients, vcl_size_t k)
 Computes x += eta_0 r + sum_{i=1}^{k-1} eta_i v_{i-1}. More...
 
template<typename MatrixType , typename T >
void pipelined_gmres_prod (MatrixType const &A, vector_base< T > const &p, vector_base< T > &Ap, vector_base< T > &inner_prod_buffer)
 
template<typename DestNumericT , typename SrcNumericT >
void convert (matrix_base< DestNumericT > &mat1, matrix_base< SrcNumericT > const &mat2)
 
template<typename NumericT , typename SizeT , typename DistanceT >
void trans (const matrix_expression< const matrix_base< NumericT, SizeT, DistanceT >, const matrix_base< NumericT, SizeT, DistanceT >, op_trans > &proxy, matrix_base< NumericT > &temp_trans)
 
template<typename NumericT , typename ScalarT1 >
void am (matrix_base< NumericT > &mat1, matrix_base< NumericT > const &mat2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha)
 
template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void ambm (matrix_base< NumericT > &mat1, matrix_base< NumericT > const &mat2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT > const &mat3, ScalarT2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void ambm_m (matrix_base< NumericT > &mat1, matrix_base< NumericT > const &mat2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT > const &mat3, ScalarT2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT >
void matrix_assign (matrix_base< NumericT > &mat, NumericT s, bool clear=false)
 
template<typename NumericT >
void matrix_diagonal_assign (matrix_base< NumericT > &mat, NumericT s)
 
template<typename NumericT >
void matrix_diag_from_vector (const vector_base< NumericT > &vec, int k, matrix_base< NumericT > &mat)
 
template<typename NumericT >
void matrix_diag_to_vector (const matrix_base< NumericT > &mat, int k, vector_base< NumericT > &vec)
 
template<typename NumericT >
void matrix_row (const matrix_base< NumericT > &mat, unsigned int i, vector_base< NumericT > &vec)
 
template<typename NumericT >
void matrix_column (const matrix_base< NumericT > &mat, unsigned int j, vector_base< NumericT > &vec)
 
template<typename NumericT , typename OpT >
void element_op (matrix_base< NumericT > &A, matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_element_binary< OpT > > const &proxy)
 Implementation of the element-wise operations A = B .* C and A = B ./ C (using MATLAB syntax) More...
 
template<typename NumericT , typename OpT >
void element_op (matrix_base< NumericT > &A, matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_element_unary< OpT > > const &proxy)
 
template<typename NumericT >
void prod_impl (const matrix_base< NumericT > &mat, bool trans, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
 Carries out matrix-vector multiplication. More...
 
template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void prod_impl (const matrix_base< NumericT > &A, bool trans_A, const matrix_base< NumericT > &B, bool trans_B, matrix_base< NumericT > &C, ScalarT1 alpha, ScalarT2 beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename NumericT , typename ScalarT >
void scaled_rank_1_update (matrix_base< NumericT > &mat1, ScalarT const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, const vector_base< NumericT > &vec1, const vector_base< NumericT > &vec2)
 The implementation of the operation mat += alpha * vec1 * vec2^T, i.e. a scaled rank 1 update. More...
 
template<typename NumericT , typename S1 >
void bidiag_pack_impl (matrix_base< NumericT > &A, vector_base< S1 > &D, vector_base< S1 > &S)
 This function stores the diagonal and the superdiagonal of a matrix in two vectors. More...
 
template<typename NumericT , typename VectorType >
void bidiag_pack (matrix_base< NumericT > &A, VectorType &dh, VectorType &sh)
 
template<typename NumericT >
void house_update_A_left (matrix_base< NumericT > &A, vector_base< NumericT > &D, vcl_size_t start)
 This function applies a householder transformation to a matrix. A <- P * A with a householder reflection P. More...
 
template<typename NumericT >
void house_update_A_right (matrix_base< NumericT > &A, vector_base< NumericT > &D)
 This function applies a householder transformation to a matrix: A <- A * P with a householder reflection P. More...
 
template<typename NumericT >
void house_update_QL (matrix_base< NumericT > &Q, vector_base< NumericT > &D, vcl_size_t A_size1)
 This function updates the matrix Q, which is needed for the computation of the eigenvectors. More...
 
template<typename NumericT >
void givens_next (matrix_base< NumericT > &Q, vector_base< NumericT > &tmp1, vector_base< NumericT > &tmp2, int l, int m)
 This function updates the matrix Q. It is part of the tql2 algorithm. More...
 
template<typename NumericT , typename S1 >
void copy_vec (matrix_base< NumericT > &A, vector_base< S1 > &V, vcl_size_t row_start, vcl_size_t col_start, bool copy_col)
 This function copies a row or a column from a matrix to a vector. More...
 
template<typename NumericT >
void el_wise_mul_div (NumericT *matrix1, NumericT const *matrix2, NumericT const *matrix3, vcl_size_t size)
 Missing OpenMP kernel for nonnegative matrix factorization of a dense matrices. More...
 
template<typename NumericT >
void nmf (viennacl::matrix_base< NumericT > const &V, viennacl::matrix_base< NumericT > &W, viennacl::matrix_base< NumericT > &H, viennacl::linalg::nmf_config const &conf)
 The nonnegative matrix factorization (approximation) algorithm as suggested by Lee and Seung. Factorizes a matrix V with nonnegative entries into matrices W and H such that ||V - W*H|| is minimized. More...
 
template<typename ScalarT1 , typename ScalarT2 , typename FactorT >
viennacl::enable_if
< viennacl::is_scalar
< ScalarT1 >::value
&&viennacl::is_scalar
< ScalarT2 >::value
&&viennacl::is_any_scalar
< FactorT >::value >::type 
as (ScalarT1 &s1, ScalarT2 const &s2, FactorT const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha)
 
template<typename ScalarT1 , typename ScalarT2 , typename FactorT2 , typename ScalarT3 , typename FactorT3 >
viennacl::enable_if
< viennacl::is_scalar
< ScalarT1 >::value
&&viennacl::is_scalar
< ScalarT2 >::value
&&viennacl::is_scalar
< ScalarT3 >::value
&&viennacl::is_any_scalar
< FactorT2 >::value
&&viennacl::is_any_scalar
< FactorT3 >::value >::type 
asbs (ScalarT1 &s1, ScalarT2 const &s2, FactorT2 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, ScalarT3 const &s3, FactorT3 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename ScalarT1 , typename ScalarT2 , typename FactorT2 , typename ScalarT3 , typename FactorT3 >
viennacl::enable_if
< viennacl::is_scalar
< ScalarT1 >::value
&&viennacl::is_scalar
< ScalarT2 >::value
&&viennacl::is_scalar
< ScalarT3 >::value
&&viennacl::is_any_scalar
< FactorT2 >::value
&&viennacl::is_any_scalar
< FactorT3 >::value >::type 
asbs_s (ScalarT1 &s1, ScalarT2 const &s2, FactorT2 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, ScalarT3 const &s3, FactorT3 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename ScalarT1 , typename ScalarT2 >
viennacl::enable_if
< viennacl::is_scalar
< ScalarT1 >::value
&&viennacl::is_scalar
< ScalarT2 >::value >::type 
swap (ScalarT1 &s1, ScalarT2 &s2)
 Swaps the contents of two scalars, data is copied. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::compressed_matrix< NumericT, AlignmentV > &mat, const viennacl::vector_base< NumericT > &vec, NumericT alpha, viennacl::vector_base< NumericT > &result, NumericT beta)
 Carries out matrix-vector multiplication with a compressed_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::compressed_matrix< NumericT, AlignmentV > &sp_mat, const viennacl::matrix_base< NumericT > &d_mat, viennacl::matrix_base< NumericT > &result)
 Carries out sparse_matrix-matrix multiplication first matrix being compressed. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::compressed_matrix< NumericT, AlignmentV > &sp_mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT > &result)
 Carries out matrix-trans(matrix) multiplication first matrix being compressed and the second transposed. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::compressed_matrix< NumericT, AlignmentV > const &A, viennacl::compressed_matrix< NumericT, AlignmentV > const &B, viennacl::compressed_matrix< NumericT, AlignmentV > &C)
 Carries out sparse_matrix-sparse_matrix multiplication for CSR matrices. More...
 
template<typename NumericT , unsigned int AlignmentV>
void inplace_solve (compressed_matrix< NumericT, AlignmentV > const &L, vector_base< NumericT > &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 NumericT , unsigned int AlignmentV>
void inplace_solve (compressed_matrix< NumericT, AlignmentV > const &L, vector_base< NumericT > &vec, viennacl::linalg::lower_tag tag)
 Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions. More...
 
template<typename NumericT , unsigned int AlignmentV>
void inplace_solve (compressed_matrix< NumericT, AlignmentV > const &U, vector_base< NumericT > &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 NumericT , unsigned int AlignmentV>
void inplace_solve (compressed_matrix< NumericT, AlignmentV > const &U, vector_base< NumericT > &vec, viennacl::linalg::upper_tag tag)
 Inplace solution of a upper triangular compressed_matrix. Typically used for LU substitutions. More...
 
template<typename NumericT , unsigned int AlignmentV>
void inplace_solve (matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &proxy, vector_base< NumericT > &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 NumericT , unsigned int AlignmentV>
void inplace_solve (matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &proxy, vector_base< NumericT > &vec, viennacl::linalg::lower_tag tag)
 Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions. More...
 
template<typename NumericT , unsigned int AlignmentV>
void inplace_solve (matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &proxy, vector_base< NumericT > &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 NumericT , unsigned int AlignmentV>
void inplace_solve (matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &proxy, vector_base< NumericT > &vec, viennacl::linalg::upper_tag tag)
 Inplace solution of a upper triangular compressed_matrix with unit diagonal. Typically used for LU substitutions. More...
 
template<typename NumericT >
void prod_impl (const viennacl::compressed_compressed_matrix< NumericT > &mat, const viennacl::vector_base< NumericT > &vec, NumericT alpha, viennacl::vector_base< NumericT > &result, NumericT beta)
 Carries out matrix-vector multiplication with a compressed_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::coordinate_matrix< NumericT, AlignmentV > &mat, const viennacl::vector_base< NumericT > &vec, NumericT alpha, viennacl::vector_base< NumericT > &result, NumericT beta)
 Carries out matrix-vector multiplication with a coordinate_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::coordinate_matrix< NumericT, AlignmentV > &sp_mat, const viennacl::matrix_base< NumericT > &d_mat, viennacl::matrix_base< NumericT > &result)
 Carries out Compressed Matrix(COO)-Dense Matrix multiplication. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::coordinate_matrix< NumericT, AlignmentV > &sp_mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT > &result)
 Carries out Compressed Matrix(COO)-Dense Transposed Matrix multiplication. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::ell_matrix< NumericT, AlignmentV > &mat, const viennacl::vector_base< NumericT > &vec, NumericT alpha, viennacl::vector_base< NumericT > &result, NumericT beta)
 Carries out matrix-vector multiplication with a ell_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::ell_matrix< NumericT, AlignmentV > &sp_mat, const viennacl::matrix_base< NumericT > &d_mat, viennacl::matrix_base< NumericT > &result)
 Carries out ell_matrix-d_matrix multiplication. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::ell_matrix< NumericT, AlignmentV > &sp_mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT > &result)
 Carries out matrix-trans(matrix) multiplication first matrix being sparse ell and the second dense transposed. More...
 
template<typename NumericT , typename IndexT >
void prod_impl (const viennacl::sliced_ell_matrix< NumericT, IndexT > &mat, const viennacl::vector_base< NumericT > &vec, NumericT alpha, viennacl::vector_base< NumericT > &result, NumericT beta)
 Carries out matrix-vector multiplication with a sliced_ell_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::hyb_matrix< NumericT, AlignmentV > &mat, const viennacl::vector_base< NumericT > &vec, NumericT alpha, viennacl::vector_base< NumericT > &result, NumericT beta)
 Carries out matrix-vector multiplication with a hyb_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::hyb_matrix< NumericT, AlignmentV > &mat, const viennacl::matrix_base< NumericT > &d_mat, viennacl::matrix_base< NumericT > &result)
 Carries out sparse-matrix-dense-matrix multiplication with a hyb_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (const viennacl::hyb_matrix< NumericT, AlignmentV > &mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT > &result)
 Carries out sparse-matrix-transposed-dense-matrix multiplication with a hyb_matrix. More...
 
template<unsigned int IndexNum>
unsigned int row_C_scan_symbolic_vector_N (unsigned int const *row_indices_B, unsigned int const *B_row_buffer, unsigned int const *B_col_buffer, unsigned int B_size2, unsigned int const *row_C_vector_input, unsigned int const *row_C_vector_input_end, unsigned int *row_C_vector_output)
 Merges up to IndexNum rows from B into the result buffer. More...
 
template<typename OutputWriterT >
unsigned int row_C_scan_symbolic_vector_1 (unsigned int const *input1_begin, unsigned int const *input1_end, unsigned int const *input2_begin, unsigned int const *input2_end, unsigned int termination_index, unsigned int *output_begin)
 
unsigned int row_C_scan_symbolic_vector (unsigned int row_start_A, unsigned int row_end_A, unsigned int const *A_col_buffer, unsigned int const *B_row_buffer, unsigned int const *B_col_buffer, unsigned int B_size2, unsigned int *row_C_vector_1, unsigned int *row_C_vector_2, unsigned int *row_C_vector_3)
 
template<unsigned int IndexNum, typename NumericT >
unsigned int row_C_scan_numeric_vector_N (unsigned int const *row_indices_B, NumericT const *val_A, unsigned int const *B_row_buffer, unsigned int const *B_col_buffer, NumericT const *B_elements, unsigned int B_size2, unsigned int const *row_C_vector_input, unsigned int const *row_C_vector_input_end, NumericT *row_C_vector_input_values, unsigned int *row_C_vector_output, NumericT *row_C_vector_output_values)
 Merges up to IndexNum rows from B into the result buffer. More...
 
template<typename NumericT >
unsigned int row_C_scan_numeric_vector_1 (unsigned int const *input1_index_begin, unsigned int const *input1_index_end, NumericT const *input1_values_begin, NumericT factor1, unsigned int const *input2_index_begin, unsigned int const *input2_index_end, NumericT const *input2_values_begin, NumericT factor2, unsigned int termination_index, unsigned int *output_index_begin, NumericT *output_values_begin)
 
template<typename NumericT >
void row_C_scan_numeric_vector (unsigned int row_start_A, unsigned int row_end_A, unsigned int const *A_col_buffer, NumericT const *A_elements, unsigned int const *B_row_buffer, unsigned int const *B_col_buffer, NumericT const *B_elements, unsigned int B_size2, unsigned int row_start_C, unsigned int row_end_C, unsigned int *C_col_buffer, NumericT *C_elements, unsigned int *row_C_vector_1, NumericT *row_C_vector_1_values, unsigned int *row_C_vector_2, NumericT *row_C_vector_2_values, unsigned int *row_C_vector_3, NumericT *row_C_vector_3_values)
 
template<typename DestNumericT , typename SrcNumericT >
void convert (vector_base< DestNumericT > &dest, vector_base< SrcNumericT > const &src)
 
template<typename NumericT , typename ScalarT1 >
void av (vector_base< NumericT > &vec1, vector_base< NumericT > const &vec2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha)
 
template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void avbv (vector_base< NumericT > &vec1, vector_base< NumericT > const &vec2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< NumericT > const &vec3, ScalarT2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void avbv_v (vector_base< NumericT > &vec1, vector_base< NumericT > const &vec2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< NumericT > const &vec3, ScalarT2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT >
void vector_assign (vector_base< NumericT > &vec1, const NumericT &alpha, bool up_to_internal_size=false)
 Assign a constant value to a vector (-range/-slice) More...
 
template<typename NumericT >
void vector_swap (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2)
 Swaps the contents of two vectors, data is copied. More...
 
template<typename NumericT , typename OpT >
void element_op (vector_base< NumericT > &vec1, vector_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_element_binary< OpT > > const &proxy)
 Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax) More...
 
template<typename NumericT , typename OpT >
void element_op (vector_base< NumericT > &vec1, vector_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_element_unary< OpT > > const &proxy)
 Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax) More...
 
template<typename NumericT , typename ScalarT >
void inner_prod_impl (vector_base< NumericT > const &vec1, vector_base< NumericT > const &vec2, ScalarT &result)
 Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2). More...
 
template<typename NumericT >
void inner_prod_impl (vector_base< NumericT > const &x, vector_tuple< NumericT > const &vec_tuple, vector_base< NumericT > &result)
 
template<typename NumericT , typename ScalarT >
void norm_1_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the l^1-norm of a vector. More...
 
template<typename NumericT , typename ScalarT >
void norm_2_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the l^2-norm of a vector - implementation. More...
 
template<typename NumericT , typename ScalarT >
void norm_inf_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the supremum-norm of a vector. More...
 
template<typename NumericT >
vcl_size_t index_norm_inf (vector_base< NumericT > const &vec1)
 Computes the index of the first entry that is equal to the supremum-norm in modulus. More...
 
template<typename NumericT , typename ScalarT >
void max_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the maximum of a vector. More...
 
template<typename NumericT , typename ScalarT >
void min_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the minimum of a vector. More...
 
template<typename NumericT , typename ScalarT >
void sum_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the sum of all elements from the vector. More...
 
template<typename NumericT >
void plane_rotation (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2, NumericT alpha, NumericT beta)
 Computes a plane rotation of two vectors. More...
 
template<typename NumericT >
void inclusive_scan (vector_base< NumericT > const &vec1, vector_base< NumericT > &vec2)
 This function implements an inclusive scan on the host using OpenMP. More...
 
template<typename NumericT >
void exclusive_scan (vector_base< NumericT > const &vec1, vector_base< NumericT > &vec2)
 This function implements an exclusive scan on the host using OpenMP. More...
 

Detailed Description

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

Function Documentation

template<typename NumericT , typename ScalarT1 >
void viennacl::linalg::host_based::am ( matrix_base< NumericT > &  mat1,
matrix_base< NumericT > const &  mat2,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Definition at line 231 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::host_based::ambm ( matrix_base< NumericT > &  mat1,
matrix_base< NumericT > const &  mat2,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
matrix_base< NumericT > const &  mat3,
ScalarT2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 314 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::host_based::ambm_m ( matrix_base< NumericT > &  mat1,
matrix_base< NumericT > const &  mat2,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
matrix_base< NumericT > const &  mat3,
ScalarT2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 449 of file matrix_operations.hpp.

template<typename ScalarT1 , typename ScalarT2 , typename FactorT >
viennacl::enable_if< viennacl::is_scalar<ScalarT1>::value && viennacl::is_scalar<ScalarT2>::value && viennacl::is_any_scalar<FactorT>::value >::type viennacl::linalg::host_based::as ( ScalarT1 &  s1,
ScalarT2 const &  s2,
FactorT const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Definition at line 46 of file scalar_operations.hpp.

template<typename ScalarT1 , typename ScalarT2 , typename FactorT2 , typename ScalarT3 , typename FactorT3 >
viennacl::enable_if< viennacl::is_scalar<ScalarT1>::value && viennacl::is_scalar<ScalarT2>::value && viennacl::is_scalar<ScalarT3>::value && viennacl::is_any_scalar<FactorT2>::value && viennacl::is_any_scalar<FactorT3>::value >::type viennacl::linalg::host_based::asbs ( ScalarT1 &  s1,
ScalarT2 const &  s2,
FactorT2 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
ScalarT3 const &  s3,
FactorT3 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 73 of file scalar_operations.hpp.

template<typename ScalarT1 , typename ScalarT2 , typename FactorT2 , typename ScalarT3 , typename FactorT3 >
viennacl::enable_if< viennacl::is_scalar<ScalarT1>::value && viennacl::is_scalar<ScalarT2>::value && viennacl::is_scalar<ScalarT3>::value && viennacl::is_any_scalar<FactorT2>::value && viennacl::is_any_scalar<FactorT3>::value >::type viennacl::linalg::host_based::asbs_s ( ScalarT1 &  s1,
ScalarT2 const &  s2,
FactorT2 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
ScalarT3 const &  s3,
FactorT3 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 108 of file scalar_operations.hpp.

template<typename NumericT , typename ScalarT1 >
void viennacl::linalg::host_based::av ( vector_base< NumericT > &  vec1,
vector_base< NumericT > const &  vec2,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Definition at line 88 of file vector_operations.hpp.

template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::host_based::avbv ( vector_base< NumericT > &  vec1,
vector_base< NumericT > const &  vec2,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
vector_base< NumericT > const &  vec3,
ScalarT2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 127 of file vector_operations.hpp.

template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::host_based::avbv_v ( vector_base< NumericT > &  vec1,
vector_base< NumericT > const &  vec2,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
vector_base< NumericT > const &  vec3,
ScalarT2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 197 of file vector_operations.hpp.

template<typename NumericT , typename VectorType >
void viennacl::linalg::host_based::bidiag_pack ( matrix_base< NumericT > &  A,
VectorType &  dh,
VectorType &  sh 
)

Definition at line 1722 of file matrix_operations.hpp.

template<typename NumericT , typename S1 >
void viennacl::linalg::host_based::bidiag_pack_impl ( matrix_base< NumericT > &  A,
vector_base< S1 > &  D,
vector_base< S1 > &  S 
)

This function stores the diagonal and the superdiagonal of a matrix in two vectors.

Parameters
AThe matrix from which the vectors will be extracted of.
DThe vector in which the diagonal of the matrix will be stored in.
SThe vector in which the superdiagonal of the matrix will be stored in.

Definition at line 1661 of file matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::bluestein ( viennacl::vector< NumericT, AlignmentV > &  in,
viennacl::vector< NumericT, AlignmentV > &  out,
vcl_size_t   
)

Bluestein's algorithm for computing Fourier transformation.

Currently, Works only for sizes of input data which less than 2^16. Uses a lot of additional memory, but should be fast for any size of data. Serial implementation has something about o(n * lg n) complexity

Definition at line 599 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::complex_to_real ( viennacl::vector_base< NumericT > const &  in,
viennacl::vector_base< NumericT > &  out,
vcl_size_t  size 
)

Create real vector from complex vector (even elements(2*k) = real part, odd elements(2*k+1) = imaginary part)

Definition at line 818 of file fft_operations.hpp.

template<typename DestNumericT , typename SrcNumericT >
void viennacl::linalg::host_based::convert ( matrix_base< DestNumericT > &  mat1,
matrix_base< SrcNumericT > const &  mat2 
)

Definition at line 58 of file matrix_operations.hpp.

template<typename DestNumericT , typename SrcNumericT >
void viennacl::linalg::host_based::convert ( vector_base< DestNumericT > &  dest,
vector_base< SrcNumericT > const &  src 
)

Definition at line 68 of file vector_operations.hpp.

template<typename NumericT , typename S1 >
void viennacl::linalg::host_based::copy_vec ( matrix_base< NumericT > &  A,
vector_base< S1 > &  V,
vcl_size_t  row_start,
vcl_size_t  col_start,
bool  copy_col 
)

This function copies a row or a column from a matrix to a vector.

Parameters
AThe matrix where to copy from.
VThe vector to fill with data.
row_startThe number of the first row to copy.
col_startThe number of the first column to copy.
copy_colSet to TRUE to copy a column, FALSE to copy a row.

Definition at line 1983 of file matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::direct ( viennacl::vector< NumericT, AlignmentV > const &  in,
viennacl::vector< NumericT, AlignmentV > &  out,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  batch_num,
NumericT  sign = NumericT(-1),
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Direct 1D algorithm for computing Fourier transformation.

Works on any sizes of data. Serial implementation has o(n^2) complexity

Definition at line 251 of file fft_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::direct ( viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > const &  in,
viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &  out,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  batch_num,
NumericT  sign = NumericT(-1),
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Direct 2D algorithm for computing Fourier transformation.

Works on any sizes of data. Serial implementation has o(n^2) complexity

Definition at line 274 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::el_wise_mul_div ( NumericT matrix1,
NumericT const *  matrix2,
NumericT const *  matrix3,
vcl_size_t  size 
)

Missing OpenMP kernel for nonnegative matrix factorization of a dense matrices.

Definition at line 132 of file nmf_operations.hpp.

template<typename NumericT , typename OpT >
void viennacl::linalg::host_based::element_op ( vector_base< NumericT > &  vec1,
vector_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_element_binary< OpT > > 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

Definition at line 336 of file vector_operations.hpp.

template<typename NumericT , typename OpT >
void viennacl::linalg::host_based::element_op ( vector_base< NumericT > &  vec1,
vector_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_element_unary< OpT > > 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

Definition at line 369 of file vector_operations.hpp.

template<typename NumericT , typename OpT >
void viennacl::linalg::host_based::element_op ( matrix_base< NumericT > &  A,
matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_element_binary< OpT > > const &  proxy 
)

Implementation of the element-wise operations A = B .* C and A = B ./ C (using MATLAB syntax)

Parameters
AThe result matrix (or -range, or -slice)
proxyThe proxy object holding B, C, and the operation

Definition at line 848 of file matrix_operations.hpp.

template<typename NumericT , typename OpT >
void viennacl::linalg::host_based::element_op ( matrix_base< NumericT > &  A,
matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_element_unary< OpT > > const &  proxy 
)

Definition at line 922 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::exclusive_scan ( vector_base< NumericT > const &  vec1,
vector_base< NumericT > &  vec2 
)

This function implements an exclusive scan on the host using OpenMP.

Given an element vector (x_0, x_1, ..., x_{n-1}), this routine computes (0, x_0, x_0 + x_1, ..., x_0 + x_1 + ... + x_{n-2})

Parameters
vec1Input vector: Gets overwritten by the routine.
vec2The output vector. Either idential to vec1 or non-overlapping.

Definition at line 1176 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::extract_L ( compressed_matrix< NumericT > const &  A,
compressed_matrix< NumericT > &  L 
)

Definition at line 53 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::extract_LU ( compressed_matrix< NumericT > const &  A,
compressed_matrix< NumericT > &  L,
compressed_matrix< NumericT > &  U 
)

Definition at line 258 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::fft_direct ( std::complex< NumericT > *  input_complex,
std::complex< NumericT > *  output,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  batch_num,
NumericT  sign,
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Direct algoritm kenrnel.

Definition at line 205 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::fft_radix2 ( std::complex< NumericT > *  input_complex,
vcl_size_t  batch_num,
vcl_size_t  bit_size,
vcl_size_t  size,
vcl_size_t  stride,
NumericT  sign,
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Radix-2 algorithm for computing Fourier transformation. Kernel for computing smaller amount of data.

Definition at line 389 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::fft_radix2_local ( std::complex< NumericT > *  input_complex,
std::complex< NumericT > *  lcl_input,
vcl_size_t  batch_num,
vcl_size_t  bit_size,
vcl_size_t  size,
vcl_size_t  stride,
NumericT  sign,
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Radix-2 algorithm for computing Fourier transformation. Kernel for computing bigger amount of data.

Definition at line 447 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::givens_next ( matrix_base< NumericT > &  Q,
vector_base< NumericT > &  tmp1,
vector_base< NumericT > &  tmp2,
int  l,
int  m 
)

This function updates the matrix Q. It is part of the tql2 algorithm.

Parameters
QThe matrix to be updated.
tmp1Vector with data from the tql2 algorithm.
tmp2Vector with data from the tql2 algorithm.
lData from the tql2 algorithm.
mData from the tql2 algorithm.

Definition at line 1896 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::house_update_A_left ( matrix_base< NumericT > &  A,
vector_base< NumericT > &  D,
vcl_size_t  start 
)

This function applies a householder transformation to a matrix. A <- P * A with a householder reflection P.

Parameters
AThe matrix to be updated.
DThe normalized householder vector.
startThe repetition counter.

Definition at line 1739 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::house_update_A_right ( matrix_base< NumericT > &  A,
vector_base< NumericT > &  D 
)

This function applies a householder transformation to a matrix: A <- A * P with a householder reflection P.

Parameters
AThe matrix to be updated.
DThe normalized householder vector.

Definition at line 1804 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::house_update_QL ( matrix_base< NumericT > &  Q,
vector_base< NumericT > &  D,
vcl_size_t  A_size1 
)

This function updates the matrix Q, which is needed for the computation of the eigenvectors.

Parameters
QThe matrix to be updated.
DThe householder vector.
A_size1size1 of matrix A

Definition at line 1870 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::icc_chow_patel_sweep ( compressed_matrix< NumericT > &  L,
vector< NumericT > &  aij_L 
)

Performs one nonlinear relaxation step in the Chow-Patel-ICC using OpenMP (cf. Algorithm 3 in paper, but for L rather than U)

Definition at line 185 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::icc_scale ( compressed_matrix< NumericT > const &  A,
compressed_matrix< NumericT > &  L 
)

Scales the values extracted from A such that A' = DAD has unit diagonal. Updates values from A in L and U accordingly.

Definition at line 124 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::ilu_chow_patel_sweep ( compressed_matrix< NumericT > &  L,
vector< NumericT > const &  aij_L,
compressed_matrix< NumericT > &  U_trans,
vector< NumericT > const &  aij_U_trans 
)

Performs one nonlinear relaxation step in the Chow-Patel-ILU using OpenMP (cf. Algorithm 2 in paper)

Definition at line 503 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::ilu_form_neumann_matrix ( compressed_matrix< NumericT > &  R,
vector< NumericT > &  diag_R 
)

Definition at line 626 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::ilu_scale ( compressed_matrix< NumericT > const &  A,
compressed_matrix< NumericT > &  L,
compressed_matrix< NumericT > &  U 
)

Scales the values extracted from A such that A' = DAD has unit diagonal. Updates values from A in L and U accordingly.

Definition at line 349 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::ilu_transpose ( compressed_matrix< NumericT > const &  A,
compressed_matrix< NumericT > &  B 
)

Definition at line 431 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::inclusive_scan ( vector_base< NumericT > const &  vec1,
vector_base< NumericT > &  vec2 
)

This function implements an inclusive scan on the host using OpenMP.

Given an element vector (x_0, x_1, ..., x_{n-1}), this routine computes (x_0, x_0 + x_1, ..., x_0 + x_1 + ... + x_{n-1})

Parameters
vec1Input vector: Gets overwritten by the routine.
vec2The output vector. Either idential to vec1 or non-overlapping.

Definition at line 1161 of file vector_operations.hpp.

template<typename NumericT >
vcl_size_t viennacl::linalg::host_based::index_norm_inf ( vector_base< NumericT > 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.

Definition at line 831 of file vector_operations.hpp.

template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::inner_prod_impl ( vector_base< NumericT > const &  vec1,
vector_base< NumericT > const &  vec2,
ScalarT &  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)

Definition at line 497 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::inner_prod_impl ( vector_base< NumericT > const &  x,
vector_tuple< NumericT > const &  vec_tuple,
vector_base< NumericT > &  result 
)

Definition at line 518 of file vector_operations.hpp.

template<typename NumericT , typename SolverTagT >
void viennacl::linalg::host_based::inplace_solve ( matrix_base< NumericT > const &  A,
matrix_base< NumericT > &  B,
SolverTagT   
)

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

Definition at line 130 of file direct_solve.hpp.

template<typename NumericT , typename SolverTagT >
void viennacl::linalg::host_based::inplace_solve ( matrix_base< NumericT > const &  mat,
vector_base< NumericT > &  vec,
SolverTagT   
)

Definition at line 266 of file direct_solve.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::inplace_solve ( compressed_matrix< NumericT, AlignmentV > const &  L,
vector_base< NumericT > &  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

Definition at line 613 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::inplace_solve ( compressed_matrix< NumericT, AlignmentV > const &  L,
vector_base< NumericT > &  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

Definition at line 632 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::inplace_solve ( compressed_matrix< NumericT, AlignmentV > const &  U,
vector_base< NumericT > &  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

Definition at line 652 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::inplace_solve ( compressed_matrix< NumericT, AlignmentV > const &  U,
vector_base< NumericT > &  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

Definition at line 671 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::inplace_solve ( matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &  proxy,
vector_base< NumericT > &  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

Definition at line 968 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::inplace_solve ( matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &  proxy,
vector_base< NumericT > &  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

Definition at line 989 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::inplace_solve ( matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &  proxy,
vector_base< NumericT > &  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

Definition at line 1011 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::inplace_solve ( matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &  proxy,
vector_base< NumericT > &  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

Definition at line 1033 of file sparse_matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::matrix_assign ( matrix_base< NumericT > &  mat,
NumericT  s,
bool  clear = false 
)

Definition at line 585 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::matrix_column ( const matrix_base< NumericT > &  mat,
unsigned int  j,
vector_base< NumericT > &  vec 
)

Definition at line 800 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::matrix_diag_from_vector ( const vector_base< NumericT > &  vec,
int  k,
matrix_base< NumericT > &  mat 
)

Definition at line 671 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::matrix_diag_to_vector ( const matrix_base< NumericT > &  mat,
int  k,
vector_base< NumericT > &  vec 
)

Definition at line 718 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::matrix_diagonal_assign ( matrix_base< NumericT > &  mat,
NumericT  s 
)

Definition at line 632 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::matrix_row ( const matrix_base< NumericT > &  mat,
unsigned int  i,
vector_base< NumericT > &  vec 
)

Definition at line 763 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::max_impl ( vector_base< NumericT > const &  vec1,
ScalarT &  result 
)

Computes the maximum of a vector.

Parameters
vec1The vector
resultThe result scalar

Definition at line 891 of file vector_operations.hpp.

template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::min_impl ( vector_base< NumericT > const &  vec1,
ScalarT &  result 
)

Computes the minimum of a vector.

Parameters
vec1The vector
resultThe result scalar

Definition at line 940 of file vector_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::multiply_complex ( viennacl::vector< NumericT, AlignmentV > const &  input1,
viennacl::vector< NumericT, AlignmentV > const &  input2,
viennacl::vector< NumericT, AlignmentV > &  output 
)

Complex multiplikation of two vectors.

Definition at line 697 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::nmf ( viennacl::matrix_base< NumericT > const &  V,
viennacl::matrix_base< NumericT > &  W,
viennacl::matrix_base< NumericT > &  H,
viennacl::linalg::nmf_config const &  conf 
)

The nonnegative matrix factorization (approximation) algorithm as suggested by Lee and Seung. Factorizes a matrix V with nonnegative entries into matrices W and H such that ||V - W*H|| is minimized.

Parameters
VInput matrix
WFirst factor
HSecond factor
confA configuration object holding tolerances and the like

Definition at line 156 of file nmf_operations.hpp.

template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::norm_1_impl ( vector_base< NumericT > const &  vec1,
ScalarT &  result 
)

Computes the l^1-norm of a vector.

Parameters
vec1The vector
resultThe result scalar

Definition at line 648 of file vector_operations.hpp.

template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::norm_2_impl ( vector_base< NumericT > const &  vec1,
ScalarT &  result 
)

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

Parameters
vec1The vector
resultThe result scalar

Definition at line 761 of file vector_operations.hpp.

template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::norm_inf_impl ( vector_base< NumericT > const &  vec1,
ScalarT &  result 
)

Computes the supremum-norm of a vector.

Parameters
vec1The vector
resultThe result scalar

Definition at line 781 of file vector_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::normalize ( viennacl::vector< NumericT, AlignmentV > &  input)

Normalize vector with his own size.

Definition at line 684 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_bicgstab_prod ( compressed_matrix< NumericT > const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > const &  r0star,
vector_base< NumericT > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size,
vcl_size_t  buffer_chunk_offset 
)

Performs a fused matrix-vector product with a compressed_matrix for an efficient pipelined BiCGStab algorithm.

This routines computes for a matrix A and vectors 'p', 'Ap', and 'r0': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap), inner_prod(Ap, r0)

Definition at line 607 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_bicgstab_prod ( coordinate_matrix< NumericT > const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > const &  r0star,
vector_base< NumericT > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size,
vcl_size_t  buffer_chunk_offset 
)

Performs a fused matrix-vector product with a coordinate_matrix for an efficient pipelined BiCGStab algorithm.

This routines computes for a matrix A and vectors 'p', 'Ap', and 'r0': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap), inner_prod(Ap, r0)

Definition at line 627 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_bicgstab_prod ( ell_matrix< NumericT > const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > const &  r0star,
vector_base< NumericT > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size,
vcl_size_t  buffer_chunk_offset 
)

Performs a fused matrix-vector product with an ell_matrix for an efficient pipelined BiCGStab algorithm.

This routines computes for a matrix A and vectors 'p', 'Ap', and 'r0': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap), inner_prod(Ap, r0)

Definition at line 647 of file iterative_operations.hpp.

template<typename NumericT , typename IndexT >
void viennacl::linalg::host_based::pipelined_bicgstab_prod ( sliced_ell_matrix< NumericT, IndexT > const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > const &  r0star,
vector_base< NumericT > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size,
vcl_size_t  buffer_chunk_offset 
)

Performs a fused matrix-vector product with a sliced_ell_matrix for an efficient pipelined BiCGStab algorithm.

This routines computes for a matrix A and vectors 'p', 'Ap', and 'r0': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap), inner_prod(Ap, r0)

Definition at line 667 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_bicgstab_prod ( hyb_matrix< NumericT > const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > const &  r0star,
vector_base< NumericT > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size,
vcl_size_t  buffer_chunk_offset 
)

Performs a fused matrix-vector product with a hyb_matrix for an efficient pipelined BiCGStab algorithm.

This routines computes for a matrix A and vectors 'p', 'Ap', and 'r0': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap), inner_prod(Ap, r0)

Definition at line 687 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_bicgstab_update_s ( vector_base< NumericT > &  s,
vector_base< NumericT > &  r,
vector_base< NumericT > const &  Ap,
vector_base< NumericT > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size,
vcl_size_t  buffer_chunk_offset 
)

Performs a joint vector update operation needed for an efficient pipelined BiCGStab algorithm.

This routines computes for vectors 's', 'r', 'Ap': s = r - alpha * Ap with alpha obtained from a reduction step on the 0th and the 3rd out of 6 chunks in inner_prod_buffer and runs the parallel reduction stage for computing inner_prod(s,s)

Definition at line 504 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_bicgstab_vector_update ( vector_base< NumericT > &  result,
NumericT  alpha,
vector_base< NumericT > &  p,
NumericT  omega,
vector_base< NumericT > const &  s,
vector_base< NumericT > &  residual,
vector_base< NumericT > const &  As,
NumericT  beta,
vector_base< NumericT > const &  Ap,
vector_base< NumericT > const &  r0star,
vector_base< NumericT > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size 
)

Performs a joint vector update operation needed for an efficient pipelined BiCGStab algorithm.

x_{j+1} = x_j + alpha * p_j + omega * s_j r_{j+1} = s_j - omega * t_j p_{j+1} = r_{j+1} + beta * (p_j - omega * q_j) and compute first stage of r_dot_r0 = <r_{j+1}, r_o^*> for use in next iteration

Definition at line 554 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_cg_prod ( compressed_matrix< NumericT > const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > &  inner_prod_buffer 
)

Performs a fused matrix-vector product with a compressed_matrix for an efficient pipelined CG algorithm.

This routines computes for a matrix A and vectors 'p' and 'Ap': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap)

Definition at line 413 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_cg_prod ( coordinate_matrix< NumericT > const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > &  inner_prod_buffer 
)

Performs a fused matrix-vector product with a coordinate_matrix for an efficient pipelined CG algorithm.

This routines computes for a matrix A and vectors 'p' and 'Ap': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap)

Definition at line 431 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_cg_prod ( ell_matrix< NumericT > const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > &  inner_prod_buffer 
)

Performs a fused matrix-vector product with an ell_matrix for an efficient pipelined CG algorithm.

This routines computes for a matrix A and vectors 'p' and 'Ap': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap)

Definition at line 448 of file iterative_operations.hpp.

template<typename NumericT , typename IndexT >
void viennacl::linalg::host_based::pipelined_cg_prod ( sliced_ell_matrix< NumericT, IndexT > const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > &  inner_prod_buffer 
)

Performs a fused matrix-vector product with an sliced_ell_matrix for an efficient pipelined CG algorithm.

This routines computes for a matrix A and vectors 'p' and 'Ap': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap)

Definition at line 465 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_cg_prod ( hyb_matrix< NumericT > const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > &  inner_prod_buffer 
)

Performs a fused matrix-vector product with an hyb_matrix for an efficient pipelined CG algorithm.

This routines computes for a matrix A and vectors 'p' and 'Ap': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap)

Definition at line 484 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::pipelined_cg_vector_update ( vector_base< NumericT > &  result,
NumericT  alpha,
vector_base< NumericT > &  p,
vector_base< NumericT > &  r,
vector_base< NumericT > const &  Ap,
NumericT  beta,
vector_base< NumericT > &  inner_prod_buffer 
)

Performs a joint vector update operation needed for an efficient pipelined CG algorithm.

This routines computes for vectors 'result', 'p', 'r', 'Ap': result += alpha * p; r -= alpha * Ap; p = r + beta * p; and runs the parallel reduction stage for computing inner_prod(r,r)

Definition at line 367 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::host_based::pipelined_gmres_gram_schmidt_stage1 ( vector_base< T > const &  device_krylov_basis,
vcl_size_t  v_k_size,
vcl_size_t  v_k_internal_size,
vcl_size_t  k,
vector_base< T > &  vi_in_vk_buffer,
vcl_size_t  buffer_chunk_size 
)

Computes first reduction stage for multiple inner products <v_i, v_k>, i=0..k-1.

All vectors v_i are stored column-major in the array 'device_krylov_basis', where each vector has an actual length 'v_k_size', but might be padded to have 'v_k_internal_size'

Definition at line 760 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::host_based::pipelined_gmres_gram_schmidt_stage2 ( vector_base< T > &  device_krylov_basis,
vcl_size_t  v_k_size,
vcl_size_t  v_k_internal_size,
vcl_size_t  k,
vector_base< T > const &  vi_in_vk_buffer,
vector_base< T > &  R_buffer,
vcl_size_t  krylov_dim,
vector_base< T > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size 
)

Computes the second reduction stage for multiple inner products <v_i, v_k>, i=0..k-1, then updates v_k -= <v_i, v_k> v_i and computes the first reduction stage for ||v_k||.

All vectors v_i are stored column-major in the array 'device_krylov_basis', where each vector has an actual length 'v_k_size', but might be padded to have 'v_k_internal_size'

Definition at line 792 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::host_based::pipelined_gmres_normalize_vk ( vector_base< T > &  v_k,
vector_base< T > const &  residual,
vector_base< T > &  R_buffer,
vcl_size_t  offset_in_R,
vector_base< T > const &  inner_prod_buffer,
vector_base< T > &  r_dot_vk_buffer,
vcl_size_t  buffer_chunk_size,
vcl_size_t  buffer_chunk_offset 
)

Performs a vector normalization needed for an efficient pipelined GMRES algorithm.

This routines computes for vectors 'r', 'v_k': Second reduction step for ||v_k|| v_k /= ||v_k|| First reduction step for <r, v_k>

Definition at line 711 of file iterative_operations.hpp.

template<typename MatrixType , typename T >
void viennacl::linalg::host_based::pipelined_gmres_prod ( MatrixType const &  A,
vector_base< T > const &  p,
vector_base< T > &  Ap,
vector_base< T > &  inner_prod_buffer 
)

Definition at line 866 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::host_based::pipelined_gmres_update_result ( vector_base< T > &  result,
vector_base< T > const &  residual,
vector_base< T > const &  krylov_basis,
vcl_size_t  v_k_size,
vcl_size_t  v_k_internal_size,
vector_base< T > const &  coefficients,
vcl_size_t  k 
)

Computes x += eta_0 r + sum_{i=1}^{k-1} eta_i v_{i-1}.

Definition at line 836 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::plane_rotation ( vector_base< NumericT > &  vec1,
vector_base< NumericT > &  vec2,
NumericT  alpha,
NumericT  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

Definition at line 1020 of file vector_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::compressed_matrix< NumericT, AlignmentV > &  mat,
const viennacl::vector_base< NumericT > &  vec,
NumericT  alpha,
viennacl::vector_base< NumericT > &  result,
NumericT  beta 
)

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

Definition at line 111 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::compressed_matrix< NumericT, AlignmentV > &  sp_mat,
const viennacl::matrix_base< NumericT > &  d_mat,
viennacl::matrix_base< NumericT > &  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

Definition at line 153 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::compressed_matrix< NumericT, AlignmentV > &  sp_mat,
const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > &  d_mat,
viennacl::matrix_base< NumericT > &  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

Definition at line 239 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( viennacl::compressed_matrix< NumericT, AlignmentV > const &  A,
viennacl::compressed_matrix< NumericT, AlignmentV > const &  B,
viennacl::compressed_matrix< NumericT, AlignmentV > &  C 
)

Carries out sparse_matrix-sparse_matrix multiplication for CSR matrices.

Implementation of the convenience expression C = prod(A, B); Based on computing C(i, :) = A(i, :) * B via merging the respective rows of B

Parameters
ALeft factor
BRight factor
CResult matrix

Definition at line 328 of file sparse_matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::prod_impl ( const matrix_base< NumericT > &  mat,
bool  trans,
const vector_base< NumericT > &  vec,
vector_base< NumericT > &  result 
)

Carries out matrix-vector multiplication.

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

Parameters
matThe matrix
transFlag whether mat is to be transposed
vecThe vector
resultThe result vector

Definition at line 993 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::prod_impl ( const viennacl::compressed_compressed_matrix< NumericT > &  mat,
const viennacl::vector_base< NumericT > &  vec,
NumericT  alpha,
viennacl::vector_base< NumericT > &  result,
NumericT  beta 
)

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

Definition at line 1062 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::coordinate_matrix< NumericT, AlignmentV > &  mat,
const viennacl::vector_base< NumericT > &  vec,
NumericT  alpha,
viennacl::vector_base< NumericT > &  result,
NumericT  beta 
)

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

Definition at line 1178 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::coordinate_matrix< NumericT, AlignmentV > &  sp_mat,
const viennacl::matrix_base< NumericT > &  d_mat,
viennacl::matrix_base< NumericT > &  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

Definition at line 1214 of file sparse_matrix_operations.hpp.

template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::host_based::prod_impl ( const matrix_base< NumericT > &  A,
bool  trans_A,
const matrix_base< NumericT > &  B,
bool  trans_B,
matrix_base< NumericT > &  C,
ScalarT1  alpha,
ScalarT2  beta 
)

Carries out matrix-matrix multiplication.

Implementation of C = prod(A, B);

Definition at line 1239 of file matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::coordinate_matrix< NumericT, AlignmentV > &  sp_mat,
const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > &  d_mat,
viennacl::matrix_base< NumericT > &  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

Definition at line 1328 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::ell_matrix< NumericT, AlignmentV > &  mat,
const viennacl::vector_base< NumericT > &  vec,
NumericT  alpha,
viennacl::vector_base< NumericT > &  result,
NumericT  beta 
)

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

Definition at line 1459 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::ell_matrix< NumericT, AlignmentV > &  sp_mat,
const viennacl::matrix_base< NumericT > &  d_mat,
viennacl::matrix_base< NumericT > &  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

Definition at line 1505 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::ell_matrix< NumericT, AlignmentV > &  sp_mat,
const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > &  d_mat,
viennacl::matrix_base< NumericT > &  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

Definition at line 1627 of file sparse_matrix_operations.hpp.

template<typename NumericT , typename IndexT >
void viennacl::linalg::host_based::prod_impl ( const viennacl::sliced_ell_matrix< NumericT, IndexT > &  mat,
const viennacl::vector_base< NumericT > &  vec,
NumericT  alpha,
viennacl::vector_base< NumericT > &  result,
NumericT  beta 
)

Carries out matrix-vector multiplication with a sliced_ell_matrix.

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

Parameters
matThe matrix
vecThe vector
resultThe result vector

Definition at line 1753 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::hyb_matrix< NumericT, AlignmentV > &  mat,
const viennacl::vector_base< NumericT > &  vec,
NumericT  alpha,
viennacl::vector_base< NumericT > &  result,
NumericT  beta 
)

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

Definition at line 1829 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::hyb_matrix< NumericT, AlignmentV > &  mat,
const viennacl::matrix_base< NumericT > &  d_mat,
viennacl::matrix_base< NumericT > &  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

Definition at line 1897 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::prod_impl ( const viennacl::hyb_matrix< NumericT, AlignmentV > &  mat,
const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > &  d_mat,
viennacl::matrix_base< NumericT > &  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

Definition at line 1990 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::radix2 ( viennacl::vector< NumericT, AlignmentV > &  in,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  batch_num,
NumericT  sign = NumericT(-1),
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Radix-2 1D algorithm for computing Fourier transformation.

Works only on power-of-two sizes of data. Serial implementation has o(n * lg n) complexity. This is a Cooley-Tukey algorithm

Definition at line 525 of file fft_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::radix2 ( viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &  in,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  batch_num,
NumericT  sign = NumericT(-1),
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Radix-2 2D algorithm for computing Fourier transformation.

Works only on power-of-two sizes of data. Serial implementation has o(n * lg n) complexity. This is a Cooley-Tukey algorithm

Definition at line 558 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::real_to_complex ( viennacl::vector_base< NumericT > const &  in,
viennacl::vector_base< NumericT > &  out,
vcl_size_t  size 
)

Create complex vector from real vector (even elements(2*k) = real part, odd elements(2*k+1) = imaginary part)

Definition at line 797 of file fft_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::reorder ( viennacl::vector< NumericT, AlignmentV > &  in,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  bits_datasize,
vcl_size_t  batch_num,
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Definition at line 302 of file fft_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::reorder ( viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &  in,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  bits_datasize,
vcl_size_t  batch_num,
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Definition at line 342 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::reverse ( viennacl::vector_base< NumericT > &  in)

Reverse vector to opposite order and save it in input vector.

Definition at line 835 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::row_C_scan_numeric_vector ( unsigned int  row_start_A,
unsigned int  row_end_A,
unsigned int const *  A_col_buffer,
NumericT const *  A_elements,
unsigned int const *  B_row_buffer,
unsigned int const *  B_col_buffer,
NumericT const *  B_elements,
unsigned int  B_size2,
unsigned int  row_start_C,
unsigned int  row_end_C,
unsigned int *  C_col_buffer,
NumericT C_elements,
unsigned int *  row_C_vector_1,
NumericT row_C_vector_1_values,
unsigned int *  row_C_vector_2,
NumericT row_C_vector_2_values,
unsigned int *  row_C_vector_3,
NumericT row_C_vector_3_values 
)

Definition at line 567 of file spgemm_vector.hpp.

template<typename NumericT >
unsigned int viennacl::linalg::host_based::row_C_scan_numeric_vector_1 ( unsigned int const *  input1_index_begin,
unsigned int const *  input1_index_end,
NumericT const *  input1_values_begin,
NumericT  factor1,
unsigned int const *  input2_index_begin,
unsigned int const *  input2_index_end,
NumericT const *  input2_values_begin,
NumericT  factor2,
unsigned int  termination_index,
unsigned int *  output_index_begin,
NumericT output_values_begin 
)

Definition at line 520 of file spgemm_vector.hpp.

template<unsigned int IndexNum, typename NumericT >
unsigned int viennacl::linalg::host_based::row_C_scan_numeric_vector_N ( unsigned int const *  row_indices_B,
NumericT const *  val_A,
unsigned int const *  B_row_buffer,
unsigned int const *  B_col_buffer,
NumericT const *  B_elements,
unsigned int  B_size2,
unsigned int const *  row_C_vector_input,
unsigned int const *  row_C_vector_input_end,
NumericT row_C_vector_input_values,
unsigned int *  row_C_vector_output,
NumericT row_C_vector_output_values 
)

Merges up to IndexNum rows from B into the result buffer.

Because the input buffer also needs to be considered, this routine actually works on an index front of length (IndexNum+1)

Definition at line 327 of file spgemm_vector.hpp.

unsigned int viennacl::linalg::host_based::row_C_scan_symbolic_vector ( unsigned int  row_start_A,
unsigned int  row_end_A,
unsigned int const *  A_col_buffer,
unsigned int const *  B_row_buffer,
unsigned int const *  B_col_buffer,
unsigned int  B_size2,
unsigned int *  row_C_vector_1,
unsigned int *  row_C_vector_2,
unsigned int *  row_C_vector_3 
)
inline

Definition at line 206 of file spgemm_vector.hpp.

template<typename OutputWriterT >
unsigned int viennacl::linalg::host_based::row_C_scan_symbolic_vector_1 ( unsigned int const *  input1_begin,
unsigned int const *  input1_end,
unsigned int const *  input2_begin,
unsigned int const *  input2_end,
unsigned int  termination_index,
unsigned int *  output_begin 
)

Definition at line 169 of file spgemm_vector.hpp.

template<unsigned int IndexNum>
unsigned int viennacl::linalg::host_based::row_C_scan_symbolic_vector_N ( unsigned int const *  row_indices_B,
unsigned int const *  B_row_buffer,
unsigned int const *  B_col_buffer,
unsigned int  B_size2,
unsigned int const *  row_C_vector_input,
unsigned int const *  row_C_vector_input_end,
unsigned int *  row_C_vector_output 
)

Merges up to IndexNum rows from B into the result buffer.

Because the input buffer also needs to be considered, this routine actually works on an index front of length (IndexNum+1)

Definition at line 113 of file spgemm_vector.hpp.

template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::scaled_rank_1_update ( matrix_base< NumericT > &  mat1,
ScalarT const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
const vector_base< NumericT > &  vec1,
const vector_base< NumericT > &  vec2 
)

The implementation of the operation mat += alpha * vec1 * vec2^T, i.e. a scaled rank 1 update.

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

Definition at line 1566 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::sum_impl ( vector_base< NumericT > const &  vec1,
ScalarT &  result 
)

Computes the sum of all elements from the vector.

Parameters
vec1The vector
resultThe result scalar

Definition at line 989 of file vector_operations.hpp.

template<typename ScalarT1 , typename ScalarT2 >
viennacl::enable_if< viennacl::is_scalar<ScalarT1>::value && viennacl::is_scalar<ScalarT2>::value >::type viennacl::linalg::host_based::swap ( ScalarT1 &  s1,
ScalarT2 &  s2 
)

Swaps the contents of two scalars, data is copied.

Parameters
s1The first scalar
s2The second scalar

Definition at line 143 of file scalar_operations.hpp.

template<typename NumericT , typename SizeT , typename DistanceT >
void viennacl::linalg::host_based::trans ( const matrix_expression< const matrix_base< NumericT, SizeT, DistanceT >, const matrix_base< NumericT, SizeT, DistanceT >, op_trans > &  proxy,
matrix_base< NumericT > &  temp_trans 
)

Definition at line 111 of file matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::transpose ( viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &  input)

Inplace transpose of matrix.

Definition at line 727 of file fft_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::host_based::transpose ( viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > const &  input,
viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &  output 
)

Transpose matrix.

Definition at line 764 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::vector_assign ( vector_base< NumericT > &  vec1,
const NumericT 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).

Definition at line 275 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::host_based::vector_swap ( vector_base< NumericT > &  vec1,
vector_base< NumericT > &  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)

Definition at line 302 of file vector_operations.hpp.