ViennaCL - The Vienna Computing Library
1.5.1
|
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 , typename F1 , typename F2 , typename SOLVERTAG > | |
void | inplace_solve (const matrix_base< NumericT, F1 > &A, matrix_base< NumericT, F2 > &B, SOLVERTAG) |
Direct inplace solver for dense triangular systems. Matlab notation: A \ B. More... | |
template<typename NumericT , typename F1 , typename F2 , typename SOLVERTAG > | |
void | inplace_solve (const matrix_base< NumericT, F1 > &A, matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > proxy_B, SOLVERTAG) |
Direct inplace solver for dense triangular systems with transposed right hand side. More... | |
template<typename NumericT , typename F1 , typename F2 , typename SOLVERTAG > | |
void | inplace_solve (const matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &proxy_A, matrix_base< NumericT, F2 > &B, SOLVERTAG) |
Direct inplace solver for dense triangular systems that stem from transposed triangular systems. More... | |
template<typename NumericT , typename F1 , typename F2 , typename SOLVERTAG > | |
void | inplace_solve (const matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &proxy_A, matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > proxy_B, SOLVERTAG) |
Direct inplace solver for dense transposed triangular systems with transposed right hand side. Matlab notation: A' \ B'. More... | |
template<typename NumericT , typename F , typename SOLVERTAG > | |
void | inplace_solve (const matrix_base< NumericT, F > &mat, vector_base< NumericT > &vec, SOLVERTAG) |
template<typename NumericT , typename F , typename SOLVERTAG > | |
void | inplace_solve (const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans > &proxy, vector_base< NumericT > &vec, SOLVERTAG) |
Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems. More... | |
template<typename NumericT , typename F , typename ScalarType1 > | |
void | am (matrix_base< NumericT, F > &mat1, matrix_base< NumericT, F > const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha) |
template<typename NumericT , typename F , typename ScalarType1 , typename ScalarType2 > | |
void | ambm (matrix_base< NumericT, F > &mat1, matrix_base< NumericT, F > const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT, F > const &mat3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta) |
template<typename NumericT , typename F , typename ScalarType1 , typename ScalarType2 > | |
void | ambm_m (matrix_base< NumericT, F > &mat1, matrix_base< NumericT, F > const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT, F > const &mat3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta) |
template<typename NumericT , typename F > | |
void | matrix_assign (matrix_base< NumericT, F > &mat, NumericT s, bool clear=false) |
template<typename NumericT , typename F > | |
void | matrix_diagonal_assign (matrix_base< NumericT, F > &mat, NumericT s) |
template<typename NumericT , typename F > | |
void | matrix_diag_from_vector (const vector_base< NumericT > &vec, int k, matrix_base< NumericT, F > &mat) |
template<typename NumericT , typename F > | |
void | matrix_diag_to_vector (const matrix_base< NumericT, F > &mat, int k, vector_base< NumericT > &vec) |
template<typename NumericT , typename F > | |
void | matrix_row (const matrix_base< NumericT, F > &mat, unsigned int i, vector_base< NumericT > &vec) |
template<typename NumericT , typename F > | |
void | matrix_column (const matrix_base< NumericT, F > &mat, unsigned int j, vector_base< NumericT > &vec) |
template<typename T , typename F , typename OP > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_binary< OP > > const &proxy) |
Implementation of binary element-wise operations A = OP(B,C) More... | |
template<typename T , typename F , typename OP > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< OP > > const &proxy) |
Implementation of unary element-wise operations A = OP(B) More... | |
template<typename NumericT , typename F > | |
void | prod_impl (const matrix_base< NumericT, F > &mat, const vector_base< NumericT > &vec, vector_base< NumericT > &result) |
Carries out matrix-vector multiplication. More... | |
template<typename NumericT , typename F > | |
void | prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans > &mat_trans, const vector_base< NumericT > &vec, vector_base< NumericT > &result) |
Carries out matrix-vector multiplication with a transposed matrix. More... | |
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType > | |
void | prod_impl (const matrix_base< NumericT, F1 > &A, const matrix_base< NumericT, F2 > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta) |
Carries out matrix-matrix multiplication. More... | |
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType > | |
void | prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &A, const matrix_base< NumericT, F2 > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta) |
Carries out matrix-matrix multiplication. More... | |
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType > | |
void | prod_impl (const matrix_base< NumericT, F1 > &A, const viennacl::matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta) |
Carries out matrix-matrix multiplication. More... | |
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType > | |
void | prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &A, const viennacl::matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta) |
Carries out matrix-matrix multiplication. More... | |
template<typename NumericT , typename F , typename S1 > | |
void | scaled_rank_1_update (matrix_base< NumericT, F > &mat1, S1 const &alpha, vcl_size_t 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 S1 , typename S2 , typename ScalarType1 > | |
viennacl::enable_if < viennacl::is_scalar< S1 > ::value &&viennacl::is_scalar < S2 >::value &&viennacl::is_any_scalar < ScalarType1 >::value >::type | as (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha) |
template<typename S1 , typename S2 , typename ScalarType1 , typename S3 , typename ScalarType2 > | |
viennacl::enable_if < viennacl::is_scalar< S1 > ::value &&viennacl::is_scalar < S2 >::value &&viennacl::is_scalar< S3 > ::value &&viennacl::is_any_scalar < ScalarType1 >::value &&viennacl::is_any_scalar < ScalarType2 >::value >::type | asbs (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, S3 const &s3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta) |
template<typename S1 , typename S2 , typename ScalarType1 , typename S3 , typename ScalarType2 > | |
viennacl::enable_if < viennacl::is_scalar< S1 > ::value &&viennacl::is_scalar < S2 >::value &&viennacl::is_scalar< S3 > ::value &&viennacl::is_any_scalar < ScalarType1 >::value &&viennacl::is_any_scalar < ScalarType2 >::value >::type | asbs_s (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, S3 const &s3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta) |
template<typename S1 , typename S2 > | |
viennacl::enable_if < viennacl::is_scalar< S1 > ::value &&viennacl::is_scalar < S2 >::value >::type | swap (S1 &s1, S2 &s2) |
Swaps the contents of two scalars, data is copied. More... | |
template<class TYPE , unsigned int ALIGNMENT> | |
void | prod_impl (const viennacl::compressed_matrix< TYPE, ALIGNMENT > &mat, const viennacl::vector_base< TYPE > &vec, viennacl::vector_base< TYPE > &result) |
Carries out matrix-vector multiplication with a compressed_matrix. More... | |
template<typename TYPE , unsigned int ALIGNMENT, typename F1 , typename F2 > | |
void | prod_impl (const viennacl::compressed_matrix< TYPE, ALIGNMENT > &sp_mat, const viennacl::matrix_base< TYPE, F1 > &d_mat, viennacl::matrix_base< TYPE, F2 > &result) |
Carries out sparse_matrix-matrix multiplication first matrix being compressed. More... | |
template<typename TYPE , unsigned int ALIGNMENT, typename F1 , typename F2 > | |
void | prod_impl (const viennacl::compressed_matrix< TYPE, ALIGNMENT > &sp_mat, const viennacl::matrix_expression< const viennacl::matrix_base< TYPE, F1 >, const viennacl::matrix_base< TYPE, F1 >, viennacl::op_trans > &d_mat, viennacl::matrix_base< TYPE, F2 > &result) |
Carries out matrix-trans(matrix) multiplication first matrix being compressed and the second transposed. More... | |
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT> | |
void | inplace_solve (compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &L, vector_base< SCALARTYPE > &vec, viennacl::linalg::unit_lower_tag) |
Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions. More... | |
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT> | |
void | inplace_solve (compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &L, vector_base< SCALARTYPE > &vec, viennacl::linalg::lower_tag) |
Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions. More... | |
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT> | |
void | inplace_solve (compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &U, vector_base< SCALARTYPE > &vec, viennacl::linalg::unit_upper_tag) |
Inplace solution of an upper triangular compressed_matrix with unit diagonal. Typically used for LU substitutions. More... | |
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT> | |
void | inplace_solve (compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &U, vector_base< SCALARTYPE > &vec, viennacl::linalg::upper_tag) |
Inplace solution of an upper triangular compressed_matrix. Typically used for LU substitutions. More... | |
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT> | |
void | inplace_solve (matrix_expression< const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, op_trans > const &proxy_L, vector_base< SCALARTYPE > &vec, viennacl::linalg::unit_lower_tag) |
Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions. More... | |
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT> | |
void | inplace_solve (matrix_expression< const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, op_trans > const &proxy_L, vector_base< SCALARTYPE > &vec, viennacl::linalg::lower_tag) |
Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions. More... | |
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT> | |
void | inplace_solve (matrix_expression< const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, op_trans > const &proxy_U, vector_base< SCALARTYPE > &vec, viennacl::linalg::unit_upper_tag) |
Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions. More... | |
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT> | |
void | inplace_solve (matrix_expression< const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, op_trans > const &proxy_U, vector_base< SCALARTYPE > &vec, viennacl::linalg::upper_tag) |
Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions. More... | |
template<class TYPE > | |
void | prod_impl (const viennacl::compressed_compressed_matrix< TYPE > &mat, const viennacl::vector_base< TYPE > &vec, viennacl::vector_base< TYPE > &result) |
Carries out matrix-vector multiplication with a compressed_compressed_matrix. More... | |
template<class SCALARTYPE , unsigned int ALIGNMENT> | |
void | prod_impl (const viennacl::coordinate_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector_base< SCALARTYPE > &vec, viennacl::vector_base< SCALARTYPE > &result) |
Carries out matrix-vector multiplication with a coordinate_matrix. More... | |
template<typename NumericT , unsigned int ALIGNMENT, typename F1 , typename F2 > | |
void | prod_impl (const viennacl::coordinate_matrix< NumericT, ALIGNMENT > &mat, const viennacl::matrix_base< NumericT, F1 > &d_mat, viennacl::matrix_base< NumericT, F2 > &result) |
Carries out sparse-matrix-dense-matrix multiplication, where the sparse matrix is a coordinate_matrix. More... | |
template<typename NumericT , unsigned int ALIGNMENT, typename F1 , typename F2 > | |
void | prod_impl (const viennacl::coordinate_matrix< NumericT, ALIGNMENT > &mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT, F1 >, const viennacl::matrix_base< NumericT, F1 >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT, F2 > &result) |
Carries out sparse-matrix-dense-matrix multiplication, where the sparse matrix is a coordinate_matrix. More... | |
template<class TYPE , unsigned int ALIGNMENT> | |
void | prod_impl (const viennacl::ell_matrix< TYPE, ALIGNMENT > &mat, const viennacl::vector_base< TYPE > &vec, viennacl::vector_base< TYPE > &result) |
template<class ScalarType , unsigned int ALIGNMENT, class NumericT , typename F1 , typename F2 > | |
void | prod_impl (const viennacl::ell_matrix< ScalarType, ALIGNMENT > &sp_mat, const viennacl::matrix_base< NumericT, F1 > &d_mat, viennacl::matrix_base< NumericT, F2 > &result) |
Carries out Sparse Matrix(ELL)-Dense Matrix multiplication. More... | |
template<class ScalarType , unsigned int ALIGNMENT, class NumericT , typename F1 , typename F2 > | |
void | prod_impl (const viennacl::ell_matrix< ScalarType, ALIGNMENT > &sp_mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT, F1 >, const viennacl::matrix_base< NumericT, F1 >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT, F2 > &result) |
Carries out Sparse Matrix(ELL)-Dense Transposed Matrix multiplication. More... | |
template<class TYPE , unsigned int ALIGNMENT> | |
void | prod_impl (const viennacl::hyb_matrix< TYPE, ALIGNMENT > &mat, const viennacl::vector_base< TYPE > &vec, viennacl::vector_base< TYPE > &result) |
template<typename NumericT , unsigned int ALIGNMENT, typename F1 , typename F2 > | |
void | prod_impl (const viennacl::hyb_matrix< NumericT, ALIGNMENT > &mat, const viennacl::matrix_base< NumericT, F1 > &d_mat, viennacl::matrix_base< NumericT, F2 > &result) |
template<typename NumericT , unsigned int ALIGNMENT, typename F1 , typename F2 > | |
void | prod_impl (const viennacl::hyb_matrix< NumericT, ALIGNMENT > &mat, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT, F1 >, const viennacl::matrix_base< NumericT, F1 >, viennacl::op_trans > &d_mat, viennacl::matrix_base< NumericT, F2 > &result) |
template<class SCALARTYPE , unsigned int ALIGNMENT> | |
void | prod_impl (const viennacl::vandermonde_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector_base< SCALARTYPE > &vec, viennacl::vector_base< SCALARTYPE > &result) |
Carries out matrix-vector multiplication with a vandermonde_matrix. More... | |
template<typename T , typename ScalarType1 > | |
void | av (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha) |
template<typename T , typename ScalarType1 , typename ScalarType2 > | |
void | avbv (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta) |
template<typename T , typename ScalarType1 , typename ScalarType2 > | |
void | avbv_v (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta) |
template<typename T > | |
void | vector_assign (vector_base< T > &vec1, const T &alpha, bool up_to_internal_size=false) |
Assign a constant value to a vector (-range/-slice) More... | |
template<typename T > | |
void | vector_swap (vector_base< T > &vec1, vector_base< T > &vec2) |
Swaps the contents of two vectors, data is copied. More... | |
template<typename T , typename OP > | |
void | element_op (vector_base< T > &vec1, vector_expression< const vector_base< T >, const vector_base< T >, op_element_binary< OP > > const &proxy) |
Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax) More... | |
template<typename T , typename OP > | |
void | element_op (vector_base< T > &vec1, vector_expression< const vector_base< T >, const vector_base< T >, op_element_unary< OP > > const &proxy) |
Implementation of unary element-wise operations v1 = OP(v2) More... | |
template<typename T > | |
void | inner_prod_impl (vector_base< T > const &vec1, vector_base< T > const &vec2, vector_base< T > &partial_result) |
Computes the partial inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2). More... | |
template<typename T > | |
void | inner_prod_impl (vector_base< T > const &vec1, vector_base< T > const &vec2, scalar< T > &result) |
Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2). More... | |
template<typename T > | |
void | inner_prod_impl (vector_base< T > const &x, vector_tuple< T > const &vec_tuple, vector_base< T > &result) |
Computes multiple inner products where one argument is common to all inner products. <x, y1>, <x, y2>, ..., <x, yN> More... | |
template<typename T > | |
void | inner_prod_cpu (vector_base< T > const &vec1, vector_base< T > const &vec2, T &result) |
Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2). More... | |
template<typename T > | |
void | norm_reduction_impl (vector_base< T > const &vec, vector_base< T > &partial_result, cl_uint norm_id) |
Computes the partial work group results for vector norms. More... | |
template<typename T > | |
void | norm_1_impl (vector_base< T > const &vec, scalar< T > &result) |
Computes the l^1-norm of a vector. More... | |
template<typename T > | |
void | norm_1_cpu (vector_base< T > const &vec, T &result) |
Computes the l^1-norm of a vector with final reduction on CPU. More... | |
template<typename T > | |
void | norm_2_impl (vector_base< T > const &vec, scalar< T > &result) |
Computes the l^2-norm of a vector - implementation using OpenCL summation at second step. More... | |
template<typename T > | |
void | norm_2_cpu (vector_base< T > const &vec, T &result) |
Computes the l^1-norm of a vector with final reduction on CPU. More... | |
template<typename T > | |
void | norm_inf_impl (vector_base< T > const &vec, scalar< T > &result) |
Computes the supremum-norm of a vector. More... | |
template<typename T > | |
void | norm_inf_cpu (vector_base< T > const &vec, T &result) |
Computes the supremum-norm of a vector. More... | |
template<typename T > | |
cl_uint | index_norm_inf (vector_base< T > const &vec) |
Computes the index of the first entry that is equal to the supremum-norm in modulus. More... | |
template<typename T > | |
void | plane_rotation (vector_base< T > &vec1, vector_base< T > &vec2, T alpha, T beta) |
Computes a plane rotation of two vectors. More... | |
Holds all routines providing OpenCL linear algebra operations.
void viennacl::linalg::opencl::am | ( | matrix_base< NumericT, F > & | mat1, |
matrix_base< NumericT, F > const & | mat2, | ||
ScalarType1 const & | alpha, | ||
vcl_size_t | len_alpha, | ||
bool | reciprocal_alpha, | ||
bool | flip_sign_alpha | ||
) |
void viennacl::linalg::opencl::ambm | ( | matrix_base< NumericT, F > & | mat1, |
matrix_base< NumericT, F > const & | mat2, | ||
ScalarType1 const & | alpha, | ||
vcl_size_t | len_alpha, | ||
bool | reciprocal_alpha, | ||
bool | flip_sign_alpha, | ||
matrix_base< NumericT, F > const & | mat3, | ||
ScalarType2 const & | beta, | ||
vcl_size_t | len_beta, | ||
bool | reciprocal_beta, | ||
bool | flip_sign_beta | ||
) |
void viennacl::linalg::opencl::ambm_m | ( | matrix_base< NumericT, F > & | mat1, |
matrix_base< NumericT, F > const & | mat2, | ||
ScalarType1 const & | alpha, | ||
vcl_size_t | len_alpha, | ||
bool | reciprocal_alpha, | ||
bool | flip_sign_alpha, | ||
matrix_base< NumericT, F > const & | mat3, | ||
ScalarType2 const & | beta, | ||
vcl_size_t | len_beta, | ||
bool | reciprocal_beta, | ||
bool | flip_sign_beta | ||
) |
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value && viennacl::is_any_scalar<ScalarType1>::value >::type viennacl::linalg::opencl::as | ( | S1 & | s1, |
S2 const & | s2, | ||
ScalarType1 const & | alpha, | ||
vcl_size_t | len_alpha, | ||
bool | reciprocal_alpha, | ||
bool | flip_sign_alpha | ||
) |
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value && viennacl::is_scalar<S3>::value && viennacl::is_any_scalar<ScalarType1>::value && viennacl::is_any_scalar<ScalarType2>::value >::type viennacl::linalg::opencl::asbs | ( | S1 & | s1, |
S2 const & | s2, | ||
ScalarType1 const & | alpha, | ||
vcl_size_t | len_alpha, | ||
bool | reciprocal_alpha, | ||
bool | flip_sign_alpha, | ||
S3 const & | s3, | ||
ScalarType2 const & | beta, | ||
vcl_size_t | len_beta, | ||
bool | reciprocal_beta, | ||
bool | flip_sign_beta | ||
) |
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value && viennacl::is_scalar<S3>::value && viennacl::is_any_scalar<ScalarType1>::value && viennacl::is_any_scalar<ScalarType2>::value >::type viennacl::linalg::opencl::asbs_s | ( | S1 & | s1, |
S2 const & | s2, | ||
ScalarType1 const & | alpha, | ||
vcl_size_t | len_alpha, | ||
bool | reciprocal_alpha, | ||
bool | flip_sign_alpha, | ||
S3 const & | s3, | ||
ScalarType2 const & | beta, | ||
vcl_size_t | len_beta, | ||
bool | reciprocal_beta, | ||
bool | flip_sign_beta | ||
) |
void viennacl::linalg::opencl::av | ( | vector_base< T > & | vec1, |
vector_base< T > const & | vec2, | ||
ScalarType1 const & | alpha, | ||
vcl_size_t | len_alpha, | ||
bool | reciprocal_alpha, | ||
bool | flip_sign_alpha | ||
) |
void viennacl::linalg::opencl::avbv | ( | vector_base< T > & | vec1, |
vector_base< T > const & | vec2, | ||
ScalarType1 const & | alpha, | ||
vcl_size_t | len_alpha, | ||
bool | reciprocal_alpha, | ||
bool | flip_sign_alpha, | ||
vector_base< T > const & | vec3, | ||
ScalarType2 const & | beta, | ||
vcl_size_t | len_beta, | ||
bool | reciprocal_beta, | ||
bool | flip_sign_beta | ||
) |
void viennacl::linalg::opencl::avbv_v | ( | vector_base< T > & | vec1, |
vector_base< T > const & | vec2, | ||
ScalarType1 const & | alpha, | ||
vcl_size_t | len_alpha, | ||
bool | reciprocal_alpha, | ||
bool | flip_sign_alpha, | ||
vector_base< T > const & | vec3, | ||
ScalarType2 const & | beta, | ||
vcl_size_t | len_beta, | ||
bool | reciprocal_beta, | ||
bool | flip_sign_beta | ||
) |
void viennacl::linalg::opencl::element_op | ( | vector_base< T > & | vec1, |
vector_expression< const vector_base< T >, const vector_base< T >, op_element_binary< OP > > const & | proxy | ||
) |
Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax)
vec1 | The result vector (or -range, or -slice) |
proxy | The proxy object holding v2, v3 and the operation |
void viennacl::linalg::opencl::element_op | ( | vector_base< T > & | vec1, |
vector_expression< const vector_base< T >, const vector_base< T >, op_element_unary< OP > > const & | proxy | ||
) |
Implementation of unary element-wise operations v1 = OP(v2)
vec1 | The result vector (or -range, or -slice) |
proxy | The proxy object holding v2 and the operation |
void viennacl::linalg::opencl::element_op | ( | matrix_base< T, F > & | A, |
matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_binary< OP > > const & | proxy | ||
) |
Implementation of binary element-wise operations A = OP(B,C)
A | The result matrix (or -range, or -slice) |
proxy | The proxy object holding B, C, and the operation |
void viennacl::linalg::opencl::element_op | ( | matrix_base< T, F > & | A, |
matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< OP > > const & | proxy | ||
) |
Implementation of unary element-wise operations A = OP(B)
A | The result matrix (or -range, or -slice) |
proxy | The proxy object holding B and the operation |
cl_uint viennacl::linalg::opencl::index_norm_inf | ( | vector_base< T > const & | vec | ) |
Computes the index of the first entry that is equal to the supremum-norm in modulus.
vec | The vector |
void viennacl::linalg::opencl::inner_prod_cpu | ( | vector_base< T > const & | vec1, |
vector_base< T > const & | vec2, | ||
T & | result | ||
) |
Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2).
vec1 | The first vector |
vec2 | The second vector |
result | The result scalar (on the gpu) |
void viennacl::linalg::opencl::inner_prod_impl | ( | vector_base< T > const & | vec1, |
vector_base< T > const & | vec2, | ||
vector_base< T > & | partial_result | ||
) |
Computes the partial inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2).
vec1 | The first vector |
vec2 | The second vector |
partial_result | The results of each group |
void viennacl::linalg::opencl::inner_prod_impl | ( | vector_base< T > const & | vec1, |
vector_base< T > const & | vec2, | ||
scalar< T > & | result | ||
) |
Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2).
vec1 | The first vector |
vec2 | The second vector |
result | The result scalar (on the gpu) |
void viennacl::linalg::opencl::inner_prod_impl | ( | vector_base< T > const & | x, |
vector_tuple< T > const & | vec_tuple, | ||
vector_base< T > & | result | ||
) |
Computes multiple inner products where one argument is common to all inner products. <x, y1>, <x, y2>, ..., <x, yN>
x | The common vector |
vec_tuple | The tuple of vectors y1, y2, ..., yN |
result | The result vector |
void viennacl::linalg::opencl::inplace_solve | ( | const matrix_base< NumericT, F1 > & | A, |
matrix_base< NumericT, F2 > & | B, | ||
SOLVERTAG | |||
) |
Direct inplace solver for dense triangular systems. Matlab notation: A \ B.
A | The system matrix |
B | The matrix of row vectors, where the solution is directly written to |
void viennacl::linalg::opencl::inplace_solve | ( | const matrix_base< NumericT, F1 > & | A, |
matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > | proxy_B, | ||
SOLVERTAG | |||
) |
Direct inplace solver for dense triangular systems with transposed right hand side.
A | The system matrix |
proxy_B | The transposed matrix of row vectors, where the solution is directly written to |
void viennacl::linalg::opencl::inplace_solve | ( | const matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > & | proxy_A, |
matrix_base< NumericT, F2 > & | B, | ||
SOLVERTAG | |||
) |
Direct inplace solver for dense triangular systems that stem from transposed triangular systems.
proxy_A | The system matrix proxy |
B | The matrix holding the load vectors, where the solution is directly written to |
void viennacl::linalg::opencl::inplace_solve | ( | const matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > & | proxy_A, |
matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > | proxy_B, | ||
SOLVERTAG | |||
) |
Direct inplace solver for dense transposed triangular systems with transposed right hand side. Matlab notation: A' \ B'.
proxy_A | The system matrix proxy |
proxy_B | The matrix holding the load vectors, where the solution is directly written to |
void viennacl::linalg::opencl::inplace_solve | ( | const matrix_base< NumericT, F > & | mat, |
vector_base< NumericT > & | vec, | ||
SOLVERTAG | |||
) |
void viennacl::linalg::opencl::inplace_solve | ( | compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const & | L, |
vector_base< SCALARTYPE > & | vec, | ||
viennacl::linalg::unit_lower_tag | |||
) |
Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions.
L | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
void viennacl::linalg::opencl::inplace_solve | ( | const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans > & | proxy, |
vector_base< NumericT > & | vec, | ||
SOLVERTAG | |||
) |
Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems.
proxy | The system matrix proxy |
vec | The load vector, where the solution is directly written to |
void viennacl::linalg::opencl::inplace_solve | ( | compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const & | L, |
vector_base< SCALARTYPE > & | vec, | ||
viennacl::linalg::lower_tag | |||
) |
Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions.
L | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
void viennacl::linalg::opencl::inplace_solve | ( | compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const & | U, |
vector_base< SCALARTYPE > & | vec, | ||
viennacl::linalg::unit_upper_tag | |||
) |
Inplace solution of an upper triangular compressed_matrix with unit diagonal. Typically used for LU substitutions.
U | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
void viennacl::linalg::opencl::inplace_solve | ( | compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const & | U, |
vector_base< SCALARTYPE > & | vec, | ||
viennacl::linalg::upper_tag | |||
) |
Inplace solution of an upper triangular compressed_matrix. Typically used for LU substitutions.
U | The matrix |
vec | The vector holding the right hand side. Is overwritten by the solution. |
void viennacl::linalg::opencl::inplace_solve | ( | matrix_expression< const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, op_trans > const & | proxy_L, |
vector_base< SCALARTYPE > & | vec, | ||
viennacl::linalg::unit_lower_tag | |||
) |
Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions.
proxy_L | The transposed matrix proxy |
vec | The vector |
void viennacl::linalg::opencl::inplace_solve | ( | matrix_expression< const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, op_trans > const & | proxy_L, |
vector_base< SCALARTYPE > & | vec, | ||
viennacl::linalg::lower_tag | |||
) |
Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions.
proxy_L | The transposed matrix proxy |
vec | The vector |
void viennacl::linalg::opencl::inplace_solve | ( | matrix_expression< const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, op_trans > const & | proxy_U, |
vector_base< SCALARTYPE > & | vec, | ||
viennacl::linalg::unit_upper_tag | |||
) |
Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions.
proxy_U | The transposed matrix proxy |
vec | The vector |
void viennacl::linalg::opencl::inplace_solve | ( | matrix_expression< const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, const compressed_matrix< SCALARTYPE, MAT_ALIGNMENT >, op_trans > const & | proxy_U, |
vector_base< SCALARTYPE > & | vec, | ||
viennacl::linalg::upper_tag | |||
) |
Inplace solution of a lower triangular compressed_matrix. Typically used for LU substitutions.
proxy_U | The transposed matrix proxy |
vec | The vector |
void viennacl::linalg::opencl::matrix_assign | ( | matrix_base< NumericT, F > & | mat, |
NumericT | s, | ||
bool | clear = false |
||
) |
void viennacl::linalg::opencl::matrix_column | ( | const matrix_base< NumericT, F > & | mat, |
unsigned int | j, | ||
vector_base< NumericT > & | vec | ||
) |
void viennacl::linalg::opencl::matrix_diag_from_vector | ( | const vector_base< NumericT > & | vec, |
int | k, | ||
matrix_base< NumericT, F > & | mat | ||
) |
void viennacl::linalg::opencl::matrix_diag_to_vector | ( | const matrix_base< NumericT, F > & | mat, |
int | k, | ||
vector_base< NumericT > & | vec | ||
) |
void viennacl::linalg::opencl::matrix_diagonal_assign | ( | matrix_base< NumericT, F > & | mat, |
NumericT | s | ||
) |
void viennacl::linalg::opencl::matrix_row | ( | const matrix_base< NumericT, F > & | mat, |
unsigned int | i, | ||
vector_base< NumericT > & | vec | ||
) |
void viennacl::linalg::opencl::norm_1_cpu | ( | vector_base< T > const & | vec, |
T & | result | ||
) |
Computes the l^1-norm of a vector with final reduction on CPU.
vec | The vector |
result | The result scalar |
void viennacl::linalg::opencl::norm_1_impl | ( | vector_base< T > const & | vec, |
scalar< T > & | result | ||
) |
Computes the l^1-norm of a vector.
vec | The vector |
result | The result scalar |
void viennacl::linalg::opencl::norm_2_cpu | ( | vector_base< T > const & | vec, |
T & | result | ||
) |
Computes the l^1-norm of a vector with final reduction on CPU.
vec | The vector |
result | The result scalar |
void viennacl::linalg::opencl::norm_2_impl | ( | vector_base< T > const & | vec, |
scalar< T > & | result | ||
) |
Computes the l^2-norm of a vector - implementation using OpenCL summation at second step.
vec | The vector |
result | The result scalar |
void viennacl::linalg::opencl::norm_inf_cpu | ( | vector_base< T > const & | vec, |
T & | result | ||
) |
Computes the supremum-norm of a vector.
vec | The vector |
result | The result scalar |
void viennacl::linalg::opencl::norm_inf_impl | ( | vector_base< T > const & | vec, |
scalar< T > & | result | ||
) |
Computes the supremum-norm of a vector.
vec | The vector |
result | The result scalar |
void viennacl::linalg::opencl::norm_reduction_impl | ( | vector_base< T > const & | vec, |
vector_base< T > & | partial_result, | ||
cl_uint | norm_id | ||
) |
Computes the partial work group results for vector norms.
vec | The vector |
partial_result | The result scalar |
norm_id | Norm selector. 0: norm_inf, 1: norm_1, 2: norm_2 |
void viennacl::linalg::opencl::plane_rotation | ( | vector_base< T > & | vec1, |
vector_base< T > & | vec2, | ||
T | alpha, | ||
T | beta | ||
) |
Computes a plane rotation of two vectors.
Computes (x,y) <- (alpha * x + beta * y, -beta * x + alpha * y)
vec1 | The first vector |
vec2 | The second vector |
alpha | The first transformation coefficient |
beta | The second transformation coefficient |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::vandermonde_matrix< SCALARTYPE, ALIGNMENT > & | mat, |
const viennacl::vector_base< SCALARTYPE > & | vec, | ||
viennacl::vector_base< SCALARTYPE > & | result | ||
) |
Carries out matrix-vector multiplication with a vandermonde_matrix.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::compressed_matrix< TYPE, ALIGNMENT > & | mat, |
const viennacl::vector_base< TYPE > & | vec, | ||
viennacl::vector_base< TYPE > & | result | ||
) |
Carries out matrix-vector multiplication with a compressed_matrix.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::compressed_matrix< TYPE, ALIGNMENT > & | sp_mat, |
const viennacl::matrix_base< TYPE, F1 > & | d_mat, | ||
viennacl::matrix_base< TYPE, F2 > & | result | ||
) |
Carries out sparse_matrix-matrix multiplication first matrix being compressed.
Implementation of the convenience expression result = prod(sp_mat, d_mat);
sp_mat | The sparse matrix |
d_mat | The dense matrix |
result | The result matrix |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::compressed_matrix< TYPE, ALIGNMENT > & | sp_mat, |
const viennacl::matrix_expression< const viennacl::matrix_base< TYPE, F1 >, const viennacl::matrix_base< TYPE, F1 >, viennacl::op_trans > & | d_mat, | ||
viennacl::matrix_base< TYPE, F2 > & | result | ||
) |
Carries out matrix-trans(matrix) multiplication first matrix being compressed and the second transposed.
Implementation of the convenience expression result = prod(sp_mat, d_mat);
sp_mat | The sparse matrix |
d_mat | The transposed dense matrix |
result | The result matrix |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::compressed_compressed_matrix< TYPE > & | mat, |
const viennacl::vector_base< TYPE > & | vec, | ||
viennacl::vector_base< TYPE > & | result | ||
) |
Carries out matrix-vector multiplication with a compressed_compressed_matrix.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::coordinate_matrix< SCALARTYPE, ALIGNMENT > & | mat, |
const viennacl::vector_base< SCALARTYPE > & | vec, | ||
viennacl::vector_base< SCALARTYPE > & | result | ||
) |
Carries out matrix-vector multiplication with a coordinate_matrix.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
void viennacl::linalg::opencl::prod_impl | ( | const matrix_base< NumericT, F > & | mat, |
const vector_base< NumericT > & | vec, | ||
vector_base< NumericT > & | result | ||
) |
Carries out matrix-vector multiplication.
Implementation of the convenience expression result = prod(mat, vec);
mat | The matrix |
vec | The vector |
result | The result vector |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::coordinate_matrix< NumericT, ALIGNMENT > & | mat, |
const viennacl::matrix_base< NumericT, F1 > & | d_mat, | ||
viennacl::matrix_base< NumericT, F2 > & | result | ||
) |
Carries out sparse-matrix-dense-matrix multiplication, where the sparse matrix is a coordinate_matrix.
Implementation of the convenience expression result = prod(A, B); with A being sparse (COO) and B being dense
mat | The sparse matrix (COO format) |
d_mat | The dense matrix |
result | The result vector |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans > & | mat_trans, |
const vector_base< NumericT > & | vec, | ||
vector_base< NumericT > & | result | ||
) |
Carries out matrix-vector multiplication with a transposed matrix.
Implementation of the convenience expression result = trans(mat) * vec;
mat_trans | The transposed matrix proxy |
vec | The vector |
result | The result vector |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::coordinate_matrix< NumericT, ALIGNMENT > & | mat, |
const viennacl::matrix_expression< const viennacl::matrix_base< NumericT, F1 >, const viennacl::matrix_base< NumericT, F1 >, viennacl::op_trans > & | d_mat, | ||
viennacl::matrix_base< NumericT, F2 > & | result | ||
) |
Carries out sparse-matrix-dense-matrix multiplication, where the sparse matrix is a coordinate_matrix.
Implementation of the convenience expression result = prod(A, trans(B)); with A being sparse (COO) and B being dense
mat | The sparse matrix (COO format) |
d_mat | The dense matrix |
result | The result vector |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::ell_matrix< TYPE, ALIGNMENT > & | mat, |
const viennacl::vector_base< TYPE > & | vec, | ||
viennacl::vector_base< TYPE > & | result | ||
) |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::ell_matrix< ScalarType, ALIGNMENT > & | sp_mat, |
const viennacl::matrix_base< NumericT, F1 > & | d_mat, | ||
viennacl::matrix_base< NumericT, F2 > & | result | ||
) |
Carries out Sparse Matrix(ELL)-Dense Matrix multiplication.
Implementation of the convenience expression result = prod(sp_mat, d_mat); sp_mat being in ELL format
sp_mat | The sparse matrix (ELL) |
d_mat | The dense matrix |
result | The result matrix |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::ell_matrix< ScalarType, ALIGNMENT > & | sp_mat, |
const viennacl::matrix_expression< const viennacl::matrix_base< NumericT, F1 >, const viennacl::matrix_base< NumericT, F1 >, viennacl::op_trans > & | d_mat, | ||
viennacl::matrix_base< NumericT, F2 > & | result | ||
) |
Carries out Sparse Matrix(ELL)-Dense Transposed Matrix multiplication.
Implementation of the convenience expression result = prod(sp_mat, trans(d_mat)); sp_mat being in ELL format
sp_mat | The sparse matrix (ELL) |
d_mat | The dense transposed matrix |
result | The result matrix |
void viennacl::linalg::opencl::prod_impl | ( | const matrix_base< NumericT, F1 > & | A, |
const matrix_base< NumericT, F2 > & | B, | ||
matrix_base< NumericT, F3 > & | C, | ||
ScalarType | alpha, | ||
ScalarType | beta | ||
) |
Carries out matrix-matrix multiplication.
Implementation of C = prod(A, B);
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::hyb_matrix< TYPE, ALIGNMENT > & | mat, |
const viennacl::vector_base< TYPE > & | vec, | ||
viennacl::vector_base< TYPE > & | result | ||
) |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > & | A, |
const matrix_base< NumericT, F2 > & | B, | ||
matrix_base< NumericT, F3 > & | C, | ||
ScalarType | alpha, | ||
ScalarType | beta | ||
) |
Carries out matrix-matrix multiplication.
Implementation of C = prod(trans(A), B);
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::hyb_matrix< NumericT, ALIGNMENT > & | mat, |
const viennacl::matrix_base< NumericT, F1 > & | d_mat, | ||
viennacl::matrix_base< NumericT, F2 > & | result | ||
) |
void viennacl::linalg::opencl::prod_impl | ( | const matrix_base< NumericT, F1 > & | A, |
const viennacl::matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > & | B, | ||
matrix_base< NumericT, F3 > & | C, | ||
ScalarType | alpha, | ||
ScalarType | beta | ||
) |
Carries out matrix-matrix multiplication.
Implementation of C = prod(A, trans(B));
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::hyb_matrix< NumericT, ALIGNMENT > & | mat, |
const viennacl::matrix_expression< const viennacl::matrix_base< NumericT, F1 >, const viennacl::matrix_base< NumericT, F1 >, viennacl::op_trans > & | d_mat, | ||
viennacl::matrix_base< NumericT, F2 > & | result | ||
) |
void viennacl::linalg::opencl::prod_impl | ( | const viennacl::matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > & | A, |
const viennacl::matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > & | B, | ||
matrix_base< NumericT, F3 > & | C, | ||
ScalarType | alpha, | ||
ScalarType | beta | ||
) |
Carries out matrix-matrix multiplication.
Implementation of C = prod(trans(A), trans(B));
void viennacl::linalg::opencl::scaled_rank_1_update | ( | matrix_base< NumericT, F > & | mat1, |
S1 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);
mat1 | The matrix to be updated |
alpha | The scaling factor (either a viennacl::scalar<>, float, or double) |
len_alpha | Length of the buffer for an eventual final reduction step (currently always '1') |
reciprocal_alpha | Use 1/alpha instead of alpha |
flip_sign_alpha | Use -alpha instead of alpha |
vec1 | The first vector |
vec2 | The second vector |
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value >::type viennacl::linalg::opencl::swap | ( | S1 & | s1, |
S2 & | s2 | ||
) |
Swaps the contents of two scalars, data is copied.
s1 | The first scalar |
s2 | The second scalar |
void viennacl::linalg::opencl::vector_assign | ( | vector_base< T > & | vec1, |
const T & | alpha, | ||
bool | up_to_internal_size = false |
||
) |
Assign a constant value to a vector (-range/-slice)
vec1 | The vector to which the value should be assigned |
alpha | The value to be assigned |
up_to_internal_size | Specifies whether alpha should also be written to padded memory (mostly used for clearing the whole buffer). |
void viennacl::linalg::opencl::vector_swap | ( | vector_base< T > & | vec1, |
vector_base< T > & | vec2 | ||
) |
Swaps the contents of two vectors, data is copied.
vec1 | The first vector (or -range, or -slice) |
vec2 | The second vector (or -range, or -slice) |