ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
viennacl::linalg::opencl Namespace Reference

Holds all routines providing OpenCL linear algebra operations. More...

Namespaces

 amg
 
 detail
 Helper functions for OpenCL-accelerated linear algebra operations.
 
 kernels
 Contains the OpenCL kernel generation functions for a predefined set of functionality.
 

Functions

template<typename NumericT >
void bisectSmall (const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataSmall< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
 
template<typename NumericT >
void bisectLarge (const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision)
 
template<typename NumericT >
void bisectLargeOneIntervals (const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
 
template<typename NumericT >
void bisectLargeMultIntervals (const viennacl::linalg::detail::InputData< NumericT > &input, viennacl::linalg::detail::ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision)
 
template<typename NumericT , typename SolverTagT >
void inplace_solve (matrix_base< NumericT > const &A, matrix_base< NumericT > &B, SolverTagT)
 Direct inplace solver for dense triangular systems. Matlab notation: A \ B. More...
 
template<typename NumericT , typename SOLVERTAG >
void inplace_solve (matrix_base< NumericT > const &A, vector_base< NumericT > &x, SOLVERTAG)
 
template<typename NumericT >
void direct (viennacl::ocl::handle< cl_mem > const &in, viennacl::ocl::handle< cl_mem > const &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 algorithm for computing Fourier transformation. More...
 
template<typename NumericT >
void reorder (viennacl::ocl::handle< cl_mem > const &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 radix2 (viennacl::ocl::handle< cl_mem > const &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 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 multiply_complex (viennacl::vector< NumericT, AlignmentV > const &input1, viennacl::vector< NumericT, AlignmentV > const &input2, viennacl::vector< NumericT, AlignmentV > &output)
 Mutiply two complex vectors and store result in output. More...
 
template<typename NumericT , unsigned int AlignmentV>
void normalize (viennacl::vector< NumericT, AlignmentV > &input)
 Normalize vector on with his own size. More...
 
template<typename NumericT , unsigned int AlignmentV>
void transpose (viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &input)
 Inplace_transpose 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 oposite 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 > const &aij_L)
 Performs one nonlinear relaxation step in the Chow-Patel-ILU using OpenMP (cf. Algorithm 2 in paper) 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_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)
 
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)
 
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)
 
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)
 
template<typename NumericT >
void pipelined_cg_prod (sliced_ell_matrix< NumericT > const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > &inner_prod_buffer)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
template<typename NumericT >
void pipelined_bicgstab_prod (sliced_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)
 
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)
 
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 param_k, vector_base< T > &vi_in_vk_buffer, vcl_size_t buffer_chunk_size)
 
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 param_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)
 
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 param_k)
 
template<typename T >
void pipelined_gmres_prod (compressed_matrix< T > const &A, vector_base< T > const &p, vector_base< T > &Ap, vector_base< T > &inner_prod_buffer)
 
template<typename T >
void pipelined_gmres_prod (coordinate_matrix< T > const &A, vector_base< T > const &p, vector_base< T > &Ap, vector_base< T > &inner_prod_buffer)
 
template<typename T >
void pipelined_gmres_prod (ell_matrix< T > const &A, vector_base< T > const &p, vector_base< T > &Ap, vector_base< T > &inner_prod_buffer)
 
template<typename T >
void pipelined_gmres_prod (sliced_ell_matrix< T > const &A, vector_base< T > const &p, vector_base< T > &Ap, vector_base< T > &inner_prod_buffer)
 
template<typename T >
void pipelined_gmres_prod (hyb_matrix< T > 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 > &dest, matrix_base< SrcNumericT > const &src)
 
template<typename NumericT , typename ScalarT1 >
void am (matrix_base< NumericT > &A, matrix_base< NumericT > const &B, 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 > &A, matrix_base< NumericT > const &B, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT > const &C, 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 > &A, matrix_base< NumericT > const &B, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT > const &C, ScalarT2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
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 >
void matrix_assign (matrix_base< NumericT > &A, NumericT s, bool up_to_internal_size=false)
 
template<typename NumericT >
void matrix_diagonal_assign (matrix_base< NumericT > &A, NumericT s)
 
template<typename NumericT >
void matrix_diag_from_vector (const vector_base< NumericT > &vec, int k, matrix_base< NumericT > &A)
 
template<typename NumericT >
void matrix_diag_to_vector (const matrix_base< NumericT > &A, int k, vector_base< NumericT > &vec)
 
template<typename NumericT >
void matrix_row (const matrix_base< NumericT > &A, unsigned int i, vector_base< NumericT > &vec)
 
template<typename NumericT >
void matrix_column (const matrix_base< NumericT > &A, 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 binary element-wise operations A = OP(B,C) 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)
 Implementation of unary element-wise operations A = OP(B) More...
 
template<typename NumericT >
void prod_impl (const matrix_base< NumericT > &A, bool trans_A, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
 Carries out matrix-vector multiplication. More...
 
template<typename NumericT , typename ScalarType >
void prod_impl (matrix_base< NumericT > const &A, bool A_trans, matrix_base< NumericT > const &B, bool B_trans, matrix_base< NumericT > &C, ScalarType alpha, ScalarType beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename NumericT , typename ScalarT1 >
void scaled_rank_1_update (matrix_base< NumericT > &A, ScalarT1 const &alpha, vcl_size_t len_alpha, 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 SCALARTYPE , typename VectorType >
void bidiag_pack_svd (viennacl::matrix< SCALARTYPE > &A, VectorType &dh, VectorType &sh)
 
template<typename NumericT >
void bidiag_pack (matrix_base< NumericT > &A, viennacl::vector< NumericT > &dh, viennacl::vector< NumericT > &sh)
 
template<typename NumericT >
void house_update_A_left (matrix_base< NumericT > &A, vector_base< NumericT > &D, vcl_size_t start)
 
template<typename NumericT >
void house_update_A_right (matrix_base< NumericT > &A, vector_base< NumericT > &D)
 
template<typename NumericT >
void house_update_QL (matrix_base< NumericT > &Q, vector_base< NumericT > &D, vcl_size_t A_size1)
 
template<typename NumericT >
void givens_next (matrix_base< NumericT > &matrix, vector_base< NumericT > &tmp1, vector_base< NumericT > &tmp2, int l, int m)
 
template<typename NumericT >
void copy_vec (matrix_base< NumericT > &A, vector_base< NumericT > &V, vcl_size_t row_start, vcl_size_t col_start, bool copy_col)
 
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 NumericT >
viennacl::enable_if< viennacl::is_scalar< ScalarT1 >::value &&viennacl::is_scalar< ScalarT2 >::value &&viennacl::is_any_scalar< NumericT >::value >::type as (ScalarT1 &s1, ScalarT2 const &s2, NumericT const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha)
 
template<typename ScalarT1 , typename ScalarT2 , typename NumericT2 , typename ScalarT3 , typename NumericT3 >
viennacl::enable_if< viennacl::is_scalar< ScalarT1 >::value &&viennacl::is_scalar< ScalarT2 >::value &&viennacl::is_scalar< ScalarT3 >::value &&viennacl::is_any_scalar< NumericT2 >::value &&viennacl::is_any_scalar< NumericT3 >::value >::type asbs (ScalarT1 &s1, ScalarT2 const &s2, NumericT2 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, ScalarT3 const &s3, NumericT3 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename ScalarT1 , typename ScalarT2 , typename NumericT2 , typename ScalarT3 , typename NumericT3 >
viennacl::enable_if< viennacl::is_scalar< ScalarT1 >::value &&viennacl::is_scalar< ScalarT2 >::value &&viennacl::is_scalar< ScalarT3 >::value &&viennacl::is_any_scalar< NumericT2 >::value &&viennacl::is_any_scalar< NumericT3 >::value >::type asbs_s (ScalarT1 &s1, ScalarT2 const &s2, NumericT2 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, ScalarT3 const &s3, NumericT3 const &beta, vcl_size_t len_beta, 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 > &A, const viennacl::vector_base< NumericT > &x, viennacl::vector_base< NumericT > &y)
 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_A, const viennacl::matrix_base< NumericT > &d_A, viennacl::matrix_base< NumericT > &y)
 Carries out sparse_matrix-matrix multiplication first matrix being compressed. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::compressed_matrix< NumericT, AlignmentV > const &sp_A, viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > const &d_A, viennacl::matrix_base< NumericT > &y)
 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 MAT_AlignmentV>
void inplace_solve (compressed_matrix< NumericT, MAT_AlignmentV > const &L, vector_base< NumericT > &x, viennacl::linalg::unit_lower_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 > &x, viennacl::linalg::lower_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 > &x, viennacl::linalg::unit_upper_tag)
 Inplace solution of an 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 > &x, viennacl::linalg::upper_tag)
 Inplace solution of an 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_L, vector_base< NumericT > &x, viennacl::linalg::unit_lower_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_L, vector_base< NumericT > &x, viennacl::linalg::lower_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_U, vector_base< NumericT > &x, viennacl::linalg::unit_upper_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_U, vector_base< NumericT > &x, viennacl::linalg::upper_tag)
 Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions. More...
 
template<typename NumericT >
void prod_impl (viennacl::compressed_compressed_matrix< NumericT > const &A, viennacl::vector_base< NumericT > const &x, viennacl::vector_base< NumericT > &y)
 Carries out matrix-vector multiplication with a compressed_compressed_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::coordinate_matrix< NumericT, AlignmentV > const &A, viennacl::vector_base< NumericT > const &x, viennacl::vector_base< NumericT > &y)
 Carries out matrix-vector multiplication with a coordinate_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::coordinate_matrix< NumericT, AlignmentV > const &A, viennacl::matrix_base< NumericT > const &d_A, viennacl::matrix_base< NumericT > &y)
 Carries out sparse-matrix-dense-matrix multiplication, where the sparse matrix is a coordinate_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::coordinate_matrix< NumericT, AlignmentV > const &A, viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > const &d_A, viennacl::matrix_base< NumericT > &y)
 Carries out sparse-matrix-dense-matrix multiplication, where the sparse matrix is a coordinate_matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::ell_matrix< NumericT, AlignmentV > const &A, viennacl::vector_base< NumericT > const &x, viennacl::vector_base< NumericT > &y)
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::ell_matrix< NumericT, AlignmentV > const &sp_A, viennacl::matrix_base< NumericT > const &d_A, viennacl::matrix_base< NumericT > &y)
 Carries out Sparse Matrix(ELL)-Dense Matrix multiplication. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::ell_matrix< NumericT, AlignmentV > const &sp_A, viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > const &d_A, viennacl::matrix_base< NumericT > &y)
 Carries out Sparse Matrix(ELL)-Dense Transposed Matrix multiplication. More...
 
template<typename ScalarT , typename IndexT >
void prod_impl (viennacl::sliced_ell_matrix< ScalarT, IndexT > const &A, viennacl::vector_base< ScalarT > const &x, viennacl::vector_base< ScalarT > &y)
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::hyb_matrix< NumericT, AlignmentV > const &A, viennacl::vector_base< NumericT > const &x, viennacl::vector_base< NumericT > &y)
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::hyb_matrix< NumericT, AlignmentV > const &A, viennacl::matrix_base< NumericT > const &d_A, viennacl::matrix_base< NumericT > &y)
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::hyb_matrix< NumericT, AlignmentV > const &A, viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > const &d_A, viennacl::matrix_base< NumericT > &y)
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::vandermonde_matrix< NumericT, AlignmentV > const &A, viennacl::vector_base< NumericT > const &x, viennacl::vector_base< NumericT > &y)
 Carries out matrix-vector multiplication with a vandermonde_matrix. More...
 
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 > &x, vector_base< NumericT > const &y, 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 > &x, vector_base< NumericT > const &y, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< NumericT > const &z, 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 > &x, vector_base< NumericT > const &y, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< NumericT > const &z, ScalarT2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT >
void vector_assign (vector_base< NumericT > &x, 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 > &x, vector_base< NumericT > &y)
 Swaps the contents of two vectors, data is copied. More...
 
template<typename NumericT , typename OP >
void element_op (vector_base< NumericT > &x, vector_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_element_binary< OP > > const &proxy)
 Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax) More...
 
template<typename NumericT , typename OP >
void element_op (vector_base< NumericT > &x, vector_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_element_unary< OP > > const &proxy)
 Implementation of unary element-wise operations v1 = OP(v2) More...
 
template<typename NumericT >
void inner_prod_impl (vector_base< NumericT > const &x, vector_base< NumericT > const &y, scalar< NumericT > &result)
 Computes the inner product of two vectors - implementation. Library users should call inner_prod(x, y). More...
 
template<typename NumericT >
void inner_prod_impl (vector_base< NumericT > const &x, vector_tuple< NumericT > const &vec_tuple, vector_base< NumericT > &result)
 Computes multiple inner products where one argument is common to all inner products. <x, y1>, <x, y2>, ..., <x, yN> More...
 
template<typename NumericT >
void inner_prod_cpu (vector_base< NumericT > const &x, vector_base< NumericT > const &y, NumericT &result)
 
template<typename NumericT >
void norm_1_impl (vector_base< NumericT > const &x, scalar< NumericT > &result)
 Computes the l^1-norm of a vector. More...
 
template<typename NumericT >
void norm_1_cpu (vector_base< NumericT > const &x, NumericT &result)
 Computes the l^1-norm of a vector with final reduction on CPU. More...
 
template<typename NumericT >
void norm_2_impl (vector_base< NumericT > const &x, scalar< NumericT > &result)
 Computes the l^2-norm of a vector - implementation using OpenCL summation at second step. More...
 
template<typename NumericT >
void norm_2_cpu (vector_base< NumericT > const &x, NumericT &result)
 Computes the l^1-norm of a vector with final reduction on CPU. More...
 
template<typename NumericT >
void norm_inf_impl (vector_base< NumericT > const &x, scalar< NumericT > &result)
 Computes the supremum-norm of a vector. More...
 
template<typename NumericT >
void norm_inf_cpu (vector_base< NumericT > const &x, NumericT &result)
 Computes the supremum-norm of a vector. More...
 
template<typename NumericT >
cl_uint index_norm_inf (vector_base< NumericT > const &x)
 Computes the index of the first entry that is equal to the supremum-norm in modulus. More...
 
template<typename NumericT >
void max_impl (vector_base< NumericT > const &x, scalar< NumericT > &result)
 Computes the maximum of a vector. More...
 
template<typename NumericT >
void max_cpu (vector_base< NumericT > const &x, NumericT &result)
 Computes the supremum-norm of a vector. More...
 
template<typename NumericT >
void min_impl (vector_base< NumericT > const &x, scalar< NumericT > &result)
 Computes the minimum of a vector. More...
 
template<typename NumericT >
void min_cpu (vector_base< NumericT > const &x, NumericT &result)
 Computes the supremum-norm of a vector. More...
 
template<typename NumericT >
void sum_impl (vector_base< NumericT > const &x, scalar< NumericT > &result)
 Computes the sum over all entries of a vector. More...
 
template<typename NumericT >
void sum_cpu (vector_base< NumericT > const &x, NumericT &result)
 Computes the sum over all entries of a vector. More...
 
template<typename NumericT >
void plane_rotation (vector_base< NumericT > &x, vector_base< NumericT > &y, NumericT alpha, NumericT beta)
 Computes a plane rotation of two vectors. More...
 
template<typename NumericT >
void inclusive_scan (vector_base< NumericT > const &input, vector_base< NumericT > &output)
 This function implements an inclusive scan using CUDA. More...
 
template<typename NumericT >
void exclusive_scan (vector_base< NumericT > const &input, vector_base< NumericT > &output)
 This function implements an exclusive scan using CUDA. More...
 

Variables

const std::string BISECT_KERNEL_SMALL = "bisectKernelSmall"
 
const std::string BISECT_KERNEL_LARGE = "bisectKernelLarge"
 
const std::string BISECT_KERNEL_LARGE_ONE_INTERVALS = "bisectKernelLarge_OneIntervals"
 
const std::string BISECT_KERNEL_LARGE_MULT_INTERVALS = "bisectKernelLarge_MultIntervals"
 
const std::string SVD_BIDIAG_PACK_KERNEL = "bidiag_pack"
 
const std::string SVD_HOUSEHOLDER_UPDATE_A_LEFT_KERNEL = "house_update_A_left"
 
const std::string SVD_HOUSEHOLDER_UPDATE_A_RIGHT_KERNEL = "house_update_A_right"
 
const std::string SVD_HOUSEHOLDER_UPDATE_QL_KERNEL = "house_update_QL"
 
const std::string SVD_GIVENS_NEXT_KERNEL = "givens_next"
 
const std::string SVD_COPY_COL_KERNEL = "copy_col"
 
const std::string SVD_COPY_ROW_KERNEL = "copy_row"
 

Detailed Description

Holds all routines providing OpenCL linear algebra operations.

Function Documentation

template<typename NumericT , typename ScalarT1 >
void viennacl::linalg::opencl::am ( matrix_base< NumericT > &  A,
matrix_base< NumericT > const &  B,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Definition at line 118 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::opencl::ambm ( matrix_base< NumericT > &  A,
matrix_base< NumericT > const &  B,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
matrix_base< NumericT > const &  C,
ScalarT2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 136 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::opencl::ambm_m ( matrix_base< NumericT > &  A,
matrix_base< NumericT > const &  B,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
matrix_base< NumericT > const &  C,
ScalarT2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 159 of file matrix_operations.hpp.

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

Definition at line 54 of file scalar_operations.hpp.

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

Definition at line 86 of file scalar_operations.hpp.

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

Definition at line 135 of file scalar_operations.hpp.

template<typename NumericT , typename ScalarT1 >
void viennacl::linalg::opencl::av ( vector_base< NumericT > &  x,
vector_base< NumericT > const &  y,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Definition at line 76 of file vector_operations.hpp.

template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::opencl::avbv ( vector_base< NumericT > &  x,
vector_base< NumericT > const &  y,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
vector_base< NumericT > const &  z,
ScalarT2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 92 of file vector_operations.hpp.

template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::opencl::avbv_v ( vector_base< NumericT > &  x,
vector_base< NumericT > const &  y,
ScalarT1 const &  alpha,
vcl_size_t  ,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
vector_base< NumericT > const &  z,
ScalarT2 const &  beta,
vcl_size_t  ,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 115 of file vector_operations.hpp.

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

Definition at line 426 of file matrix_operations.hpp.

template<typename SCALARTYPE , typename VectorType >
void viennacl::linalg::opencl::bidiag_pack_svd ( viennacl::matrix< SCALARTYPE > &  A,
VectorType &  dh,
VectorType &  sh 
)

Definition at line 400 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::bisectLarge ( const viennacl::linalg::detail::InputData< NumericT > &  input,
viennacl::linalg::detail::ResultDataLarge< NumericT > &  result,
const unsigned int  mat_size,
const NumericT  lg,
const NumericT  ug,
const NumericT  precision 
)

Definition at line 79 of file bisect_kernel_calls.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::bisectLargeMultIntervals ( const viennacl::linalg::detail::InputData< NumericT > &  input,
viennacl::linalg::detail::ResultDataLarge< NumericT > &  result,
const unsigned int  mat_size,
const NumericT  precision 
)

Definition at line 145 of file bisect_kernel_calls.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::bisectLargeOneIntervals ( const viennacl::linalg::detail::InputData< NumericT > &  input,
viennacl::linalg::detail::ResultDataLarge< NumericT > &  result,
const unsigned int  mat_size,
const NumericT  precision 
)

Definition at line 116 of file bisect_kernel_calls.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::bisectSmall ( const viennacl::linalg::detail::InputData< NumericT > &  input,
viennacl::linalg::detail::ResultDataSmall< NumericT > &  result,
const unsigned int  mat_size,
const NumericT  lg,
const NumericT  ug,
const NumericT  precision 
)

Definition at line 49 of file bisect_kernel_calls.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::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 212 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 320 of file fft_operations.hpp.

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

Definition at line 56 of file vector_operations.hpp.

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

Definition at line 95 of file matrix_operations.hpp.

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

Definition at line 638 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::direct ( viennacl::ocl::handle< cl_mem > const &  in,
viennacl::ocl::handle< cl_mem > const &  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 algorithm for computing Fourier transformation.

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

Definition at line 99 of file fft_operations.hpp.

template<typename NumericT , typename OP >
void viennacl::linalg::opencl::element_op ( vector_base< NumericT > &  x,
vector_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_element_binary< OP > > const &  proxy 
)

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

Parameters
xThe result vector (or -range, or -slice)
proxyThe proxy object holding v2, v3 and the operation

Definition at line 175 of file vector_operations.hpp.

template<typename NumericT , typename OP >
void viennacl::linalg::opencl::element_op ( vector_base< NumericT > &  x,
vector_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_element_unary< OP > > const &  proxy 
)

Implementation of unary element-wise operations v1 = OP(v2)

Parameters
xThe result vector (or -range, or -slice)
proxyThe proxy object holding v2 and the operation

Definition at line 194 of file vector_operations.hpp.

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

Implementation of binary element-wise operations A = OP(B,C)

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

Definition at line 257 of file matrix_operations.hpp.

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

Implementation of unary element-wise operations A = OP(B)

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

Definition at line 279 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::exclusive_scan ( vector_base< NumericT > const &  input,
vector_base< NumericT > &  output 
)

This function implements an exclusive scan using CUDA.

Parameters
inputInput vector
outputThe output vector. Either idential to input or non-overlapping.

Definition at line 597 of file vector_operations.hpp.

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

Definition at line 51 of file ilu_operations.hpp.

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

Definition at line 137 of file ilu_operations.hpp.

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

Definition at line 590 of file matrix_operations.hpp.

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

Definition at line 465 of file matrix_operations.hpp.

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

Definition at line 508 of file matrix_operations.hpp.

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

Definition at line 552 of file matrix_operations.hpp.

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

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

Definition at line 116 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 93 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 213 of file ilu_operations.hpp.

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

Definition at line 243 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 186 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::inclusive_scan ( vector_base< NumericT > const &  input,
vector_base< NumericT > &  output 
)

This function implements an inclusive scan using CUDA.

Parameters
inputInput vector.
outputThe output vector. Either idential to input or non-overlapping.

Definition at line 584 of file vector_operations.hpp.

template<typename NumericT >
cl_uint viennacl::linalg::opencl::index_norm_inf ( vector_base< NumericT > const &  x)

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

Parameters
xThe 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 403 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::inner_prod_cpu ( vector_base< NumericT > const &  x,
vector_base< NumericT > const &  y,
NumericT result 
)

Definition at line 283 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::inner_prod_impl ( vector_base< NumericT > const &  x,
vector_base< NumericT > const &  y,
scalar< NumericT > &  result 
)

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

Parameters
xThe first vector
yThe second vector
resultThe result scalar (on the gpu)

Definition at line 215 of file vector_operations.hpp.

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

Computes multiple inner products where one argument is common to all inner products. <x, y1>, <x, y2>, ..., <x, yN>

Parameters
xThe common vector
vec_tupleThe tuple of vectors y1, y2, ..., yN
resultThe result vector

Definition at line 247 of file vector_operations.hpp.

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

Direct inplace solver for dense triangular systems. Matlab notation: A \ B.

Parameters
AThe system matrix
BThe matrix of row vectors, where the solution is directly written to

Definition at line 77 of file direct_solve.hpp.

template<typename NumericT , typename SOLVERTAG >
void viennacl::linalg::opencl::inplace_solve ( matrix_base< NumericT > const &  A,
vector_base< NumericT > &  x,
SOLVERTAG   
)

Definition at line 127 of file direct_solve.hpp.

template<typename NumericT , unsigned int MAT_AlignmentV>
void viennacl::linalg::opencl::inplace_solve ( compressed_matrix< NumericT, MAT_AlignmentV > const &  L,
vector_base< NumericT > &  x,
viennacl::linalg::unit_lower_tag   
)

Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions.

Parameters
LThe matrix
xThe vector holding the right hand side. Is overwritten by the solution.

Definition at line 350 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::inplace_solve ( compressed_matrix< NumericT, AlignmentV > const &  L,
vector_base< NumericT > &  x,
viennacl::linalg::lower_tag   
)

Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions.

Parameters
LThe matrix
xThe vector holding the right hand side. Is overwritten by the solution.

Definition at line 373 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::inplace_solve ( compressed_matrix< NumericT, AlignmentV > const &  U,
vector_base< NumericT > &  x,
viennacl::linalg::unit_upper_tag   
)

Inplace solution of an upper triangular compressed_matrix with unit diagonal. Typically used for LU substitutions.

Parameters
UThe matrix
xThe vector holding the right hand side. Is overwritten by the solution.

Definition at line 398 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::inplace_solve ( compressed_matrix< NumericT, AlignmentV > const &  U,
vector_base< NumericT > &  x,
viennacl::linalg::upper_tag   
)

Inplace solution of an upper triangular compressed_matrix. Typically used for LU substitutions.

Parameters
UThe matrix
xThe vector holding the right hand side. Is overwritten by the solution.

Definition at line 421 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::inplace_solve ( matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &  proxy_L,
vector_base< NumericT > &  x,
viennacl::linalg::unit_lower_tag   
)

Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions.

Parameters
proxy_LThe transposed matrix proxy
xThe vector

Definition at line 506 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::inplace_solve ( matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &  proxy_L,
vector_base< NumericT > &  x,
viennacl::linalg::lower_tag   
)

Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions.

Parameters
proxy_LThe transposed matrix proxy
xThe vector

Definition at line 532 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::inplace_solve ( matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &  proxy_U,
vector_base< NumericT > &  x,
viennacl::linalg::unit_upper_tag   
)

Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions.

Parameters
proxy_UThe transposed matrix proxy
xThe vector

Definition at line 562 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::inplace_solve ( matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > const &  proxy_U,
vector_base< NumericT > &  x,
viennacl::linalg::upper_tag   
)

Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions.

Parameters
proxy_UThe transposed matrix proxy
xThe vector

Definition at line 588 of file sparse_matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::matrix_assign ( matrix_base< NumericT > &  A,
NumericT  s,
bool  up_to_internal_size = false 
)

Definition at line 200 of file matrix_operations.hpp.

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

Definition at line 239 of file matrix_operations.hpp.

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

Definition at line 218 of file matrix_operations.hpp.

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

Definition at line 225 of file matrix_operations.hpp.

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

Definition at line 210 of file matrix_operations.hpp.

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

Definition at line 232 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::max_cpu ( vector_base< NumericT > const &  x,
NumericT result 
)

Computes the supremum-norm of a vector.

Parameters
xThe vector
resultThe result scalar

Definition at line 435 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::max_impl ( vector_base< NumericT > const &  x,
scalar< NumericT > &  result 
)

Computes the maximum of a vector.

Parameters
xThe vector
resultThe result scalar

Definition at line 420 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::min_cpu ( vector_base< NumericT > const &  x,
NumericT result 
)

Computes the supremum-norm of a vector.

Parameters
xThe vector
resultThe result scalar

Definition at line 467 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::min_impl ( vector_base< NumericT > const &  x,
scalar< NumericT > &  result 
)

Computes the minimum of a vector.

Parameters
xThe vector
resultThe result scalar

Definition at line 452 of file vector_operations.hpp.

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

Mutiply two complex vectors and store result in output.

Definition at line 246 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 45 of file nmf_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::norm_1_cpu ( vector_base< NumericT > const &  x,
NumericT result 
)

Computes the l^1-norm of a vector with final reduction on CPU.

Parameters
xThe vector
resultThe result scalar

Definition at line 316 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::norm_1_impl ( vector_base< NumericT > const &  x,
scalar< NumericT > &  result 
)

Computes the l^1-norm of a vector.

Parameters
xThe vector
resultThe result scalar

Definition at line 301 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::norm_2_cpu ( vector_base< NumericT > const &  x,
NumericT result 
)

Computes the l^1-norm of a vector with final reduction on CPU.

Parameters
xThe vector
resultThe result scalar

Definition at line 350 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::norm_2_impl ( vector_base< NumericT > const &  x,
scalar< NumericT > &  result 
)

Computes the l^2-norm of a vector - implementation using OpenCL summation at second step.

Parameters
xThe vector
resultThe result scalar

Definition at line 335 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::norm_inf_cpu ( vector_base< NumericT > const &  x,
NumericT result 
)

Computes the supremum-norm of a vector.

Parameters
xThe vector
resultThe result scalar

Definition at line 383 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::norm_inf_impl ( vector_base< NumericT > const &  x,
scalar< NumericT > &  result 
)

Computes the supremum-norm of a vector.

Parameters
xThe vector
resultThe result scalar

Definition at line 368 of file vector_operations.hpp.

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

Normalize vector on with his own size.

Definition at line 261 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 
)

Definition at line 361 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 
)

Definition at line 420 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 
)

Definition at line 459 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::pipelined_bicgstab_prod ( sliced_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 
)

Definition at line 506 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 
)

Definition at line 551 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 
)

Definition at line 296 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 
)

Definition at line 327 of file iterative_operations.hpp.

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

Definition at line 79 of file iterative_operations.hpp.

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

Definition at line 132 of file iterative_operations.hpp.

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

Definition at line 166 of file iterative_operations.hpp.

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

Definition at line 208 of file iterative_operations.hpp.

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

Definition at line 248 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 
)

Definition at line 52 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::opencl::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  param_k,
vector_base< T > &  vi_in_vk_buffer,
vcl_size_t  buffer_chunk_size 
)

Definition at line 643 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::opencl::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  param_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 
)

Definition at line 668 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::opencl::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 610 of file iterative_operations.hpp.

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

Definition at line 728 of file iterative_operations.hpp.

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

Definition at line 782 of file iterative_operations.hpp.

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

Definition at line 819 of file iterative_operations.hpp.

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

Definition at line 857 of file iterative_operations.hpp.

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

Definition at line 899 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::opencl::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  param_k 
)

Definition at line 700 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::plane_rotation ( vector_base< NumericT > &  x,
vector_base< NumericT > &  y,
NumericT  alpha,
NumericT  beta 
)

Computes a plane rotation of two vectors.

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

Parameters
xThe first vector
yThe second vector
alphaThe first transformation coefficient
betaThe second transformation coefficient

Definition at line 517 of file vector_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::vandermonde_matrix< NumericT, AlignmentV > const &  A,
viennacl::vector_base< NumericT > const &  x,
viennacl::vector_base< NumericT > &  y 
)

Carries out matrix-vector multiplication with a vandermonde_matrix.

Implementation of the convenience expression y = prod(A, x);

Parameters
AThe Vandermonde matrix
xThe vector
yThe result vector

Definition at line 49 of file vandermonde_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( const viennacl::compressed_matrix< NumericT, AlignmentV > &  A,
const viennacl::vector_base< NumericT > &  x,
viennacl::vector_base< NumericT > &  y 
)

Carries out matrix-vector multiplication with a compressed_matrix.

Implementation of the convenience expression y = prod(A, x);

Parameters
AThe matrix
xThe vector
ythe result vector

Definition at line 81 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( const viennacl::compressed_matrix< NumericT, AlignmentV > &  sp_A,
const viennacl::matrix_base< NumericT > &  d_A,
viennacl::matrix_base< NumericT > &  y 
)

Carries out sparse_matrix-matrix multiplication first matrix being compressed.

Implementation of the convenience expression y = prod(sp_A, d_A);

Parameters
sp_AThe sparse matrix
d_AThe dense matrix
yThe y matrix

Definition at line 159 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::compressed_matrix< NumericT, AlignmentV > const &  sp_A,
viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > const &  d_A,
viennacl::matrix_base< NumericT > &  y 
)

Carries out matrix-trans(matrix) multiplication first matrix being compressed and the second transposed.

Implementation of the convenience expression y = prod(sp_A, d_A);

Parameters
sp_AThe sparse matrix
d_AThe transposed dense matrix
yThe y matrix

Definition at line 191 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::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 225 of file sparse_matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::prod_impl ( const matrix_base< NumericT > &  A,
bool  trans_A,
const vector_base< NumericT > &  vec,
vector_base< NumericT > &  result 
)

Carries out matrix-vector multiplication.

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

Parameters
AThe matrix
trans_AWhether the matrix A should be transposed
vecThe vector
resultThe result vector

Definition at line 305 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarType >
void viennacl::linalg::opencl::prod_impl ( matrix_base< NumericT > const &  A,
bool  A_trans,
matrix_base< NumericT > const &  B,
bool  B_trans,
matrix_base< NumericT > &  C,
ScalarType  alpha,
ScalarType  beta 
)

Carries out matrix-matrix multiplication.

Implementation of C = prod(A, B);

Definition at line 326 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::prod_impl ( viennacl::compressed_compressed_matrix< NumericT > const &  A,
viennacl::vector_base< NumericT > const &  x,
viennacl::vector_base< NumericT > &  y 
)

Carries out matrix-vector multiplication with a compressed_compressed_matrix.

Implementation of the convenience expression y = prod(A, x);

Parameters
AThe matrix
xThe vector
ythe result vector

Definition at line 626 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::coordinate_matrix< NumericT, AlignmentV > const &  A,
viennacl::vector_base< NumericT > const &  x,
viennacl::vector_base< NumericT > &  y 
)

Carries out matrix-vector multiplication with a coordinate_matrix.

Implementation of the convenience expression y = prod(A, x);

Parameters
AThe matrix
xThe vector
ythe result vector

Definition at line 691 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::coordinate_matrix< NumericT, AlignmentV > const &  A,
viennacl::matrix_base< NumericT > const &  d_A,
viennacl::matrix_base< NumericT > &  y 
)

Carries out sparse-matrix-dense-matrix multiplication, where the sparse matrix is a coordinate_matrix.

Implementation of the convenience expression y = prod(A, B); with A being sparse (COO) and B being dense

Parameters
AThe sparse matrix (COO forA)
d_AThe dense matrix
ythe result vector

Definition at line 741 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::coordinate_matrix< NumericT, AlignmentV > const &  A,
viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > const &  d_A,
viennacl::matrix_base< NumericT > &  y 
)

Carries out sparse-matrix-dense-matrix multiplication, where the sparse matrix is a coordinate_matrix.

Implementation of the convenience expression y = prod(A, trans(B)); with A being sparse (COO) and B being dense

Parameters
AThe sparse matrix (COO forA)
d_AThe dense matrix
ythe result vector

Definition at line 782 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::ell_matrix< NumericT, AlignmentV > const &  A,
viennacl::vector_base< NumericT > const &  x,
viennacl::vector_base< NumericT > &  y 
)

Definition at line 822 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::ell_matrix< NumericT, AlignmentV > const &  sp_A,
viennacl::matrix_base< NumericT > const &  d_A,
viennacl::matrix_base< NumericT > &  y 
)

Carries out Sparse Matrix(ELL)-Dense Matrix multiplication.

Implementation of the convenience expression y = prod(sp_A, d_A); sp_mat being in ELL format

Parameters
sp_AThe sparse matrix (ELL)
d_AThe dense matrix
yThe y matrix

Definition at line 882 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::ell_matrix< NumericT, AlignmentV > const &  sp_A,
viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > const &  d_A,
viennacl::matrix_base< NumericT > &  y 
)

Carries out Sparse Matrix(ELL)-Dense Transposed Matrix multiplication.

Implementation of the convenience expression y = prod(sp_A, trans(d_A)); sp_mat being in ELL format

Parameters
sp_AThe sparse matrix (ELL)
d_AThe dense transposed matrix
yThe y matrix

Definition at line 927 of file sparse_matrix_operations.hpp.

template<typename ScalarT , typename IndexT >
void viennacl::linalg::opencl::prod_impl ( viennacl::sliced_ell_matrix< ScalarT, IndexT > const &  A,
viennacl::vector_base< ScalarT > const &  x,
viennacl::vector_base< ScalarT > &  y 
)

Definition at line 969 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::hyb_matrix< NumericT, AlignmentV > const &  A,
viennacl::vector_base< NumericT > const &  x,
viennacl::vector_base< NumericT > &  y 
)

Definition at line 1023 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::hyb_matrix< NumericT, AlignmentV > const &  A,
viennacl::matrix_base< NumericT > const &  d_A,
viennacl::matrix_base< NumericT > &  y 
)

Definition at line 1065 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::opencl::prod_impl ( viennacl::hyb_matrix< NumericT, AlignmentV > const &  A,
viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_trans > const &  d_A,
viennacl::matrix_base< NumericT > &  y 
)

Definition at line 1098 of file sparse_matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::radix2 ( viennacl::ocl::handle< cl_mem > const &  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 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 161 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::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 306 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::reorder ( viennacl::ocl::handle< cl_mem > const &  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 130 of file fft_operations.hpp.

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

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

Definition at line 334 of file fft_operations.hpp.

template<typename NumericT , typename ScalarT1 >
void viennacl::linalg::opencl::scaled_rank_1_update ( matrix_base< NumericT > &  A,
ScalarT1 const &  alpha,
vcl_size_t  len_alpha,
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
AThe matrix to be updated
alphaThe scaling factor (either a viennacl::scalar<>, float, or double)
len_alphaLength of the buffer for an eventual final reduction step (currently always '1')
reciprocal_alphaUse 1/alpha instead of alpha
flip_sign_alphaUse -alpha instead of alpha
vec1The first vector
vec2The second vector

Definition at line 364 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::sum_cpu ( vector_base< NumericT > const &  x,
NumericT result 
)

Computes the sum over all entries of a vector.

Parameters
xThe vector
resultThe result scalar

Definition at line 498 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::sum_impl ( vector_base< NumericT > const &  x,
scalar< NumericT > &  result 
)

Computes the sum over all entries of a vector.

Parameters
xThe vector
resultThe result scalar

Definition at line 483 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::opencl::swap ( ScalarT1 &  s1,
ScalarT2 &  s2 
)

Swaps the contents of two scalars, data is copied.

Parameters
s1The first scalar
s2The second scalar

Definition at line 182 of file scalar_operations.hpp.

template<typename NumericT , typename SizeT , typename DistanceT >
void viennacl::linalg::opencl::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 182 of file matrix_operations.hpp.

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

Inplace_transpose matrix.

Definition at line 277 of file fft_operations.hpp.

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

Transpose matrix.

Definition at line 291 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::vector_assign ( vector_base< NumericT > &  x,
const NumericT alpha,
bool  up_to_internal_size = false 
)

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

Parameters
xThe 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 144 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::opencl::vector_swap ( vector_base< NumericT > &  x,
vector_base< NumericT > &  y 
)

Swaps the contents of two vectors, data is copied.

Parameters
xThe first vector (or -range, or -slice)
yThe second vector (or -range, or -slice)

Definition at line 160 of file vector_operations.hpp.

Variable Documentation

const std::string viennacl::linalg::opencl::BISECT_KERNEL_LARGE = "bisectKernelLarge"

Definition at line 44 of file bisect_kernel_calls.hpp.

const std::string viennacl::linalg::opencl::BISECT_KERNEL_LARGE_MULT_INTERVALS = "bisectKernelLarge_MultIntervals"

Definition at line 46 of file bisect_kernel_calls.hpp.

const std::string viennacl::linalg::opencl::BISECT_KERNEL_LARGE_ONE_INTERVALS = "bisectKernelLarge_OneIntervals"

Definition at line 45 of file bisect_kernel_calls.hpp.

const std::string viennacl::linalg::opencl::BISECT_KERNEL_SMALL = "bisectKernelSmall"

Definition at line 43 of file bisect_kernel_calls.hpp.

const std::string viennacl::linalg::opencl::SVD_BIDIAG_PACK_KERNEL = "bidiag_pack"

Definition at line 86 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_COPY_COL_KERNEL = "copy_col"

Definition at line 91 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_COPY_ROW_KERNEL = "copy_row"

Definition at line 92 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_GIVENS_NEXT_KERNEL = "givens_next"

Definition at line 90 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_HOUSEHOLDER_UPDATE_A_LEFT_KERNEL = "house_update_A_left"

Definition at line 87 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_HOUSEHOLDER_UPDATE_A_RIGHT_KERNEL = "house_update_A_right"

Definition at line 88 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_HOUSEHOLDER_UPDATE_QL_KERNEL = "house_update_QL"

Definition at line 89 of file matrix_operations.hpp.