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

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

Namespaces

 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 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 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 inclusive_scan (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2)
 
template<typename NumericT >
void exclusive_scan (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2)
 
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 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 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 plane_rotation (vector_base< NumericT > &x, vector_base< NumericT > &y, NumericT alpha, NumericT beta)
 Computes a plane rotation of two vectors. More...
 

Variables

const std::string BISECT_KERNEL_SMALL = "bisectKernel"
 
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"
 
const std::string SVD_INCLUSIVE_SCAN_KERNEL_1 = "inclusive_scan_1"
 
const std::string SVD_EXCLUSIVE_SCAN_KERNEL_1 = "exclusive_scan_1"
 
const std::string SVD_SCAN_KERNEL_2 = "scan_kernel_2"
 
const std::string SVD_SCAN_KERNEL_3 = "scan_kernel_3"
 
const std::string SVD_SCAN_KERNEL_4 = "scan_kernel_4"
 

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 76 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 94 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 117 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 53 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 85 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 134 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 55 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 71 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 94 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 384 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 358 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 76 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 141 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 113 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 46 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 211 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 319 of file fft_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 596 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 98 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 154 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 173 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 215 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 237 of file matrix_operations.hpp.

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

Definition at line 716 of file matrix_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 548 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 423 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 466 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 510 of file matrix_operations.hpp.

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

Definition at line 642 of file matrix_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 382 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 262 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 194 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 226 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 76 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 126 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 204 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 227 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 252 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 275 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 360 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 386 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 416 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 442 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 158 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 197 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 176 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 183 of file matrix_operations.hpp.

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

Definition at line 168 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 190 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 414 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 399 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 446 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 431 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 245 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 295 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 280 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 329 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 314 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 362 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 347 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 260 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 340 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 381 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 420 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 467 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 508 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 275 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 306 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 115 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 149 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 191 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 227 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 600 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 625 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 567 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 685 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 723 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 760 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 798 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 836 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 657 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 467 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 80 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 138 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 170 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 263 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 284 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 480 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 545 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 595 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 636 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 676 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 736 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 781 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 823 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 873 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 915 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 948 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 160 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 305 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 129 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 333 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 322 of file matrix_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 181 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 140 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 276 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 290 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 123 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 139 of file vector_operations.hpp.

Variable Documentation

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

Definition at line 41 of file bisect_kernel_calls.hpp.

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

Definition at line 43 of file bisect_kernel_calls.hpp.

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

Definition at line 42 of file bisect_kernel_calls.hpp.

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

Definition at line 40 of file bisect_kernel_calls.hpp.

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

Definition at line 61 of file matrix_operations.hpp.

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

Definition at line 66 of file matrix_operations.hpp.

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

Definition at line 67 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_EXCLUSIVE_SCAN_KERNEL_1 = "exclusive_scan_1"

Definition at line 69 of file matrix_operations.hpp.

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

Definition at line 65 of file matrix_operations.hpp.

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

Definition at line 62 of file matrix_operations.hpp.

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

Definition at line 63 of file matrix_operations.hpp.

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

Definition at line 64 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_INCLUSIVE_SCAN_KERNEL_1 = "inclusive_scan_1"

Definition at line 68 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_SCAN_KERNEL_2 = "scan_kernel_2"

Definition at line 70 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_SCAN_KERNEL_3 = "scan_kernel_3"

Definition at line 71 of file matrix_operations.hpp.

const std::string viennacl::linalg::opencl::SVD_SCAN_KERNEL_4 = "scan_kernel_4"

Definition at line 72 of file matrix_operations.hpp.