Holds all compute kernels with conventional host-based execution (buffers in CPU RAM). More...
Namespaces | |
detail | |
Helper functions for the host-based linear algebra backend. | |
Functions | |
template<typename NumericT , typename 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 | 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 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 | inclusive_scan (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2) |
This function implements an inclusive scan. More... | |
template<typename NumericT > | |
void | exclusive_scan (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2) |
This function implements an exclusive scan. 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, viennacl::vector_base< NumericT > &result) |
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 | 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, viennacl::vector_base< NumericT > &result) |
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, viennacl::vector_base< NumericT > &result) |
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, viennacl::vector_base< NumericT > &result) |
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, viennacl::vector_base< NumericT > &result) |
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, viennacl::vector_base< NumericT > &result) |
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<class T > | |
void | _axpy (const T *, T *, vcl_size_t, T) |
template<class T > | |
T | _dot (vcl_size_t, const T *, const T *) |
template<class T > | |
T | _dotc (vcl_size_t, const T *, const T *) |
template<class T > | |
void | _swap (vcl_size_t, T *, T *) |
template<class T > | |
void | _copy (vcl_size_t, T *, T *) |
template<class T > | |
T | _nrm2 (const T *, vcl_size_t) |
template<typename ScalarType > | |
void | inplace_tred2 (ScalarType **A, vcl_size_t n, vcl_size_t block_size=1, vcl_size_t num_threads=1) |
Inplace reduction of a dense n x n row-major or column-major hermitian (or real symmetric) matrix to tridiagonal form using householder similarity transforms (preserving eigenvalues) More... | |
template<typename ScalarType > | |
bool | lu_factorize_row_major (ScalarType **A, vcl_size_t m, vcl_size_t n, vcl_size_t *piv=NULL, vcl_size_t block_size=8) |
Inplace lu factorization of an m x n dense row-major matrix with optional partial pivoting, returning true for an even number of pivots, false for an odd number of pivots. Factorization is successful if there are no nonzero values on the diagonal. More... | |
template<typename ScalarType > | |
std::vector< ScalarType > | inplace_qr_col_major (ScalarType **A, vcl_size_t m, vcl_size_t n, vcl_size_t block_size=8) |
Inplace qr factorization of an m x n dense column-major matrix, returning the householder normalization coefficients. More... | |
template<typename ScalarType > | |
std::vector< ScalarType > | inplace_qr_row_major (ScalarType **A, vcl_size_t m, vcl_size_t n, vcl_size_t block_size=8, vcl_size_t num_threads=1) |
Inplace qr factorization of an m x n dense row-major matrix, returning the householder normalization coefficients. More... | |
template<typename 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 maximum of a 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... | |
Holds all compute kernels with conventional host-based execution (buffers in CPU RAM).
|
inline |
Definition at line 73 of file sse_blas.hpp.
|
inline |
Definition at line 110 of file sse_blas.hpp.
|
inline |
Definition at line 80 of file sse_blas.hpp.
|
inline |
Definition at line 89 of file sse_blas.hpp.
|
inline |
Definition at line 117 of file sse_blas.hpp.
|
inline |
Definition at line 98 of file sse_blas.hpp.
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 99 of file matrix_operations.hpp.
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 182 of file matrix_operations.hpp.
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 317 of file matrix_operations.hpp.
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.
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.
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.
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 66 of file vector_operations.hpp.
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 105 of file vector_operations.hpp.
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 175 of file vector_operations.hpp.
void viennacl::linalg::host_based::bidiag_pack | ( | matrix_base< NumericT > & | A, |
VectorType & | dh, | ||
VectorType & | sh | ||
) |
Definition at line 1507 of file matrix_operations.hpp.
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.
A | The matrix from which the vectors will be extracted of. |
D | The vector in which the diagonal of the matrix will be stored in. |
S | The vector in which the superdiagonal of the matrix will be stored in. |
Definition at line 1447 of file matrix_operations.hpp.
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 586 of file fft_operations.hpp.
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 800 of file fft_operations.hpp.
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.
A | The matrix where to copy from. |
V | The vector to fill with data. |
row_start | The number of the first row to copy. |
col_start | The number of the first column to copy. |
copy_col | Set to TRUE to copy a column, FALSE to copy a row. |
Definition at line 1768 of file matrix_operations.hpp.
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 243 of file fft_operations.hpp.
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 266 of file fft_operations.hpp.
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.
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)
vec1 | The result vector (or -range, or -slice) |
proxy | The proxy object holding v2, v3 and the operation |
Definition at line 314 of file vector_operations.hpp.
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)
vec1 | The result vector (or -range, or -slice) |
proxy | The proxy object holding v2, v3 and the operation |
Definition at line 347 of file vector_operations.hpp.
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)
A | The result matrix (or -range, or -slice) |
proxy | The proxy object holding B, C, and the operation |
Definition at line 716 of file matrix_operations.hpp.
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 790 of file matrix_operations.hpp.
void viennacl::linalg::host_based::exclusive_scan | ( | vector_base< NumericT > & | vec1, |
vector_base< NumericT > & | vec2 | ||
) |
This function implements an exclusive scan.
vec1 | Input vector: Gets overwritten by the routine. |
vec2 | The output vector. |
Definition at line 1869 of file matrix_operations.hpp.
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 198 of file fft_operations.hpp.
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 379 of file fft_operations.hpp.
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 436 of file fft_operations.hpp.
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.
Q | The matrix to be updated. |
tmp1 | Vector with data from the tql2 algorithm. |
tmp2 | Vector with data from the tql2 algorithm. |
l | Data from the tql2 algorithm. |
m | Data from the tql2 algorithm. |
Definition at line 1681 of file matrix_operations.hpp.
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.
A | The matrix to be updated. |
D | The normalized householder vector. |
start | The repetition counter. |
Definition at line 1524 of file matrix_operations.hpp.
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.
A | The matrix to be updated. |
D | The normalized householder vector. |
Definition at line 1589 of file matrix_operations.hpp.
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.
Q | The matrix to be updated. |
D | The householder vector. |
A_size1 | size1 of matrix A |
Definition at line 1655 of file matrix_operations.hpp.
void viennacl::linalg::host_based::inclusive_scan | ( | vector_base< NumericT > & | vec1, |
vector_base< NumericT > & | vec2 | ||
) |
This function implements an inclusive scan.
vec1 | Input vector: Gets overwritten by the routine. |
vec2 | The output vector. |
Definition at line 1844 of file matrix_operations.hpp.
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.
vec1 | The vector |
Definition at line 543 of file vector_operations.hpp.
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).
vec1 | The first vector |
vec2 | The second vector |
result | The result scalar (on the gpu) |
Definition at line 383 of file vector_operations.hpp.
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 411 of file vector_operations.hpp.
std::vector<ScalarType> viennacl::linalg::host_based::inplace_qr_col_major | ( | ScalarType ** | A, |
vcl_size_t | m, | ||
vcl_size_t | n, | ||
vcl_size_t | block_size = 8 |
||
) |
Inplace qr factorization of an m x n dense column-major matrix, returning the householder normalization coefficients.
A | A dense column-major matrix to be factorized |
m | The height of the matrix |
n | The width of the matrix |
block_size | The block size to be used |
Definition at line 407 of file sse_kernels.hpp.
std::vector<ScalarType> viennacl::linalg::host_based::inplace_qr_row_major | ( | ScalarType ** | A, |
vcl_size_t | m, | ||
vcl_size_t | n, | ||
vcl_size_t | block_size = 8 , |
||
vcl_size_t | num_threads = 1 |
||
) |
Inplace qr factorization of an m x n dense row-major matrix, returning the householder normalization coefficients.
A | A dense row-major matrix to be factorized |
m | The height of the matrix |
n | The width of the matrix |
block_size | The block size to be used |
num_threads | Number of threads to be used |
Definition at line 487 of file sse_kernels.hpp.
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)
A | The system matrix |
B | The matrix of row vectors, where the solution is directly written to |
Definition at line 130 of file direct_solve.hpp.
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.
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.
L | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
tag | The solver tag identifying the respective triangular solver |
Definition at line 428 of file sparse_matrix_operations.hpp.
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.
L | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
tag | The solver tag identifying the respective triangular solver |
Definition at line 447 of file sparse_matrix_operations.hpp.
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.
U | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
tag | The solver tag identifying the respective triangular solver |
Definition at line 467 of file sparse_matrix_operations.hpp.
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.
U | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
tag | The solver tag identifying the respective triangular solver |
Definition at line 486 of file sparse_matrix_operations.hpp.
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.
proxy | Proxy object for a transposed CSR-matrix |
vec | The right hand side vector |
tag | The solver tag identifying the respective triangular solver |
Definition at line 783 of file sparse_matrix_operations.hpp.
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.
proxy | Proxy object for a transposed CSR-matrix |
vec | The right hand side vector |
tag | The solver tag identifying the respective triangular solver |
Definition at line 804 of file sparse_matrix_operations.hpp.
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.
proxy | Proxy object for a transposed CSR-matrix |
vec | The right hand side vector |
tag | The solver tag identifying the respective triangular solver |
Definition at line 826 of file sparse_matrix_operations.hpp.
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.
proxy | Proxy object for a transposed CSR-matrix |
vec | The right hand side vector |
tag | The solver tag identifying the respective triangular solver |
Definition at line 848 of file sparse_matrix_operations.hpp.
void viennacl::linalg::host_based::inplace_tred2 | ( | ScalarType ** | A, |
vcl_size_t | n, | ||
vcl_size_t | block_size = 1 , |
||
vcl_size_t | num_threads = 1 |
||
) |
Inplace reduction of a dense n x n row-major or column-major hermitian (or real symmetric) matrix to tridiagonal form using householder similarity transforms (preserving eigenvalues)
A | A dense hermitian matrix to be tridiagonalized |
n | The height and width of the hermitian matrix |
block_size | The block size to be used |
num_threads | The number of threads to be used with OpenMP |
Definition at line 266 of file sse_kernels.hpp.
bool viennacl::linalg::host_based::lu_factorize_row_major | ( | ScalarType ** | A, |
vcl_size_t | m, | ||
vcl_size_t | n, | ||
vcl_size_t * | piv = NULL , |
||
vcl_size_t | block_size = 8 |
||
) |
Inplace lu factorization of an m x n dense row-major matrix with optional partial pivoting, returning true for an even number of pivots, false for an odd number of pivots. Factorization is successful if there are no nonzero values on the diagonal.
A | A dense row-major matrix to be factorized |
m | The height of the matrix |
n | The width of the matrix |
piv | The optional pivot vector to store the pivot indices. If piv is NULL, no partial pivoting will be performed. |
block_size | The block size to be used |
Definition at line 295 of file sse_kernels.hpp.
void viennacl::linalg::host_based::matrix_assign | ( | matrix_base< NumericT > & | mat, |
NumericT | s, | ||
bool | clear = false |
||
) |
Definition at line 453 of file matrix_operations.hpp.
void viennacl::linalg::host_based::matrix_column | ( | const matrix_base< NumericT > & | mat, |
unsigned int | j, | ||
vector_base< NumericT > & | vec | ||
) |
Definition at line 668 of file matrix_operations.hpp.
void viennacl::linalg::host_based::matrix_diag_from_vector | ( | const vector_base< NumericT > & | vec, |
int | k, | ||
matrix_base< NumericT > & | mat | ||
) |
Definition at line 539 of file matrix_operations.hpp.
void viennacl::linalg::host_based::matrix_diag_to_vector | ( | const matrix_base< NumericT > & | mat, |
int | k, | ||
vector_base< NumericT > & | vec | ||
) |
Definition at line 586 of file matrix_operations.hpp.
void viennacl::linalg::host_based::matrix_diagonal_assign | ( | matrix_base< NumericT > & | mat, |
NumericT | s | ||
) |
Definition at line 500 of file matrix_operations.hpp.
void viennacl::linalg::host_based::matrix_row | ( | const matrix_base< NumericT > & | mat, |
unsigned int | i, | ||
vector_base< NumericT > & | vec | ||
) |
Definition at line 631 of file matrix_operations.hpp.
void viennacl::linalg::host_based::max_impl | ( | vector_base< NumericT > const & | vec1, |
ScalarT & | result | ||
) |
Computes the maximum of a vector.
vec1 | The vector |
result | The result scalar |
Definition at line 577 of file vector_operations.hpp.
void viennacl::linalg::host_based::min_impl | ( | vector_base< NumericT > const & | vec1, |
ScalarT & | result | ||
) |
Computes the maximum of a vector.
vec1 | The vector |
result | The result scalar |
Definition at line 603 of file vector_operations.hpp.
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 682 of file fft_operations.hpp.
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.
V | Input matrix |
W | First factor |
H | Second factor |
conf | A configuration object holding tolerances and the like |
Definition at line 155 of file nmf_operations.hpp.
void viennacl::linalg::host_based::norm_1_impl | ( | vector_base< NumericT > const & | vec1, |
ScalarT & | result | ||
) |
Computes the l^1-norm of a vector.
vec1 | The vector |
result | The result scalar |
Definition at line 454 of file vector_operations.hpp.
void viennacl::linalg::host_based::norm_2_impl | ( | vector_base< NumericT > const & | vec1, |
ScalarT & | result | ||
) |
Computes the l^2-norm of a vector - implementation.
vec1 | The vector |
result | The result scalar |
Definition at line 482 of file vector_operations.hpp.
void viennacl::linalg::host_based::norm_inf_impl | ( | vector_base< NumericT > const & | vec1, |
ScalarT & | result | ||
) |
Computes the supremum-norm of a vector.
vec1 | The vector |
result | The result scalar |
Definition at line 514 of file vector_operations.hpp.
void viennacl::linalg::host_based::normalize | ( | viennacl::vector< NumericT, AlignmentV > & | input | ) |
Normalize vector with his own size.
Definition at line 669 of file fft_operations.hpp.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
vec1 | The first vector |
vec2 | The second vector |
alpha | The first transformation coefficient |
beta | The second transformation coefficient |
Definition at line 635 of file vector_operations.hpp.
void viennacl::linalg::host_based::prod_impl | ( | const viennacl::compressed_matrix< NumericT, AlignmentV > & | mat, |
const viennacl::vector_base< NumericT > & | vec, | ||
viennacl::vector_base< NumericT > & | result | ||
) |
Carries out matrix-vector multiplication with a compressed_matrix.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 105 of file sparse_matrix_operations.hpp.
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);
sp_mat | The sparse matrix |
d_mat | The dense matrix |
result | The result matrix |
Definition at line 138 of file sparse_matrix_operations.hpp.
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));
sp_mat | The sparse matrix |
d_mat | The transposed dense matrix |
result | The result matrix |
Definition at line 224 of file sparse_matrix_operations.hpp.
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);
mat | The matrix |
trans | Flag whether mat is to be transposed |
vec | The vector |
result | The result vector |
Definition at line 861 of file matrix_operations.hpp.
void viennacl::linalg::host_based::prod_impl | ( | const viennacl::compressed_compressed_matrix< NumericT > & | mat, |
const viennacl::vector_base< NumericT > & | vec, | ||
viennacl::vector_base< NumericT > & | result | ||
) |
Carries out matrix-vector multiplication with a compressed_matrix.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 877 of file sparse_matrix_operations.hpp.
void viennacl::linalg::host_based::prod_impl | ( | const viennacl::coordinate_matrix< NumericT, AlignmentV > & | mat, |
const viennacl::vector_base< NumericT > & | vec, | ||
viennacl::vector_base< NumericT > & | result | ||
) |
Carries out matrix-vector multiplication with a coordinate_matrix.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 978 of file sparse_matrix_operations.hpp.
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);
sp_mat | The Sparse Matrix (Coordinate format) |
d_mat | The Dense Matrix |
result | The Result Matrix |
Definition at line 1004 of file sparse_matrix_operations.hpp.
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 1059 of file matrix_operations.hpp.
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));
sp_mat | The Sparse Matrix (Coordinate format) |
d_mat | The Dense Transposed Matrix |
result | The Result Matrix |
Definition at line 1118 of file sparse_matrix_operations.hpp.
void viennacl::linalg::host_based::prod_impl | ( | const viennacl::ell_matrix< NumericT, AlignmentV > & | mat, |
const viennacl::vector_base< NumericT > & | vec, | ||
viennacl::vector_base< NumericT > & | result | ||
) |
Carries out matrix-vector multiplication with a ell_matrix.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 1246 of file sparse_matrix_operations.hpp.
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);
sp_mat | The sparse(ELL) matrix |
d_mat | The dense matrix |
result | The result dense matrix |
Definition at line 1284 of file sparse_matrix_operations.hpp.
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));
sp_mat | The sparse matrix |
d_mat | The transposed dense matrix |
result | The result matrix |
Definition at line 1406 of file sparse_matrix_operations.hpp.
void viennacl::linalg::host_based::prod_impl | ( | const viennacl::sliced_ell_matrix< NumericT, IndexT > & | mat, |
const viennacl::vector_base< NumericT > & | vec, | ||
viennacl::vector_base< NumericT > & | result | ||
) |
Carries out matrix-vector multiplication with a sliced_ell_matrix.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 1532 of file sparse_matrix_operations.hpp.
void viennacl::linalg::host_based::prod_impl | ( | const viennacl::hyb_matrix< NumericT, AlignmentV > & | mat, |
const viennacl::vector_base< NumericT > & | vec, | ||
viennacl::vector_base< NumericT > & | result | ||
) |
Carries out matrix-vector multiplication with a hyb_matrix.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 1592 of file sparse_matrix_operations.hpp.
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);
mat | The sparse matrix A |
d_mat | The dense matrix B |
result | The dense result matrix C |
Definition at line 1652 of file sparse_matrix_operations.hpp.
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));
mat | The sparse matrix A |
d_mat | The dense matrix B |
result | The dense result matrix C |
Definition at line 1745 of file sparse_matrix_operations.hpp.
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 512 of file fft_operations.hpp.
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 545 of file fft_operations.hpp.
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 779 of file fft_operations.hpp.
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 294 of file fft_operations.hpp.
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 333 of file fft_operations.hpp.
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 817 of file fft_operations.hpp.
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);
mat1 | The matrix to be updated |
alpha | The scaling factor (either a viennacl::scalar<>, float, or double) |
reciprocal_alpha | Use 1/alpha instead of alpha |
flip_sign_alpha | Use -alpha instead of alpha |
vec1 | The first vector |
vec2 | The second vector |
Definition at line 1386 of file matrix_operations.hpp.
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.
s1 | The first scalar |
s2 | The second scalar |
Definition at line 143 of file scalar_operations.hpp.
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 53 of file matrix_operations.hpp.
void viennacl::linalg::host_based::transpose | ( | viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > & | input | ) |
Inplace transpose of matrix.
Definition at line 711 of file fft_operations.hpp.
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 747 of file fft_operations.hpp.
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)
vec1 | The vector to which the value should be assigned |
alpha | The value to be assigned |
up_to_internal_size | Specifies whether alpha should also be written to padded memory (mostly used for clearing the whole buffer). |
Definition at line 253 of file vector_operations.hpp.
void viennacl::linalg::host_based::vector_swap | ( | vector_base< NumericT > & | vec1, |
vector_base< NumericT > & | vec2 | ||
) |
Swaps the contents of two vectors, data is copied.
vec1 | The first vector (or -range, or -slice) |
vec2 | The second vector (or -range, or -slice) |
Definition at line 280 of file vector_operations.hpp.