Namespaces | Data Structures | Typedefs | Functions

viennacl::linalg Namespace Reference

Namespaces

namespace  detail
namespace  kernels

Data Structures

struct  lower_tag
 A tag class representing a lower triangular matrix. More...
struct  upper_tag
 A tag class representing an upper triangular matrix. More...
struct  unit_lower_tag
 A tag class representing a lower triangular matrix with unit diagonal. More...
struct  unit_upper_tag
 A tag class representing an upper triangular matrix with unit diagonal. More...
class  no_precond
 A tag class representing the use of no preconditioner. More...
class  amg_precond
 AMG preconditioner class, can be supplied to solve()-routines. More...
class  amg_precond< compressed_matrix< ScalarType, MAT_ALIGNMENT > >
 AMG preconditioner class, can be supplied to solve()-routines. More...
class  bicgstab_tag
 A tag for the stabilized Bi-conjugate gradient solver. Used for supplying solver parameters and for dispatching the solve() function. More...
class  cg_tag
 A tag for the conjugate gradient Used for supplying solver parameters and for dispatching the solve() function. More...
class  gmres_tag
 A tag for the solver GMRES. Used for supplying solver parameters and for dispatching the solve() function. More...
class  ilut_tag
 A tag for incomplete LU factorization with threshold (ILUT). More...
class  ilut_precond
 ILUT preconditioner class, can be supplied to solve()-routines. More...
class  ilut_precond< compressed_matrix< ScalarType, MAT_ALIGNMENT > >
 ILUT preconditioner class, can be supplied to solve()-routines. More...
class  jacobi_tag
 A tag for a jacobi preconditioner. More...
class  jacobi_precond
 Jacobi preconditioner class, can be supplied to solve()-routines. More...
class  jacobi_precond< compressed_matrix< ScalarType, MAT_ALIGNMENT > >
 Jacobi preconditioner class, can be supplied to solve()-routines. More...
class  range
class  sub_matrix
class  row_scaling_tag
 A tag for a row preconditioner. More...
class  row_scaling
 Jacobi preconditioner class, can be supplied to solve()-routines. More...
class  row_scaling< compressed_matrix< ScalarType, MAT_ALIGNMENT > >
 Jacobi preconditioner class, can be supplied to solve()-routines. More...
class  spai_precond
 Implementation of the SParse Approximate Inverse Algorithm. More...
class  spai_precond< viennacl::compressed_matrix< ScalarType, MAT_ALIGNMENT > >
class  fspai_precond
 Implementation of the Factored SParse Approximate Inverse Algorithm. More...
class  fspai_precond< viennacl::compressed_matrix< ScalarType, MAT_ALIGNMENT > >

Typedefs

typedef detail::amg::amg_tag amg_tag
typedef
viennacl::linalg::detail::spai::spai_tag 
spai_tag
typedef
viennacl::linalg::detail::spai::fspai_tag 
fspai_tag

Functions

template<class SCALARTYPE , unsigned int ALIGNMENT>
void convolve_i (viennacl::vector< SCALARTYPE, ALIGNMENT > &input1, viennacl::vector< SCALARTYPE, ALIGNMENT > &input2, viennacl::vector< SCALARTYPE, ALIGNMENT > &output)
template<typename V1 , typename S2 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_scalar
< S2 >::value >::type 
norm_1_impl (V1 const &vec, S2 &result)
 Computes the l^1-norm of a vector.
template<typename V1 , typename S2 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_scalar
< S2 >::value >::type 
norm_2_impl (V1 const &vec, S2 &result)
 Computes the l^2-norm of a vector - implementation.
template<typename V1 , typename S2 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_scalar
< S2 >::value >::type 
norm_inf_impl (V1 const &vec, S2 &result)
 Computes the supremum-norm of a vector.
template<class SCALARTYPE , typename F , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
viennacl::vector_expression
< const viennacl::matrix
< SCALARTYPE, F, ALIGNMENT >
, const viennacl::vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, op_prod > 
prod_impl (const viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec)
 Returns a proxy class that represents matrix-vector multiplication.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
viennacl::vector_expression
< const
viennacl::compressed_matrix
< SCALARTYPE, ALIGNMENT >
, const viennacl::vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, op_prod > 
prod_impl (const compressed_matrix< SCALARTYPE, ALIGNMENT > &mat, const vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec)
 Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
viennacl::vector_expression
< const
viennacl::coordinate_matrix
< SCALARTYPE, ALIGNMENT >
, const viennacl::vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, op_prod > 
prod_impl (const coordinate_matrix< SCALARTYPE, ALIGNMENT > &mat, const vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec)
 Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.
template<typename V1 , typename V2 , typename S3 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value
&&viennacl::is_scalar< S3 >
::value >::type 
inner_prod_impl (V1 const &vec1, V2 const &vec2, S3 &result)
 Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2).
template<typename InternalType1 , typename InternalType2 >
void amg_setup (InternalType1 &A, InternalType1 &P, InternalType2 &Pointvector, amg_tag &tag)
 Setup AMG preconditioner.
template<typename MatrixType , typename InternalType1 , typename InternalType2 >
void amg_init (MatrixType const &mat, InternalType1 &A, InternalType1 &P, InternalType2 &Pointvector, amg_tag &tag)
 Initialize AMG preconditioner.
template<typename InternalType1 , typename InternalType2 >
void amg_transform_cpu (InternalType1 &A, InternalType1 &P, InternalType1 &R, InternalType2 &A_setup, InternalType2 &P_setup, amg_tag &tag)
 Save operators after setup phase for CPU computation.
template<typename InternalType1 , typename InternalType2 >
void amg_transform_gpu (InternalType1 &A, InternalType1 &P, InternalType1 &R, InternalType2 &A_setup, InternalType2 &P_setup, amg_tag &tag)
 Save operators after setup phase for GPU computation.
template<typename InternalVectorType , typename SparseMatrixType >
void amg_setup_apply (InternalVectorType &result, InternalVectorType &rhs, InternalVectorType &residual, SparseMatrixType const &A, amg_tag const &tag)
 Setup data structures for precondition phase.
template<typename ScalarType , typename SparseMatrixType >
void amg_lu (boost::numeric::ublas::compressed_matrix< ScalarType > &op, boost::numeric::ublas::permutation_matrix< ScalarType > &Permutation, SparseMatrixType const &A)
 Pre-compute LU factorization for direct solve (ublas library).
template<typename MatrixType , typename VectorType >
VectorType solve (const MatrixType &matrix, VectorType const &rhs, bicgstab_tag const &tag)
 Implementation of the stabilized Bi-conjugate gradient solver.
template<typename MatrixType , typename VectorType >
VectorType solve (const MatrixType &matrix, VectorType const &rhs, bicgstab_tag const &tag, viennacl::linalg::no_precond)
template<typename MatrixType , typename VectorType , typename PreconditionerType >
VectorType solve (const MatrixType &matrix, VectorType const &rhs, bicgstab_tag const &tag, PreconditionerType const &precond)
 Implementation of the preconditioned stabilized Bi-conjugate gradient solver.
template<typename MatrixType , typename VectorType >
VectorType solve (const MatrixType &matrix, VectorType const &rhs, cg_tag const &tag)
 Implementation of the conjugate gradient solver without preconditioner.
template<typename MatrixType , typename VectorType >
VectorType solve (const MatrixType &matrix, VectorType const &rhs, cg_tag const &tag, viennacl::linalg::no_precond)
template<typename MatrixType , typename VectorType , typename PreconditionerType >
VectorType solve (const MatrixType &matrix, VectorType const &rhs, cg_tag const &tag, PreconditionerType const &precond)
 Implementation of the preconditioned conjugate gradient solver.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
vector_expression< const
circulant_matrix< SCALARTYPE,
ALIGNMENT >, const vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, op_prod > 
prod_impl (const circulant_matrix< SCALARTYPE, ALIGNMENT > &mat, const vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec)
 Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
viennacl::vector_expression
< const
viennacl::circulant_matrix
< SCALARTYPE, ALIGNMENT >
, const viennacl::vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, viennacl::op_prod > 
prod_impl (const viennacl::circulant_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, size_t NUM_THREADS)
 Returns a proxy class that represents matrix-vector multiplication with a circulant_matrix.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
void prod_impl (const viennacl::circulant_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &result)
 Carries out matrix-vector multiplication with a circulant_matrix.
template<class TYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
void prod_impl (const viennacl::compressed_matrix< TYPE, ALIGNMENT > &mat, const viennacl::vector< TYPE, VECTOR_ALIGNMENT > &vec, viennacl::vector< TYPE, VECTOR_ALIGNMENT > &result, size_t NUM_THREADS=0)
 Carries out matrix-vector multiplication with a compressed_matrix.
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT, unsigned int VEC_ALIGNMENT>
void inplace_solve (compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &L, vector< SCALARTYPE, VEC_ALIGNMENT > &vec, viennacl::linalg::unit_lower_tag)
 Inplace solution of a lower triangular compressed_matrix with unit diagonal. Typically used for LU substitutions.
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT, unsigned int VEC_ALIGNMENT, typename TAG >
vector< SCALARTYPE, VEC_ALIGNMENT > solve (compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &L, const vector< SCALARTYPE, VEC_ALIGNMENT > &vec, const viennacl::linalg::unit_lower_tag &tag)
 Convenience functions for result = solve(trans(mat), vec, unit_lower_tag()); Creates a temporary result vector and forwards the request to inplace_solve().
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT, unsigned int VEC_ALIGNMENT>
void inplace_solve (compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &U, vector< SCALARTYPE, VEC_ALIGNMENT > &vec, viennacl::linalg::upper_tag)
 Inplace solution of a upper triangular compressed_matrix. Typically used for LU substitutions.
template<typename SCALARTYPE , unsigned int MAT_ALIGNMENT, unsigned int VEC_ALIGNMENT, typename TAG >
vector< SCALARTYPE, VEC_ALIGNMENT > solve (compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &L, const vector< SCALARTYPE, VEC_ALIGNMENT > &vec, viennacl::linalg::upper_tag const &tag)
 Convenience functions for result = solve(trans(mat), vec, unit_lower_tag()); Creates a temporary result vector and forwards the request to inplace_solve().
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
viennacl::vector_expression
< const
viennacl::coordinate_matrix
< SCALARTYPE, ALIGNMENT >
, const viennacl::vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, viennacl::op_prod > 
prod_impl (const viennacl::coordinate_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, size_t NUM_THREADS)
 Returns a proxy class that represents matrix-vector multiplication with a coordinate_matrix.
template<class TYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
void prod_impl (const viennacl::coordinate_matrix< TYPE, ALIGNMENT > &mat, const viennacl::vector< TYPE, VECTOR_ALIGNMENT > &vec, viennacl::vector< TYPE, VECTOR_ALIGNMENT > &result)
 Carries out matrix-vector multiplication with a coordinate_matrix.
template<typename SCALARTYPE , typename F1 , typename F2 , unsigned int A1, unsigned int A2, typename SOLVERTAG >
void inplace_solve (const matrix< SCALARTYPE, F1, A1 > &mat, matrix< SCALARTYPE, F2, A2 > &B, SOLVERTAG)
 Direct inplace solver for dense upper triangular systems.
template<typename SCALARTYPE , typename F1 , typename F2 , unsigned int A1, unsigned int A2, typename SOLVERTAG >
void inplace_solve (const matrix< SCALARTYPE, F1, A1 > &mat, const matrix_expression< const matrix< SCALARTYPE, F2, A2 >, const matrix< SCALARTYPE, F2, A2 >, op_trans > &B, SOLVERTAG)
 Direct inplace solver for dense upper triangular systems.
template<typename SCALARTYPE , typename F1 , typename F2 , unsigned int A1, unsigned int A2, typename SOLVERTAG >
void inplace_solve (const matrix_expression< const matrix< SCALARTYPE, F1, A1 >, const matrix< SCALARTYPE, F1, A1 >, op_trans > &proxy, matrix< SCALARTYPE, F2, A2 > &B, SOLVERTAG)
 Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems.
template<typename SCALARTYPE , typename F1 , typename F2 , unsigned int A1, unsigned int A2, typename SOLVERTAG >
void inplace_solve (const matrix_expression< const matrix< SCALARTYPE, F1, A1 >, const matrix< SCALARTYPE, F1, A1 >, op_trans > &proxy, const matrix_expression< const matrix< SCALARTYPE, F2, A2 >, const matrix< SCALARTYPE, F2, A2 >, op_trans > &B, SOLVERTAG)
 Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems.
template<typename SCALARTYPE , typename F , unsigned int ALIGNMENT, unsigned int VEC_ALIGNMENT, typename SOLVERTAG >
void inplace_solve (const matrix< SCALARTYPE, F, ALIGNMENT > &mat, vector< SCALARTYPE, VEC_ALIGNMENT > &vec, SOLVERTAG)
template<typename SCALARTYPE , typename F , unsigned int ALIGNMENT, unsigned int VEC_ALIGNMENT, typename SOLVERTAG >
void inplace_solve (const matrix_expression< const matrix< SCALARTYPE, F, ALIGNMENT >, const matrix< SCALARTYPE, F, ALIGNMENT >, op_trans > &proxy, vector< SCALARTYPE, VEC_ALIGNMENT > &vec, SOLVERTAG)
 Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems.
template<typename SCALARTYPE , typename F1 , typename F2 , unsigned int ALIGNMENT_A, unsigned int ALIGNMENT_B, typename TAG >
matrix< SCALARTYPE, F2,
ALIGNMENT_B > 
solve (const matrix< SCALARTYPE, F1, ALIGNMENT_A > &A, const matrix< SCALARTYPE, F2, ALIGNMENT_B > &B, TAG const &tag)
 Convenience functions for C = solve(A, B, some_tag()); Creates a temporary result matrix and forwards the request to inplace_solve().
template<typename SCALARTYPE , typename F1 , typename F2 , unsigned int ALIGNMENT_A, unsigned int ALIGNMENT_B, typename TAG >
matrix< SCALARTYPE, F2,
ALIGNMENT_B > 
solve (const matrix< SCALARTYPE, F1, ALIGNMENT_A > &A, const matrix_expression< const matrix< SCALARTYPE, F2, ALIGNMENT_B >, const matrix< SCALARTYPE, F2, ALIGNMENT_B >, op_trans > &proxy, TAG const &tag)
 Convenience functions for C = solve(A, B^T, some_tag()); Creates a temporary result matrix and forwards the request to inplace_solve().
template<typename SCALARTYPE , typename F , unsigned int ALIGNMENT, unsigned int VEC_ALIGNMENT, typename TAG >
vector< SCALARTYPE, VEC_ALIGNMENT > solve (const matrix< SCALARTYPE, F, ALIGNMENT > &mat, const vector< SCALARTYPE, VEC_ALIGNMENT > &vec, TAG const &tag)
 Convenience functions for result = solve(mat, vec, some_tag()); Creates a temporary result vector and forwards the request to inplace_solve().
template<typename SCALARTYPE , typename F1 , typename F2 , unsigned int ALIGNMENT_A, unsigned int ALIGNMENT_B, typename TAG >
matrix< SCALARTYPE, F2,
ALIGNMENT_B > 
solve (const matrix_expression< const matrix< SCALARTYPE, F1, ALIGNMENT_A >, const matrix< SCALARTYPE, F1, ALIGNMENT_A >, op_trans > &proxy, const matrix< SCALARTYPE, F2, ALIGNMENT_B > &B, TAG const &tag)
 Convenience functions for result = solve(trans(mat), B, some_tag()); Creates a temporary result matrix and forwards the request to inplace_solve().
template<typename SCALARTYPE , typename F1 , typename F2 , unsigned int ALIGNMENT_A, unsigned int ALIGNMENT_B, typename TAG >
matrix< SCALARTYPE, F2,
ALIGNMENT_B > 
solve (const matrix_expression< const matrix< SCALARTYPE, F1, ALIGNMENT_A >, const matrix< SCALARTYPE, F1, ALIGNMENT_A >, op_trans > &proxy_A, const matrix_expression< const matrix< SCALARTYPE, F2, ALIGNMENT_B >, const matrix< SCALARTYPE, F2, ALIGNMENT_B >, op_trans > &proxy_B, TAG const &tag)
 Convenience functions for result = solve(trans(mat), vec, some_tag()); Creates a temporary result vector and forwards the request to inplace_solve().
template<typename SCALARTYPE , typename F , unsigned int ALIGNMENT, unsigned int VEC_ALIGNMENT, typename TAG >
vector< SCALARTYPE, VEC_ALIGNMENT > solve (const matrix_expression< const matrix< SCALARTYPE, F, ALIGNMENT >, const matrix< SCALARTYPE, F, ALIGNMENT >, op_trans > &proxy, const vector< SCALARTYPE, VEC_ALIGNMENT > &vec, TAG const &tag)
 Convenience functions for result = solve(trans(mat), vec, some_tag()); Creates a temporary result vector and forwards the request to inplace_solve().
template<typename SCALARTYPE , typename F , unsigned int ALIGNMENT>
void lu_factorize (matrix< SCALARTYPE, F, ALIGNMENT > &mat)
 LU factorization of a dense matrix.
template<typename SCALARTYPE , typename F1 , typename F2 , unsigned int ALIGNMENT_A, unsigned int ALIGNMENT_B>
void lu_substitute (matrix< SCALARTYPE, F1, ALIGNMENT_A > const &A, matrix< SCALARTYPE, F2, ALIGNMENT_B > &B)
 LU substitution for the system LU = rhs.
template<typename SCALARTYPE , typename F , unsigned int ALIGNMENT, unsigned int VEC_ALIGNMENT>
void lu_substitute (matrix< SCALARTYPE, F, ALIGNMENT > const &mat, vector< SCALARTYPE, VEC_ALIGNMENT > &vec)
 LU substitution for the system LU = rhs.
template<typename MatrixType , typename VectorType , typename PreconditionerType >
VectorType solve (const MatrixType &matrix, VectorType const &rhs, gmres_tag const &tag, PreconditionerType const &precond)
 Implementation of the GMRES solver.
template<typename MatrixType , typename VectorType >
VectorType solve (const MatrixType &matrix, VectorType const &rhs, gmres_tag const &tag)
 Convenience overload of the solve() function using GMRES. Per default, no preconditioner is used.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
vector_expression< const
hankel_matrix< SCALARTYPE,
ALIGNMENT >, const vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, op_prod > 
prod_impl (const hankel_matrix< SCALARTYPE, ALIGNMENT > &mat, const vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec)
 Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
viennacl::vector_expression
< const
viennacl::hankel_matrix
< SCALARTYPE, ALIGNMENT >
, const viennacl::vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, viennacl::op_prod > 
prod_impl (const viennacl::hankel_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, size_t NUM_THREADS)
 Returns a proxy class that represents matrix-vector multiplication with a hankel_matrix.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
void prod_impl (const viennacl::hankel_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &result)
 Carries out matrix-vector multiplication with a hankel_matrix.
template<typename T >
void ilut_inc_row_iterator_to_row_index (T &row_iter, unsigned int k)
 Increments a row iterator (iteration along increasing row indices) up to a certain row index k.
template<typename ScalarType >
void ilut_inc_row_iterator_to_row_index (viennacl::tools::sparse_matrix_adapter< ScalarType > &row_iter, unsigned int k)
 Increments a row iterator (iteration along increasing row indices) up to a certain row index k.
template<typename ScalarType >
void ilut_inc_row_iterator_to_row_index (viennacl::tools::const_sparse_matrix_adapter< ScalarType > &row_iter, unsigned int k)
 Increments a row iterator (iteration along increasing row indices) up to a certain row index k.
template<typename MatrixType , typename LUType >
void precondition (MatrixType const &input, LUType &output, ilut_tag const &tag)
 Implementation of a ILU-preconditioner with threshold.
template<typename MatrixType , typename VectorType >
void ilu_inplace_solve (MatrixType const &mat, VectorType &vec, viennacl::linalg::unit_lower_tag)
 Generic inplace solution of a unit lower triangular system.
template<typename MatrixType , typename VectorType >
void ilu_inplace_solve (MatrixType const &mat, VectorType &vec, viennacl::linalg::upper_tag)
 Generic inplace solution of a upper triangular system.
template<typename MatrixType , typename VectorType >
void ilu_lu_substitute (MatrixType const &mat, VectorType &vec)
 Generic LU substitution.
template<typename VectorT1 , typename VectorT2 >
VectorT1::value_type inner_prod (VectorT1 const &v1, VectorT2 const &v2, typename viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< VectorT1 >::type >::value >::type *dummy=0)
template<typename ScalarType , unsigned int alignment1, unsigned int alignment2>
viennacl::scalar_expression
< const viennacl::vector
< ScalarType, alignment1 >
, const viennacl::vector
< ScalarType, alignment2 >
, viennacl::op_inner_prod > 
inner_prod (viennacl::vector< ScalarType, alignment1 > const &vector1, viennacl::vector< ScalarType, alignment2 > const &vector2, typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< viennacl::vector< ScalarType, alignment1 > >::type >::value >::type *dummy=0)
template<class TYPE , typename F , unsigned int ALIGNMENT>
void add (const viennacl::matrix< TYPE, F, ALIGNMENT > &mat1, const viennacl::matrix< TYPE, F, ALIGNMENT > &mat2, viennacl::matrix< TYPE, F, ALIGNMENT > &result)
 Adds two dense matrices and writes the result to a third matrix.
template<typename M1 , typename M2 >
viennacl::enable_if
< viennacl::is_matrix< M1 >
::value &&viennacl::is_matrix
< M2 >::value >::type 
inplace_add (M1 &result, M2 const &mat2)
 Adds a dense matrix to another.
template<class TYPE , typename F , unsigned int ALIGNMENT>
void sub (const viennacl::matrix< TYPE, F, ALIGNMENT > &mat1, const viennacl::matrix< TYPE, F, ALIGNMENT > &mat2, viennacl::matrix< TYPE, F, ALIGNMENT > &result)
 Adds a dense matrix to another.
template<class TYPE , typename F , unsigned int ALIGNMENT>
void inplace_sub (viennacl::matrix< TYPE, F, ALIGNMENT > &result, const viennacl::matrix< TYPE, F, ALIGNMENT > &mat2)
 Subtracts a dense matrix from another.
template<class SCALARTYPE , typename F , unsigned int ALIGNMENT>
void inplace_mult (viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &result, SCALARTYPE val)
 Multiplies a dense matrix by a scalar.
template<class SCALARTYPE , typename F , unsigned int ALIGNMENT>
void inplace_mult (viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &result, viennacl::scalar< SCALARTYPE > const &val)
 Multiplies a dense matrix by a scalar.
template<class SCALARTYPE , typename F , unsigned int ALIGNMENT>
void inplace_divide (viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &result, viennacl::scalar< SCALARTYPE > const &val)
 Multiplies a dense matrix by a scalar.
template<class TYPE , typename F , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
void prod_impl (const viennacl::matrix< TYPE, F, ALIGNMENT > &mat, const viennacl::vector< TYPE, VECTOR_ALIGNMENT > &vec, viennacl::vector< TYPE, VECTOR_ALIGNMENT > &result)
 Carries out matrix-vector multiplication.
template<class SCALARTYPE , typename F , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
viennacl::vector_expression
< const
viennacl::matrix_expression
< const matrix< SCALARTYPE, F,
ALIGNMENT >, const matrix
< SCALARTYPE, F, ALIGNMENT >
, op_trans >, const
viennacl::vector< SCALARTYPE,
VECTOR_ALIGNMENT >, op_prod > 
prod_impl (const viennacl::matrix_expression< const matrix< SCALARTYPE, F, ALIGNMENT >, const matrix< SCALARTYPE, F, ALIGNMENT >, op_trans > &proxy, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec)
 Returns a proxy class that represents matrix-vector multiplication with a transposed matrix.
template<class SCALARTYPE , typename F , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
void prod_impl (const viennacl::matrix_expression< const matrix< SCALARTYPE, F, ALIGNMENT >, const matrix< SCALARTYPE, F, ALIGNMENT >, op_trans > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &result)
 Unwraps the transposed matrix proxy and forwards to trans_prod_impl().
template<class SCALARTYPE , typename F , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
void trans_prod_impl (const matrix< SCALARTYPE, F, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &result)
 Carries out matrix-vector multiplication with a transposed matrix.
template<class TYPE , typename F1 , typename F2 , typename F3 , unsigned int ALIGNMENT>
void prod_impl (const viennacl::matrix< TYPE, F1, ALIGNMENT > &A, const viennacl::matrix< TYPE, F2, ALIGNMENT > &B, viennacl::matrix< TYPE, F3, ALIGNMENT > &C, int block_size=15)
 Carries out matrix-matrix multiplication.
template<typename T1 , typename T2 , typename T3 >
void prod_impl (const viennacl::matrix_range< T1 > &A, const viennacl::matrix_range< T2 > &B, viennacl::matrix_range< T3 > &C, int block_size=15)
 Carries out matrix-matrix multiplication for submatrices.
template<class TYPE , typename F1 , typename F2 , typename F3 , unsigned int ALIGNMENT>
void prod_impl (const viennacl::matrix_expression< const matrix< TYPE, F1, ALIGNMENT >, const matrix< TYPE, F1, ALIGNMENT >, op_trans > &A, const viennacl::matrix< TYPE, F2, ALIGNMENT > &B, viennacl::matrix< TYPE, F3, ALIGNMENT > &C)
 Carries out matrix-matrix multiplication.
template<typename M1 , typename M2 , typename M3 >
void prod_impl (const viennacl::matrix_expression< const matrix_range< M1 >, const matrix_range< M1 >, op_trans > &A_trans, const viennacl::matrix_range< M2 > &B, viennacl::matrix_range< M3 > &C)
 Carries out matrix-matrix multiplication for submatrices.
template<class TYPE , typename F1 , typename F2 , typename F3 , unsigned int ALIGNMENT>
void prod_impl (const viennacl::matrix< TYPE, F1, ALIGNMENT > &A, const viennacl::matrix_expression< const matrix< TYPE, F2, ALIGNMENT >, const matrix< TYPE, F2, ALIGNMENT >, op_trans > &B, viennacl::matrix< TYPE, F3, ALIGNMENT > &C)
 Carries out matrix-matrix multiplication.
template<typename M1 , typename M2 , typename M3 >
void prod_impl (const viennacl::matrix_range< M1 > &A, const viennacl::matrix_expression< const matrix_range< M2 >, const matrix_range< M2 >, op_trans > &B_trans, viennacl::matrix_range< M3 > &C)
 Carries out matrix-matrix multiplication for submatrices.
template<class TYPE , typename F1 , typename F2 , typename F3 , unsigned int ALIGNMENT>
void prod_impl (const viennacl::matrix_expression< const matrix< TYPE, F1, ALIGNMENT >, const matrix< TYPE, F1, ALIGNMENT >, op_trans > &A, const viennacl::matrix_expression< const matrix< TYPE, F2, ALIGNMENT >, const matrix< TYPE, F2, ALIGNMENT >, op_trans > &B, viennacl::matrix< TYPE, F3, ALIGNMENT > &C)
 Carries out matrix-matrix multiplication.
template<typename M1 , typename M2 , typename M3 >
void prod_impl (const viennacl::matrix_expression< const matrix_range< M1 >, const matrix_range< M1 >, op_trans > &A_trans, const viennacl::matrix_expression< const matrix_range< M2 >, const matrix_range< M2 >, op_trans > &B_trans, viennacl::matrix_range< M3 > &C)
 Carries out matrix-matrix multiplication for submatrices.
template<class SCALARTYPE , unsigned int VA1, unsigned int VA2>
viennacl::matrix_expression
< const viennacl::vector
< SCALARTYPE, VA1 >, const
viennacl::vector< SCALARTYPE,
VA2 >, op_prod > 
outer_prod (const viennacl::vector< SCALARTYPE, VA1 > &vec1, const viennacl::vector< SCALARTYPE, VA2 > &vec2)
 Returns a proxy class for the operation mat += vec1 * vec2^T, i.e. a rank 1 update.
template<class SCALARTYPE , typename F , unsigned int ALIGNMENT>
void rank_1_update (viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &mat1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2)
 The implementation of the operation mat += vec1 * vec2^T, i.e. a rank 1 update.
template<class SCALARTYPE , typename F , unsigned int ALIGNMENT>
void scaled_rank_1_update (viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &mat1, SCALARTYPE val, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2)
 The implementation of the operation mat += alpha * vec1 * vec2^T, i.e. a scaled rank 1 update.
template<typename VectorT >
VectorT::value_type norm_1 (VectorT const &v1, typename viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< VectorT >::type >::value >::type *dummy=0)
template<typename ScalarType , unsigned int alignment>
viennacl::scalar_expression
< const viennacl::vector
< ScalarType, alignment >
, const viennacl::vector
< ScalarType, alignment >
, viennacl::op_norm_1 > 
norm_1 (viennacl::vector< ScalarType, alignment > const &vector, typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< viennacl::vector< ScalarType, alignment > >::type >::value >::type *dummy=0)
template<typename VectorT >
VectorT::value_type norm_2 (VectorT const &v1, typename viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< VectorT >::type >::value >::type *dummy=0)
template<typename ScalarType , unsigned int alignment>
viennacl::scalar_expression
< const viennacl::vector
< ScalarType, alignment >
, const viennacl::vector
< ScalarType, alignment >
, viennacl::op_norm_2 > 
norm_2 (viennacl::vector< ScalarType, alignment > const &v, typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< viennacl::vector< ScalarType, alignment > >::type >::value >::type *dummy=0)
template<typename VectorT >
VectorT::value_type norm_inf (VectorT const &v1, typename viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< VectorT >::type >::value >::type *dummy=0)
template<typename ScalarType , unsigned int alignment>
viennacl::scalar_expression
< const viennacl::vector
< ScalarType, alignment >
, const viennacl::vector
< ScalarType, alignment >
, viennacl::op_norm_inf > 
norm_inf (viennacl::vector< ScalarType, alignment > const &v1, typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< viennacl::vector< ScalarType, alignment > >::type >::value >::type *dummy=0)
template<typename T , typename A1 , typename A2 , typename VectorT >
VectorT prod_impl (std::vector< std::vector< T, A1 >, A2 > const &matrix, VectorT const &vector)
template<typename KEY , typename DATA , typename COMPARE , typename AMAP , typename AVEC , typename VectorT >
VectorT prod_impl (std::vector< std::map< KEY, DATA, COMPARE, AMAP >, AVEC > const &matrix, VectorT const &vector)
template<typename MatrixT , typename VectorT >
VectorT prod (MatrixT const &matrix, VectorT const &vector, typename viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< MatrixT >::type >::value >::type *dummy=0)
template<typename MatrixT1 , typename MatrixT2 >
viennacl::matrix_expression
< const MatrixT1, const
viennacl::matrix_range
< MatrixT2 >
, viennacl::op_prod > 
prod (MatrixT1 const &A, viennacl::matrix_range< MatrixT2 > const &B, typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< MatrixT1 >::type >::value >::type *dummy=0)
template<typename MatrixT1 , typename MatrixT2 >
viennacl::matrix_expression
< const MatrixT1, const
viennacl::matrix_expression
< const viennacl::matrix_range
< MatrixT2 >, const
viennacl::matrix_range
< MatrixT2 >, op_trans >
, viennacl::op_prod > 
prod (MatrixT1 const &A, viennacl::matrix_expression< const viennacl::matrix_range< MatrixT2 >, const viennacl::matrix_range< MatrixT2 >, op_trans > const &B, typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< MatrixT2 >::type >::value >::type *dummy=0)
template<typename MatrixT , typename NumericT , unsigned int ALIGNMENT>
viennacl::vector_expression
< const MatrixT, const
viennacl::vector< NumericT,
ALIGNMENT >, viennacl::op_prod > 
prod (MatrixT const &matrix, viennacl::vector< NumericT, ALIGNMENT > const &vector, typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< MatrixT >::type >::value >::type *dummy=0)
template<typename MatrixT , typename NumericT , typename F , unsigned int ALIGNMENT>
viennacl::matrix_expression
< const MatrixT, const
viennacl::matrix< NumericT, F,
ALIGNMENT >, viennacl::op_prod > 
prod (MatrixT const &matrix_A, viennacl::matrix< NumericT, F, ALIGNMENT > const &matrix_B, typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< MatrixT >::type >::value >::type *dummy=0)
template<typename MatrixT , typename NumericT , typename F , unsigned int ALIGNMENT>
viennacl::matrix_expression
< const MatrixT, const
viennacl::matrix_expression
< const viennacl::matrix
< NumericT, F, ALIGNMENT >
, const viennacl::matrix
< NumericT, F, ALIGNMENT >
, viennacl::op_trans >
, viennacl::op_prod > 
prod (MatrixT const &matrix_A, const viennacl::matrix_expression< const viennacl::matrix< NumericT, F, ALIGNMENT >, const viennacl::matrix< NumericT, F, ALIGNMENT >, viennacl::op_trans > &matrix_B, typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< MatrixT >::type >::value >::type *dummy=0)
template<typename MatrixType , typename VectorType >
MatrixType::value_type setup_householder_vector (MatrixType const &A, VectorType &v, size_t j)
template<typename MatrixType , typename VectorType , typename ScalarType >
void householder_reflect (MatrixType &A, VectorType &v, ScalarType beta, size_t j, size_t k)
template<typename MatrixType , typename VectorType , typename ScalarType >
void householder_reflect (MatrixType &A, VectorType &v, ScalarType beta, size_t j)
template<typename MatrixType , typename VectorType >
void write_householder_to_A (MatrixType &A, VectorType const &v, size_t j)
template<typename MatrixType , typename VectorType >
void recoverQ (MatrixType const &A, VectorType const &betas, MatrixType &Q, MatrixType &R)
template<typename MatrixType >
std::vector< typename
MatrixType::value_type > 
qr (MatrixType &A)
template<typename MatrixTypeA , typename MatrixTypeB , typename MatrixTypeC >
void prod_AA (MatrixTypeA const &A, MatrixTypeB const &B, MatrixTypeC &C)
template<typename MatrixTypeA , typename MatrixTypeB , typename MatrixTypeC >
void prod_TA (MatrixTypeA const &A, MatrixTypeB const &B, MatrixTypeC &C)
template<typename MatrixType >
std::vector< typename
MatrixType::value_type > 
inplace_qr (MatrixType &A)
template<typename MatrixType >
std::vector< typename
MatrixType::value_type > 
inplace_qr_ublas (MatrixType &A)
template<typename MatrixType >
std::vector< typename
MatrixType::value_type > 
inplace_qr_pure (MatrixType &A)
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
vector_expression< const
toeplitz_matrix< SCALARTYPE,
ALIGNMENT >, const vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, op_prod > 
prod_impl (const toeplitz_matrix< SCALARTYPE, ALIGNMENT > &mat, const vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec)
 Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
viennacl::vector_expression
< const
viennacl::toeplitz_matrix
< SCALARTYPE, ALIGNMENT >
, const viennacl::vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, viennacl::op_prod > 
prod_impl (const viennacl::toeplitz_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, size_t NUM_THREADS)
 Returns a proxy class that represents matrix-vector multiplication with a toeplitz_matrix.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
void prod_impl (const viennacl::toeplitz_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &result)
 Carries out matrix-vector multiplication with a toeplitz_matrix.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
vector_expression< const
vandermonde_matrix< SCALARTYPE,
ALIGNMENT >, const vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, op_prod > 
prod_impl (const vandermonde_matrix< SCALARTYPE, ALIGNMENT > &mat, const vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec)
 Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
viennacl::vector_expression
< const
viennacl::vandermonde_matrix
< SCALARTYPE, ALIGNMENT >
, const viennacl::vector
< SCALARTYPE, VECTOR_ALIGNMENT >
, viennacl::op_prod > 
prod_impl (const viennacl::vandermonde_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, size_t NUM_THREADS)
 Returns a proxy class that represents matrix-vector multiplication with a vandermonde_matrix.
template<class SCALARTYPE , unsigned int ALIGNMENT, unsigned int VECTOR_ALIGNMENT>
void prod_impl (const viennacl::vandermonde_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &vec, viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &result)
 Carries out matrix-vector multiplication with a vandermonde_matrix.
template<typename V1 , typename V2 , typename V3 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value
&&viennacl::is_vector< V3 >
::value >::type 
add (const V1 &vec1, const V2 &vec2, V3 &result)
 Addition of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename V2 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value >::type 
inplace_add (V1 &vec1, const V2 &vec2)
 Inplace addition of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename V2 , typename V3 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value
&&viennacl::is_vector< V3 >
::value >::type 
sub (const V1 &vec1, const V2 &vec2, V3 &result)
 Subtraction of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename V2 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value >::type 
inplace_sub (V1 &vec1, const V2 &vec2)
 Inplace addition of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename S2 , typename V3 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_scalar
< S2 >::value
&&viennacl::is_vector< V3 >
::value >::type 
mult (const V1 &vec, S2 const &alpha, V3 &result)
 Scales a vector. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename SCALARTYPE , typename V3 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value
&&viennacl::is_cpu_scalar
< SCALARTYPE >::value
&&viennacl::is_vector< V3 >
::value >::type 
mult (V1 const &vec, SCALARTYPE alpha, V3 &result)
 Scales a vector. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename S2 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_scalar
< S2 >::value >::type 
inplace_mult (V1 &vec, S2 const &alpha)
 Scales a vector inplace. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename S2 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value
&&viennacl::is_cpu_scalar< S2 >
::value >::type 
inplace_mult (V1 &vec, S2 alpha)
 Scales a vector inplace. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename S2 , typename V3 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_scalar
< S2 >::value
&&viennacl::is_vector< V3 >
::value >::type 
divide (V1 const &vec, S2 const &alpha, V3 &result)
 Scales a vector. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename S2 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_scalar
< S2 >::value >::type 
inplace_divide (V1 &vec, S2 const &alpha)
 Scales a vector inplace. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename S2 , typename V3 , typename V4 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_scalar
< S2 >::value
&&viennacl::is_vector< V3 >
::value &&viennacl::is_vector
< V4 >::value >::type 
mul_add (V1 const &vec1, S2 const &alpha, V3 const &vec2, V4 &result)
 Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename SCALARTYPE , typename V3 , typename V4 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value
&&viennacl::is_cpu_scalar
< SCALARTYPE >::value
&&viennacl::is_vector< V3 >
::value &&viennacl::is_vector
< V4 >::value >::type 
mul_add (V1 const &vec1, SCALARTYPE alpha, V3 const &vec2, V4 &result)
 Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename V2 , typename S3 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value
&&viennacl::is_scalar< S3 >
::value >::type 
inplace_mul_add (V1 &vec1, V2 const &vec2, S3 const &alpha)
 Inplace Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename V2 , typename SCALARTYPE >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value
&&viennacl::is_cpu_scalar
< SCALARTYPE >::value >::type 
inplace_mul_add (V1 &vec1, V2 const &vec2, SCALARTYPE alpha)
 Inplace Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename S2 , typename V3 , typename V4 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_scalar
< S2 >::value
&&viennacl::is_vector< V3 >
::value &&viennacl::is_vector
< V4 >::value >::type 
mul_sub (V1 const &vec1, S2 const &alpha, V3 const &vec2, V4 &result)
 Multiply-subtract operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename V2 , typename S3 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value
&&viennacl::is_scalar< S3 >
::value >::type 
inplace_mul_sub (V1 &vec1, V2 const &vec2, S3 const &alpha)
 Inplace Multiply-subtract operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename V2 , typename S3 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value
&&viennacl::is_scalar< S3 >
::value >::type 
inplace_div_add (V1 &vec1, V2 const &vec2, S3 const &alpha)
 Inplace divide-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename V2 , typename S3 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value
&&viennacl::is_scalar< S3 >
::value >::type 
inplace_div_sub (V1 &vec1, V2 const &vec2, S3 const &alpha)
 Inplace divide-subtract operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<typename V1 , typename V2 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value,
viennacl::scalar_expression
< const V1, const V2,
viennacl::op_inner_prod >
>::type 
inner_prod_impl (V1 const &vec1, V2 const &vec2)
 Computes the inner product of two vectors.
template<typename V1 >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value, cl_uint >::type 
index_norm_inf (V1 const &vec)
 Computes the index of the first entry that is equal to the supremum-norm in modulus.
template<typename V1 , typename V2 , typename SCALARTYPE >
viennacl::enable_if
< viennacl::is_vector< V1 >
::value &&viennacl::is_vector
< V2 >::value
&&viennacl::is_cpu_scalar
< SCALARTYPE >::value >::type 
plane_rotation (V1 &vec1, V2 &vec2, SCALARTYPE alpha, SCALARTYPE beta)
 Computes a plane rotation of two vectors.

Typedef Documentation


Function Documentation

void viennacl::linalg::add ( const viennacl::matrix< TYPE, F, ALIGNMENT > &  mat1,
const viennacl::matrix< TYPE, F, ALIGNMENT > &  mat2,
viennacl::matrix< TYPE, F, ALIGNMENT > &  result 
)

Adds two dense matrices and writes the result to a third matrix.

This is the implementation of the convenience expression result = mat1 + mat2;

Parameters:
mat1 The left hand side operand
mat2 The right hand side operand
result The resulting matrix
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value && viennacl::is_vector<V3>::value >::type viennacl::linalg::add ( const V1 &  vec1,
const V2 &  vec2,
V3 &  result 
)

Addition of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Parameters:
vec1 The first addend.
vec2 The second addend.
result The result vector.
void viennacl::linalg::amg_init ( MatrixType const &  mat,
InternalType1 &  A,
InternalType1 &  P,
InternalType2 &  Pointvector,
amg_tag &  tag 
)

Initialize AMG preconditioner.

Parameters:
mat System matrix
A Operator matrices on all levels
P Prolongation/Interpolation operators on all levels
Pointvector Vector of points on all levels
tag AMG preconditioner tag
void viennacl::linalg::amg_lu ( boost::numeric::ublas::compressed_matrix< ScalarType > &  op,
boost::numeric::ublas::permutation_matrix< ScalarType > &  Permutation,
SparseMatrixType const &  A 
)

Pre-compute LU factorization for direct solve (ublas library).

Speeds up precondition phase as this is computed only once overall instead of once per iteration.

Parameters:
op Operator matrix for direct solve
Permutation Permutation matrix which saves the factorization result
A Operator matrix on coarsest level
void viennacl::linalg::amg_setup ( InternalType1 &  A,
InternalType1 &  P,
InternalType2 &  Pointvector,
amg_tag &  tag 
)

Setup AMG preconditioner.

Parameters:
A Operator matrices on all levels
P Prolongation/Interpolation operators on all levels
Pointvector Vector of points on all levels
tag AMG preconditioner tag
void viennacl::linalg::amg_setup_apply ( InternalVectorType &  result,
InternalVectorType &  rhs,
InternalVectorType &  residual,
SparseMatrixType const &  A,
amg_tag const &  tag 
)

Setup data structures for precondition phase.

Parameters:
result Result vector on all levels
rhs RHS vector on all levels
residual Residual vector on all levels
A Operators matrices on all levels from setup phase
tag AMG preconditioner tag
void viennacl::linalg::amg_transform_cpu ( InternalType1 &  A,
InternalType1 &  P,
InternalType1 &  R,
InternalType2 &  A_setup,
InternalType2 &  P_setup,
amg_tag &  tag 
)

Save operators after setup phase for CPU computation.

Parameters:
A Operator matrices on all levels on the CPU
P Prolongation/Interpolation operators on all levels on the CPU
R Restriction operators on all levels on the CPU
A_setup Operators matrices on all levels from setup phase
P_setup Prolongation/Interpolation operators on all levels from setup phase
tag AMG preconditioner tag
void viennacl::linalg::amg_transform_gpu ( InternalType1 &  A,
InternalType1 &  P,
InternalType1 &  R,
InternalType2 &  A_setup,
InternalType2 &  P_setup,
amg_tag &  tag 
)

Save operators after setup phase for GPU computation.

Parameters:
A Operator matrices on all levels on the GPU
P Prolongation/Interpolation operators on all levels on the GPU
R Restriction operators on all levels on the GPU
A_setup Operators matrices on all levels from setup phase
P_setup Prolongation/Interpolation operators on all levels from setup phase
tag AMG preconditioner tag
void viennacl::linalg::convolve_i ( viennacl::vector< SCALARTYPE, ALIGNMENT > &  input1,
viennacl::vector< SCALARTYPE, ALIGNMENT > &  input2,
viennacl::vector< SCALARTYPE, ALIGNMENT > &  output 
)
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_scalar<S2>::value && viennacl::is_vector<V3>::value >::type viennacl::linalg::divide ( V1 const &  vec,
S2 const &  alpha,
V3 &  result 
)

Scales a vector. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes result = vec / alpha, where alpha is a gpu scalar

Parameters:
vec The vector to be scaled.
alpha The (inverse) scaling factor.
result The result vector.
void viennacl::linalg::householder_reflect ( MatrixType &  A,
VectorType &  v,
ScalarType  beta,
size_t  j,
size_t  k 
)
void viennacl::linalg::householder_reflect ( MatrixType &  A,
VectorType &  v,
ScalarType  beta,
size_t  j 
)
void viennacl::linalg::ilu_inplace_solve ( MatrixType const &  mat,
VectorType &  vec,
viennacl::linalg::unit_lower_tag   
)

Generic inplace solution of a unit lower triangular system.

Parameters:
mat The system matrix
vec The right hand side vector
void viennacl::linalg::ilu_inplace_solve ( MatrixType const &  mat,
VectorType &  vec,
viennacl::linalg::upper_tag   
)

Generic inplace solution of a upper triangular system.

Parameters:
mat The system matrix
vec The right hand side vector
void viennacl::linalg::ilu_lu_substitute ( MatrixType const &  mat,
VectorType &  vec 
)

Generic LU substitution.

Parameters:
mat The system matrix
vec The right hand side vector
void viennacl::linalg::ilut_inc_row_iterator_to_row_index ( T &  row_iter,
unsigned int  k 
)

Increments a row iterator (iteration along increasing row indices) up to a certain row index k.

Generic implementation using the iterator concept from boost::numeric::ublas. Could not find a better way for sparse matrices...

Parameters:
row_iter The row iterator
k The final row index
void viennacl::linalg::ilut_inc_row_iterator_to_row_index ( viennacl::tools::const_sparse_matrix_adapter< ScalarType > &  row_iter,
unsigned int  k 
)

Increments a row iterator (iteration along increasing row indices) up to a certain row index k.

Specialization for the const sparse matrix adapter shipped with ViennaCL

Parameters:
row_iter The row iterator
k The final row index
void viennacl::linalg::ilut_inc_row_iterator_to_row_index ( viennacl::tools::sparse_matrix_adapter< ScalarType > &  row_iter,
unsigned int  k 
)

Increments a row iterator (iteration along increasing row indices) up to a certain row index k.

Specialization for the sparse matrix adapter shipped with ViennaCL

Parameters:
row_iter The row iterator
k The final row index
viennacl::enable_if< viennacl::is_vector<V1>::value, cl_uint >::type viennacl::linalg::index_norm_inf ( V1 const &  vec  ) 

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

Parameters:
vec The vector
Returns:
The result. Note that the result must be a CPU scalar (unsigned int), since gpu scalars are floating point types.
VectorT1::value_type viennacl::linalg::inner_prod ( VectorT1 const &  v1,
VectorT2 const &  v2,
typename viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< VectorT1 >::type >::value >::type *  dummy = 0 
)
viennacl::scalar_expression< const viennacl::vector<ScalarType, alignment1>, const viennacl::vector<ScalarType, alignment2>, viennacl::op_inner_prod > viennacl::linalg::inner_prod ( viennacl::vector< ScalarType, alignment1 > const &  vector1,
viennacl::vector< ScalarType, alignment2 > const &  vector2,
typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< viennacl::vector< ScalarType, alignment1 > >::type >::value >::type *  dummy = 0 
)
viennacl::enable_if< viennacl::is_vector< V1 >::value &&viennacl::is_vector< V2 >::value &&viennacl::is_scalar< S3 >::value >::type inner_prod_impl ( V1 const &  vec1,
V2 const &  vec2,
S3 &  result 
)

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

Parameters:
vec1 The first vector
vec2 The second vector
result The result scalar (on the gpu)
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value, viennacl::scalar_expression< const V1, const V2, viennacl::op_inner_prod > >::type viennacl::linalg::inner_prod_impl ( V1 const &  vec1,
V2 const &  vec2 
)

Computes the inner product of two vectors.

Parameters:
vec1 The first vector
vec2 The second vector
Returns:
The result
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value >::type viennacl::linalg::inplace_add ( V1 &  vec1,
const V2 &  vec2 
)

Inplace addition of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes vec1 += vec2.

Parameters:
vec1 The result.
vec2 The addend
viennacl::enable_if< viennacl::is_matrix<M1>::value && viennacl::is_matrix<M2>::value >::type viennacl::linalg::inplace_add ( M1 &  result,
M2 const &  mat2 
)

Adds a dense matrix to another.

This is the implementation of the convenience expression result += mat1;

Parameters:
mat2 The addend (either a matrix or a matrix_range)
result The resulting matrix (either a matrix or a matrix_range)
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value && viennacl::is_scalar<S3>::value >::type viennacl::linalg::inplace_div_add ( V1 &  vec1,
V2 const &  vec2,
S3 const &  alpha 
)

Inplace divide-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes vec1 += vec2 / alpha, where alpha is a gpu scalar

Parameters:
vec1 The first vector
vec2 The vector update
alpha The scaling factor for the second vector.
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value && viennacl::is_scalar<S3>::value >::type viennacl::linalg::inplace_div_sub ( V1 &  vec1,
V2 const &  vec2,
S3 const &  alpha 
)

Inplace divide-subtract operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes vec1 -= vec2 / alpha, where alpha is a gpu scalar

Parameters:
vec1 The first vector
vec2 The vector update
alpha The scaling factor for the second vector.
void viennacl::linalg::inplace_divide ( viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &  result,
viennacl::scalar< SCALARTYPE > const &  val 
)

Multiplies a dense matrix by a scalar.

This is the implementation of the convenience expression matrix /= val;

Parameters:
result The matrix to be manipulated
val The scalar by which all entries of the matrix are divided
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_scalar<S2>::value >::type viennacl::linalg::inplace_divide ( V1 &  vec,
S2 const &  alpha 
)

Scales a vector inplace. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes result *= alpha, where alpha is a gpu scalar

Parameters:
vec The vector to be scaled.
alpha The (inverse) scaling factor.
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value && viennacl::is_scalar<S3>::value >::type viennacl::linalg::inplace_mul_add ( V1 &  vec1,
V2 const &  vec2,
S3 const &  alpha 
)

Inplace Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes vec1 += alpha * vec2, where alpha is a gpu scalar

Parameters:
vec1 The first added
alpha The scaling factor for the first addend.
vec2 The second added.
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value && viennacl::is_cpu_scalar<SCALARTYPE>::value >::type viennacl::linalg::inplace_mul_add ( V1 &  vec1,
V2 const &  vec2,
SCALARTYPE  alpha 
)

Inplace Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes vec1 += alpha * vec2, where alpha is a cpu scalar

Parameters:
vec1 The first added
vec2 The second added.
alpha The scaling factor for the first addend.
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value && viennacl::is_scalar<S3>::value >::type viennacl::linalg::inplace_mul_sub ( V1 &  vec1,
V2 const &  vec2,
S3 const &  alpha 
)

Inplace Multiply-subtract operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes vec1 -= alpha * vec2, where alpha is a gpu scalar

Parameters:
vec1 The result vector which is updated
vec2 The second operand.
alpha The scaling factor for the vector update.
void viennacl::linalg::inplace_mult ( viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &  result,
SCALARTYPE  val 
)

Multiplies a dense matrix by a scalar.

This is the implementation of the convenience expression matrix *= val;

Parameters:
result The matrix to be manipulated
val The CPU scalar by which all entries of the matrix are multiplied
void viennacl::linalg::inplace_mult ( viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &  result,
viennacl::scalar< SCALARTYPE > const &  val 
)

Multiplies a dense matrix by a scalar.

This is the implementation of the convenience expression matrix *= val;

Parameters:
result The matrix to be manipulated
val The scalar by which all entries of the matrix are multiplied
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_scalar<S2>::value >::type viennacl::linalg::inplace_mult ( V1 &  vec,
S2 const &  alpha 
)

Scales a vector inplace. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes result *= alpha, where alpha is a gpu scalar

Parameters:
vec The vector to be scaled.
alpha The scaling factor.
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_cpu_scalar<S2>::value >::type viennacl::linalg::inplace_mult ( V1 &  vec,
S2  alpha 
)

Scales a vector inplace. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes result *= alpha, where alpha is a cpu scalar

Parameters:
vec The vector to be scaled.
alpha The scaling factor.
std::vector<typename MatrixType::value_type> viennacl::linalg::inplace_qr ( MatrixType &  A  ) 
std::vector<typename MatrixType::value_type> viennacl::linalg::inplace_qr_pure ( MatrixType &  A  ) 
std::vector<typename MatrixType::value_type> viennacl::linalg::inplace_qr_ublas ( MatrixType &  A  ) 
void viennacl::linalg::inplace_solve ( const matrix_expression< const matrix< SCALARTYPE, F1, A1 >, const matrix< SCALARTYPE, F1, A1 >, op_trans > &  proxy,
const matrix_expression< const matrix< SCALARTYPE, F2, A2 >, const matrix< SCALARTYPE, F2, A2 >, op_trans > &  B,
SOLVERTAG   
)

Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems.

Parameters:
proxy The system matrix proxy
B The matrix holding the load vectors, where the solution is directly written to
void viennacl::linalg::inplace_solve ( const matrix< SCALARTYPE, F, ALIGNMENT > &  mat,
vector< SCALARTYPE, VEC_ALIGNMENT > &  vec,
SOLVERTAG   
)
void viennacl::linalg::inplace_solve ( const matrix_expression< const matrix< SCALARTYPE, F, ALIGNMENT >, const matrix< SCALARTYPE, F, ALIGNMENT >, op_trans > &  proxy,
vector< SCALARTYPE, VEC_ALIGNMENT > &  vec,
SOLVERTAG   
)

Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems.

Parameters:
proxy The system matrix proxy
vec The load vector, where the solution is directly written to
void viennacl::linalg::inplace_solve ( const matrix_expression< const matrix< SCALARTYPE, F1, A1 >, const matrix< SCALARTYPE, F1, A1 >, op_trans > &  proxy,
matrix< SCALARTYPE, F2, A2 > &  B,
SOLVERTAG   
)

Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems.

Parameters:
proxy The system matrix proxy
B The matrix holding the load vectors, where the solution is directly written to
void viennacl::linalg::inplace_solve ( const matrix< SCALARTYPE, F1, A1 > &  mat,
const matrix_expression< const matrix< SCALARTYPE, F2, A2 >, const matrix< SCALARTYPE, F2, A2 >, op_trans > &  B,
SOLVERTAG   
)

Direct inplace solver for dense upper triangular systems.

Parameters:
mat The system matrix
B The (transposed) matrix of row vectors, where the solution is directly written to
void viennacl::linalg::inplace_solve ( compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &  L,
vector< SCALARTYPE, VEC_ALIGNMENT > &  vec,
viennacl::linalg::unit_lower_tag   
)

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

Parameters:
L The matrix
vec The vector
void viennacl::linalg::inplace_solve ( compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &  U,
vector< SCALARTYPE, VEC_ALIGNMENT > &  vec,
viennacl::linalg::upper_tag   
)

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

Parameters:
U The upper triangular matrix
vec The vector
void viennacl::linalg::inplace_solve ( const matrix< SCALARTYPE, F1, A1 > &  mat,
matrix< SCALARTYPE, F2, A2 > &  B,
SOLVERTAG   
)

Direct inplace solver for dense upper triangular systems.

Parameters:
mat The system matrix
B The matrix of row vectors, where the solution is directly written to
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value >::type viennacl::linalg::inplace_sub ( V1 &  vec1,
const V2 &  vec2 
)

Inplace addition of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes vec1 -= vec2.

Parameters:
vec1 The result.
vec2 The subtracted vector
void viennacl::linalg::inplace_sub ( viennacl::matrix< TYPE, F, ALIGNMENT > &  result,
const viennacl::matrix< TYPE, F, ALIGNMENT > &  mat2 
)

Subtracts a dense matrix from another.

This is the implementation of the convenience expression mat1 -= mat2;

Parameters:
mat2 The matrix to be subtracted
result The resulting matrix
void viennacl::linalg::lu_factorize ( matrix< SCALARTYPE, F, ALIGNMENT > &  mat  ) 

LU factorization of a dense matrix.

Parameters:
mat The system matrix, where the LU matrices are directly written to. The implicit unit diagonal of L is not written.
void viennacl::linalg::lu_substitute ( matrix< SCALARTYPE, F1, ALIGNMENT_A > const &  A,
matrix< SCALARTYPE, F2, ALIGNMENT_B > &  B 
)

LU substitution for the system LU = rhs.

Parameters:
A The system matrix, where the LU matrices are directly written to. The implicit unit diagonal of L is not written.
B The matrix of load vectors, where the solution is directly written to
void viennacl::linalg::lu_substitute ( matrix< SCALARTYPE, F, ALIGNMENT > const &  mat,
vector< SCALARTYPE, VEC_ALIGNMENT > &  vec 
)

LU substitution for the system LU = rhs.

Parameters:
mat The system matrix, where the LU matrices are directly written to. The implicit unit diagonal of L is not written.
vec The load vector, where the solution is directly written to
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_scalar<S2>::value && viennacl::is_vector<V3>::value && viennacl::is_vector<V4>::value >::type viennacl::linalg::mul_add ( V1 const &  vec1,
S2 const &  alpha,
V3 const &  vec2,
V4 &  result 
)

Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes result = alpha * vec1 + vec2, where alpha is a gpu scalar

Parameters:
vec1 The first added
alpha The scaling factor for the first addend.
vec2 The second added.
result The result vector.
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_cpu_scalar<SCALARTYPE>::value && viennacl::is_vector<V3>::value && viennacl::is_vector<V4>::value >::type viennacl::linalg::mul_add ( V1 const &  vec1,
SCALARTYPE  alpha,
V3 const &  vec2,
V4 &  result 
)

Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes result = alpha * vec1 + vec2, where alpha is a cpu scalar

Parameters:
vec1 The first added
alpha The scaling factor for the first addend.
vec2 The second added.
result The result vector.
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_scalar<S2>::value && viennacl::is_vector<V3>::value && viennacl::is_vector<V4>::value >::type viennacl::linalg::mul_sub ( V1 const &  vec1,
S2 const &  alpha,
V3 const &  vec2,
V4 &  result 
)

Multiply-subtract operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes result = alpha * vec1 - vec2, where alpha is a gpu scalar

Parameters:
vec1 The first vector operand
alpha The scaling factor for the first vector.
vec2 The second operand.
result The result vector.
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_cpu_scalar<SCALARTYPE>::value && viennacl::is_vector<V3>::value >::type viennacl::linalg::mult ( V1 const &  vec,
SCALARTYPE  alpha,
V3 &  result 
)

Scales a vector. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes result = vec * alpha, where alpha is a cpu scalar

Parameters:
vec The vector to be scaled.
alpha The scaling factor.
result The result vector.
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_scalar<S2>::value && viennacl::is_vector<V3>::value >::type viennacl::linalg::mult ( const V1 &  vec,
S2 const &  alpha,
V3 &  result 
)

Scales a vector. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

Computes result = vec * alpha, where alpha is a gpu scalar

Parameters:
vec The vector to be scaled.
alpha The scaling factor.
result The result vector.
VectorT::value_type viennacl::linalg::norm_1 ( VectorT const &  v1,
typename viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< VectorT >::type >::value >::type *  dummy = 0 
)
viennacl::scalar_expression< const viennacl::vector<ScalarType, alignment>, const viennacl::vector<ScalarType, alignment>, viennacl::op_norm_1 > viennacl::linalg::norm_1 ( viennacl::vector< ScalarType, alignment > const &  vector,
typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< viennacl::vector< ScalarType, alignment > >::type >::value >::type *  dummy = 0 
)
viennacl::enable_if< viennacl::is_vector< V1 >::value &&viennacl::is_scalar< S2 >::value >::type norm_1_impl ( V1 const &  vec,
S2 &  result 
)

Computes the l^1-norm of a vector.

Parameters:
vec The vector
result The result scalar
VectorT::value_type viennacl::linalg::norm_2 ( VectorT const &  v1,
typename viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< VectorT >::type >::value >::type *  dummy = 0 
)
viennacl::scalar_expression< const viennacl::vector<ScalarType, alignment>, const viennacl::vector<ScalarType, alignment>, viennacl::op_norm_2 > viennacl::linalg::norm_2 ( viennacl::vector< ScalarType, alignment > const &  v,
typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< viennacl::vector< ScalarType, alignment > >::type >::value >::type *  dummy = 0 
)
viennacl::enable_if< viennacl::is_vector< V1 >::value &&viennacl::is_scalar< S2 >::value >::type norm_2_impl ( V1 const &  vec,
S2 &  result 
)

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

Parameters:
vec The vector
result The result scalar
VectorT::value_type viennacl::linalg::norm_inf ( VectorT const &  v1,
typename viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< VectorT >::type >::value >::type *  dummy = 0 
)
viennacl::scalar_expression< const viennacl::vector<ScalarType, alignment>, const viennacl::vector<ScalarType, alignment>, viennacl::op_norm_inf > viennacl::linalg::norm_inf ( viennacl::vector< ScalarType, alignment > const &  v1,
typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< viennacl::vector< ScalarType, alignment > >::type >::value >::type *  dummy = 0 
)
viennacl::enable_if< viennacl::is_vector< V1 >::value &&viennacl::is_scalar< S2 >::value >::type norm_inf_impl ( V1 const &  vec,
S2 &  result 
)

Computes the supremum-norm of a vector.

Parameters:
vec The vector
result The result scalar
viennacl::matrix_expression< const viennacl::vector<SCALARTYPE, VA1>, const viennacl::vector<SCALARTYPE, VA2>, op_prod> viennacl::linalg::outer_prod ( const viennacl::vector< SCALARTYPE, VA1 > &  vec1,
const viennacl::vector< SCALARTYPE, VA2 > &  vec2 
)

Returns a proxy class for the operation mat += vec1 * vec2^T, i.e. a rank 1 update.

Parameters:
vec1 The first vector
vec2 The second vector
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value && viennacl::is_cpu_scalar<SCALARTYPE>::value >::type viennacl::linalg::plane_rotation ( V1 &  vec1,
V2 &  vec2,
SCALARTYPE  alpha,
SCALARTYPE  beta 
)

Computes a plane rotation of two vectors.

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

Parameters:
vec1 The first vector
vec2 The second vector
alpha The first transformation coefficient
beta The second transformation coefficient
void viennacl::linalg::precondition ( MatrixType const &  input,
LUType &  output,
ilut_tag const &  tag 
)

Implementation of a ILU-preconditioner with threshold.

refer to Algorithm 10.6 by Saad's book (1996 edition)

Parameters:
input The input matrix. Type requirements: const_iterator1 for iteration along rows, const_iterator2 for iteration along columns
output The output matrix. Type requirements: const_iterator1 for iteration along rows, const_iterator2 for iteration along columns and write access via operator()
tag An ilut_tag in order to dispatch among several other preconditioners.
viennacl::matrix_expression< const MatrixT, const viennacl::matrix_expression< const viennacl::matrix<NumericT, F, ALIGNMENT>, const viennacl::matrix<NumericT, F, ALIGNMENT>, viennacl::op_trans >, viennacl::op_prod > viennacl::linalg::prod ( MatrixT const &  matrix_A,
const viennacl::matrix_expression< const viennacl::matrix< NumericT, F, ALIGNMENT >, const viennacl::matrix< NumericT, F, ALIGNMENT >, viennacl::op_trans > &  matrix_B,
typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< MatrixT >::type >::value >::type *  dummy = 0 
)
VectorT viennacl::linalg::prod ( MatrixT const &  matrix,
VectorT const &  vector,
typename viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< MatrixT >::type >::value >::type *  dummy = 0 
)
viennacl::matrix_expression< const MatrixT1, const viennacl::matrix_range<MatrixT2>, viennacl::op_prod > viennacl::linalg::prod ( MatrixT1 const &  A,
viennacl::matrix_range< MatrixT2 > const &  B,
typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< MatrixT1 >::type >::value >::type *  dummy = 0 
)
viennacl::matrix_expression< const MatrixT1, const viennacl::matrix_expression<const viennacl::matrix_range<MatrixT2>, const viennacl::matrix_range<MatrixT2>, op_trans>, viennacl::op_prod > viennacl::linalg::prod ( MatrixT1 const &  A,
viennacl::matrix_expression< const viennacl::matrix_range< MatrixT2 >, const viennacl::matrix_range< MatrixT2 >, op_trans > const &  B,
typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< MatrixT2 >::type >::value >::type *  dummy = 0 
)
viennacl::vector_expression< const MatrixT, const viennacl::vector<NumericT, ALIGNMENT>, viennacl::op_prod > viennacl::linalg::prod ( MatrixT const &  matrix,
viennacl::vector< NumericT, ALIGNMENT > const &  vector,
typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< MatrixT >::type >::value >::type *  dummy = 0 
)
viennacl::matrix_expression< const MatrixT, const viennacl::matrix<NumericT, F, ALIGNMENT>, viennacl::op_prod > viennacl::linalg::prod ( MatrixT const &  matrix_A,
viennacl::matrix< NumericT, F, ALIGNMENT > const &  matrix_B,
typename viennacl::enable_if< viennacl::is_viennacl< typename viennacl::traits::tag_of< MatrixT >::type >::value >::type *  dummy = 0 
)
void viennacl::linalg::prod_AA ( MatrixTypeA const &  A,
MatrixTypeB const &  B,
MatrixTypeC &  C 
)
viennacl::vector_expression<const viennacl::toeplitz_matrix<SCALARTYPE, ALIGNMENT>, const viennacl::vector<SCALARTYPE, VECTOR_ALIGNMENT>, viennacl::op_prod > viennacl::linalg::prod_impl ( const viennacl::toeplitz_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
size_t  NUM_THREADS 
)

Returns a proxy class that represents matrix-vector multiplication with a toeplitz_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
NUM_THREADS Number of threads per work group. Can be used for fine-tuning.
void viennacl::linalg::prod_impl ( const viennacl::vandermonde_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  result 
)

Carries out matrix-vector multiplication with a vandermonde_matrix.

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

Parameters:
mat The matrix
vec The vector
result The result vector
viennacl::vector_expression<const viennacl::coordinate_matrix<SCALARTYPE, ALIGNMENT>, const viennacl::vector<SCALARTYPE, VECTOR_ALIGNMENT>, viennacl::op_prod > viennacl::linalg::prod_impl ( const viennacl::coordinate_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
size_t  NUM_THREADS 
)

Returns a proxy class that represents matrix-vector multiplication with a coordinate_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
NUM_THREADS Number of threads per work group. Can be used for fine-tuning.
void viennacl::linalg::prod_impl ( const viennacl::toeplitz_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  result 
)

Carries out matrix-vector multiplication with a toeplitz_matrix.

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

Parameters:
mat The matrix
vec The vector
result The result vector
vector_expression< const compressed_matrix< SCALARTYPE, ALIGNMENT >, const vector< SCALARTYPE, VECTOR_ALIGNMENT >, op_prod > prod_impl ( const compressed_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec 
)

Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
viennacl::vector_expression<const viennacl::matrix_expression< const matrix<SCALARTYPE, F, ALIGNMENT>, const matrix<SCALARTYPE, F, ALIGNMENT>, op_trans>, const viennacl::vector<SCALARTYPE, VECTOR_ALIGNMENT>, op_prod > viennacl::linalg::prod_impl ( const viennacl::matrix_expression< const matrix< SCALARTYPE, F, ALIGNMENT >, const matrix< SCALARTYPE, F, ALIGNMENT >, op_trans > &  proxy,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec 
)

Returns a proxy class that represents matrix-vector multiplication with a transposed matrix.

This is used for the convenience expression result = trans(mat) * vec;

Parameters:
proxy The transposed matrix proxy
vec The vector
vector_expression<const toeplitz_matrix<SCALARTYPE, ALIGNMENT>, const vector<SCALARTYPE, VECTOR_ALIGNMENT>, op_prod > viennacl::linalg::prod_impl ( const toeplitz_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec 
)

Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
vector_expression<const hankel_matrix<SCALARTYPE, ALIGNMENT>, const vector<SCALARTYPE, VECTOR_ALIGNMENT>, op_prod > viennacl::linalg::prod_impl ( const hankel_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec 
)

Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
void viennacl::linalg::prod_impl ( const viennacl::hankel_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  result 
)

Carries out matrix-vector multiplication with a hankel_matrix.

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

Parameters:
mat The matrix
vec The vector
result The result vector
void viennacl::linalg::prod_impl ( const viennacl::matrix< TYPE, F1, ALIGNMENT > &  A,
const viennacl::matrix< TYPE, F2, ALIGNMENT > &  B,
viennacl::matrix< TYPE, F3, ALIGNMENT > &  C,
int  block_size = 15 
)

Carries out matrix-matrix multiplication.

Implementation of C = prod(A, B);

void viennacl::linalg::prod_impl ( const viennacl::matrix_range< T1 > &  A,
const viennacl::matrix_range< T2 > &  B,
viennacl::matrix_range< T3 > &  C,
int  block_size = 15 
)

Carries out matrix-matrix multiplication for submatrices.

Implementation of C = prod(A, B); for submatrices

void viennacl::linalg::prod_impl ( const viennacl::matrix_expression< const matrix< TYPE, F1, ALIGNMENT >, const matrix< TYPE, F1, ALIGNMENT >, op_trans > &  A,
const viennacl::matrix< TYPE, F2, ALIGNMENT > &  B,
viennacl::matrix< TYPE, F3, ALIGNMENT > &  C 
)

Carries out matrix-matrix multiplication.

Implementation of C = prod(trans(A), B);

void viennacl::linalg::prod_impl ( const viennacl::matrix_expression< const matrix_range< M1 >, const matrix_range< M1 >, op_trans > &  A_trans,
const viennacl::matrix_range< M2 > &  B,
viennacl::matrix_range< M3 > &  C 
)

Carries out matrix-matrix multiplication for submatrices.

Implementation of C = prod(trans(A), B); for submatrices

void viennacl::linalg::prod_impl ( const viennacl::matrix_expression< const matrix< TYPE, F1, ALIGNMENT >, const matrix< TYPE, F1, ALIGNMENT >, op_trans > &  A,
const viennacl::matrix_expression< const matrix< TYPE, F2, ALIGNMENT >, const matrix< TYPE, F2, ALIGNMENT >, op_trans > &  B,
viennacl::matrix< TYPE, F3, ALIGNMENT > &  C 
)

Carries out matrix-matrix multiplication.

Implementation of C = prod(trans(A), trans(B));

void viennacl::linalg::prod_impl ( const viennacl::matrix_range< M1 > &  A,
const viennacl::matrix_expression< const matrix_range< M2 >, const matrix_range< M2 >, op_trans > &  B_trans,
viennacl::matrix_range< M3 > &  C 
)

Carries out matrix-matrix multiplication for submatrices.

Implementation of C = prod(A, trans(B)); for submatrices

void viennacl::linalg::prod_impl ( const viennacl::circulant_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  result 
)

Carries out matrix-vector multiplication with a circulant_matrix.

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

Parameters:
mat The matrix
vec The vector
result The result vector
void viennacl::linalg::prod_impl ( const viennacl::matrix< TYPE, F1, ALIGNMENT > &  A,
const viennacl::matrix_expression< const matrix< TYPE, F2, ALIGNMENT >, const matrix< TYPE, F2, ALIGNMENT >, op_trans > &  B,
viennacl::matrix< TYPE, F3, ALIGNMENT > &  C 
)

Carries out matrix-matrix multiplication.

Implementation of C = prod(A, trans(B));

viennacl::vector_expression<const viennacl::circulant_matrix<SCALARTYPE, ALIGNMENT>, const viennacl::vector<SCALARTYPE, VECTOR_ALIGNMENT>, viennacl::op_prod > viennacl::linalg::prod_impl ( const viennacl::circulant_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
size_t  NUM_THREADS 
)

Returns a proxy class that represents matrix-vector multiplication with a circulant_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
NUM_THREADS Number of threads per work group. Can be used for fine-tuning.
viennacl::vector_expression< const viennacl::matrix< SCALARTYPE, F, ALIGNMENT >, const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT >, op_prod > prod_impl ( const viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec 
)

Returns a proxy class that represents matrix-vector multiplication.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
void viennacl::linalg::prod_impl ( const viennacl::coordinate_matrix< TYPE, ALIGNMENT > &  mat,
const viennacl::vector< TYPE, VECTOR_ALIGNMENT > &  vec,
viennacl::vector< TYPE, VECTOR_ALIGNMENT > &  result 
)

Carries out matrix-vector multiplication with a coordinate_matrix.

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

Parameters:
mat The matrix
vec The vector
result The result vector
void viennacl::linalg::prod_impl ( const viennacl::matrix< TYPE, F, ALIGNMENT > &  mat,
const viennacl::vector< TYPE, VECTOR_ALIGNMENT > &  vec,
viennacl::vector< TYPE, VECTOR_ALIGNMENT > &  result 
)

Carries out matrix-vector multiplication.

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

Parameters:
mat The matrix
vec The vector
result The result vector
void viennacl::linalg::prod_impl ( const viennacl::compressed_matrix< TYPE, ALIGNMENT > &  mat,
const viennacl::vector< TYPE, VECTOR_ALIGNMENT > &  vec,
viennacl::vector< TYPE, VECTOR_ALIGNMENT > &  result,
size_t  NUM_THREADS = 0 
)

Carries out matrix-vector multiplication with a compressed_matrix.

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

Parameters:
mat The matrix
vec The vector
result The result vector
NUM_THREADS Number of threads per work group. Can be used for fine-tuning.
vector_expression<const circulant_matrix<SCALARTYPE, ALIGNMENT>, const vector<SCALARTYPE, VECTOR_ALIGNMENT>, op_prod > viennacl::linalg::prod_impl ( const circulant_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec 
)

Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
viennacl::vector_expression<const viennacl::hankel_matrix<SCALARTYPE, ALIGNMENT>, const viennacl::vector<SCALARTYPE, VECTOR_ALIGNMENT>, viennacl::op_prod > viennacl::linalg::prod_impl ( const viennacl::hankel_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
size_t  NUM_THREADS 
)

Returns a proxy class that represents matrix-vector multiplication with a hankel_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
NUM_THREADS Number of threads per work group. Can be used for fine-tuning.
vector_expression<const vandermonde_matrix<SCALARTYPE, ALIGNMENT>, const vector<SCALARTYPE, VECTOR_ALIGNMENT>, op_prod > viennacl::linalg::prod_impl ( const vandermonde_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec 
)

Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
void viennacl::linalg::prod_impl ( const viennacl::matrix_expression< const matrix< SCALARTYPE, F, ALIGNMENT >, const matrix< SCALARTYPE, F, ALIGNMENT >, op_trans > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  result 
)

Unwraps the transposed matrix proxy and forwards to trans_prod_impl().

void viennacl::linalg::prod_impl ( const viennacl::matrix_expression< const matrix_range< M1 >, const matrix_range< M1 >, op_trans > &  A_trans,
const viennacl::matrix_expression< const matrix_range< M2 >, const matrix_range< M2 >, op_trans > &  B_trans,
viennacl::matrix_range< M3 > &  C 
)

Carries out matrix-matrix multiplication for submatrices.

Implementation of C = prod(trans(A), trans(B)); for submatrices

viennacl::vector_expression<const viennacl::vandermonde_matrix<SCALARTYPE, ALIGNMENT>, const viennacl::vector<SCALARTYPE, VECTOR_ALIGNMENT>, viennacl::op_prod > viennacl::linalg::prod_impl ( const viennacl::vandermonde_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
size_t  NUM_THREADS 
)

Returns a proxy class that represents matrix-vector multiplication with a vandermonde_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
NUM_THREADS Number of threads per work group. Can be used for fine-tuning.
VectorT viennacl::linalg::prod_impl ( std::vector< std::map< KEY, DATA, COMPARE, AMAP >, AVEC > const &  matrix,
VectorT const &  vector 
)
VectorT viennacl::linalg::prod_impl ( std::vector< std::vector< T, A1 >, A2 > const &  matrix,
VectorT const &  vector 
)
vector_expression< const coordinate_matrix< SCALARTYPE, ALIGNMENT >, const vector< SCALARTYPE, VECTOR_ALIGNMENT >, op_prod > prod_impl ( const coordinate_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec 
)

Returns a proxy class that represents matrix-vector multiplication with a compressed_matrix.

This is used for the convenience expression result = prod(mat, vec);

Parameters:
mat The matrix
vec The vector
void viennacl::linalg::prod_TA ( MatrixTypeA const &  A,
MatrixTypeB const &  B,
MatrixTypeC &  C 
)
std::vector<typename MatrixType::value_type> viennacl::linalg::qr ( MatrixType &  A  ) 
void viennacl::linalg::rank_1_update ( viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &  mat1,
const viennacl::vector< SCALARTYPE, ALIGNMENT > &  vec1,
const viennacl::vector< SCALARTYPE, ALIGNMENT > &  vec2 
)

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

Implementation of the convenience expression result += outer_prod(vec1, vec2);

Parameters:
mat1 The matrix to be updated
vec1 The first vector
vec2 The second vector
void viennacl::linalg::recoverQ ( MatrixType const &  A,
VectorType const &  betas,
MatrixType &  Q,
MatrixType &  R 
)
void viennacl::linalg::scaled_rank_1_update ( viennacl::matrix< SCALARTYPE, F, ALIGNMENT > &  mat1,
SCALARTYPE  val,
const viennacl::vector< SCALARTYPE, ALIGNMENT > &  vec1,
const viennacl::vector< SCALARTYPE, ALIGNMENT > &  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:
mat1 The matrix to be updated
val The scaling factor
vec1 The first vector
vec2 The second vector
MatrixType::value_type viennacl::linalg::setup_householder_vector ( MatrixType const &  A,
VectorType &  v,
size_t  j 
)
VectorType viennacl::linalg::solve ( const MatrixType &  matrix,
VectorType const &  rhs,
cg_tag const &  tag 
)

Implementation of the conjugate gradient solver without preconditioner.

Following the algorithm in the book by Y. Saad "Iterative Methods for sparse linear systems"

Parameters:
matrix The system matrix
rhs The load vector
tag Solver configuration tag
Returns:
The result vector
vector<SCALARTYPE, VEC_ALIGNMENT> viennacl::linalg::solve ( const matrix_expression< const matrix< SCALARTYPE, F, ALIGNMENT >, const matrix< SCALARTYPE, F, ALIGNMENT >, op_trans > &  proxy,
const vector< SCALARTYPE, VEC_ALIGNMENT > &  vec,
TAG const &  tag 
)

Convenience functions for result = solve(trans(mat), vec, some_tag()); Creates a temporary result vector and forwards the request to inplace_solve().

Parameters:
proxy The transposed system matrix proxy
vec The load vector, where the solution is directly written to
tag Dispatch tag
vector<SCALARTYPE, VEC_ALIGNMENT> viennacl::linalg::solve ( compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &  L,
const vector< SCALARTYPE, VEC_ALIGNMENT > &  vec,
viennacl::linalg::upper_tag const &  tag 
)

Convenience functions for result = solve(trans(mat), vec, unit_lower_tag()); Creates a temporary result vector and forwards the request to inplace_solve().

Parameters:
L The lower triangular sparse matrix
vec The load vector, where the solution is directly written to
tag Dispatch tag
VectorType viennacl::linalg::solve ( const MatrixType &  matrix,
VectorType const &  rhs,
gmres_tag const &  tag,
PreconditionerType const &  precond 
)

Implementation of the GMRES solver.

Following the algorithm proposed by Walker in "A Simpler GMRES"

Parameters:
matrix The system matrix
rhs The load vector
tag Solver configuration tag
precond A preconditioner. Precondition operation is done via member function apply()
Returns:
The result vector
VectorType viennacl::linalg::solve ( const MatrixType &  matrix,
VectorType const &  rhs,
bicgstab_tag const &  tag 
)

Implementation of the stabilized Bi-conjugate gradient solver.

Following the description in "Iterative Methods for Sparse Linear Systems" by Y. Saad

Parameters:
matrix The system matrix
rhs The load vector
tag Solver configuration tag
Returns:
The result vector
matrix<SCALARTYPE, F2, ALIGNMENT_B> viennacl::linalg::solve ( const matrix_expression< const matrix< SCALARTYPE, F1, ALIGNMENT_A >, const matrix< SCALARTYPE, F1, ALIGNMENT_A >, op_trans > &  proxy_A,
const matrix_expression< const matrix< SCALARTYPE, F2, ALIGNMENT_B >, const matrix< SCALARTYPE, F2, ALIGNMENT_B >, op_trans > &  proxy_B,
TAG const &  tag 
)

Convenience functions for result = solve(trans(mat), vec, some_tag()); Creates a temporary result vector and forwards the request to inplace_solve().

Parameters:
proxy_A The transposed system matrix proxy
proxy_B The transposed matrix of load vectors, where the solution is directly written to
tag Dispatch tag
matrix<SCALARTYPE, F2, ALIGNMENT_B> viennacl::linalg::solve ( const matrix_expression< const matrix< SCALARTYPE, F1, ALIGNMENT_A >, const matrix< SCALARTYPE, F1, ALIGNMENT_A >, op_trans > &  proxy,
const matrix< SCALARTYPE, F2, ALIGNMENT_B > &  B,
TAG const &  tag 
)

Convenience functions for result = solve(trans(mat), B, some_tag()); Creates a temporary result matrix and forwards the request to inplace_solve().

Parameters:
proxy The transposed system matrix proxy
B The matrix of load vectors
tag Dispatch tag
VectorType viennacl::linalg::solve ( const MatrixType &  matrix,
VectorType const &  rhs,
bicgstab_tag const &  tag,
PreconditionerType const &  precond 
)

Implementation of the preconditioned stabilized Bi-conjugate gradient solver.

Following the description of the unpreconditioned case in "Iterative Methods for Sparse Linear Systems" by Y. Saad

Parameters:
matrix The system matrix
rhs The load vector
tag Solver configuration tag
precond A preconditioner. Precondition operation is done via member function apply()
Returns:
The result vector
vector<SCALARTYPE, VEC_ALIGNMENT> viennacl::linalg::solve ( const matrix< SCALARTYPE, F, ALIGNMENT > &  mat,
const vector< SCALARTYPE, VEC_ALIGNMENT > &  vec,
TAG const &  tag 
)

Convenience functions for result = solve(mat, vec, some_tag()); Creates a temporary result vector and forwards the request to inplace_solve().

Parameters:
mat The system matrix
vec The load vector
tag Dispatch tag
VectorType viennacl::linalg::solve ( const MatrixType &  matrix,
VectorType const &  rhs,
cg_tag const &  tag,
PreconditionerType const &  precond 
)

Implementation of the preconditioned conjugate gradient solver.

Following Algorithm 9.1 in "Iterative Methods for Sparse Linear Systems" by Y. Saad

Parameters:
matrix The system matrix
rhs The load vector
tag Solver configuration tag
precond A preconditioner. Precondition operation is done via member function apply()
Returns:
The result vector
matrix<SCALARTYPE, F2, ALIGNMENT_B> viennacl::linalg::solve ( const matrix< SCALARTYPE, F1, ALIGNMENT_A > &  A,
const matrix< SCALARTYPE, F2, ALIGNMENT_B > &  B,
TAG const &  tag 
)

Convenience functions for C = solve(A, B, some_tag()); Creates a temporary result matrix and forwards the request to inplace_solve().

Parameters:
A The system matrix
B The matrix of load vectors
tag Dispatch tag
VectorType viennacl::linalg::solve ( const MatrixType &  matrix,
VectorType const &  rhs,
bicgstab_tag const &  tag,
viennacl::linalg::no_precond   
)
matrix<SCALARTYPE, F2, ALIGNMENT_B> viennacl::linalg::solve ( const matrix< SCALARTYPE, F1, ALIGNMENT_A > &  A,
const matrix_expression< const matrix< SCALARTYPE, F2, ALIGNMENT_B >, const matrix< SCALARTYPE, F2, ALIGNMENT_B >, op_trans > &  proxy,
TAG const &  tag 
)

Convenience functions for C = solve(A, B^T, some_tag()); Creates a temporary result matrix and forwards the request to inplace_solve().

Parameters:
A The system matrix
proxy The transposed load vector
tag Dispatch tag
VectorType viennacl::linalg::solve ( const MatrixType &  matrix,
VectorType const &  rhs,
cg_tag const &  tag,
viennacl::linalg::no_precond   
)
vector<SCALARTYPE, VEC_ALIGNMENT> viennacl::linalg::solve ( compressed_matrix< SCALARTYPE, MAT_ALIGNMENT > const &  L,
const vector< SCALARTYPE, VEC_ALIGNMENT > &  vec,
const viennacl::linalg::unit_lower_tag tag 
)

Convenience functions for result = solve(trans(mat), vec, unit_lower_tag()); Creates a temporary result vector and forwards the request to inplace_solve().

Parameters:
L The lower triangular sparse matrix
vec The load vector, where the solution is directly written to
tag Dispatch tag
VectorType viennacl::linalg::solve ( const MatrixType &  matrix,
VectorType const &  rhs,
gmres_tag const &  tag 
)

Convenience overload of the solve() function using GMRES. Per default, no preconditioner is used.

void viennacl::linalg::sub ( const viennacl::matrix< TYPE, F, ALIGNMENT > &  mat1,
const viennacl::matrix< TYPE, F, ALIGNMENT > &  mat2,
viennacl::matrix< TYPE, F, ALIGNMENT > &  result 
)

Adds a dense matrix to another.

This is the implementation of the convenience expression result += mat1;

Parameters:
mat1 The left hand side operand
mat2 The right hand side operand
result The resulting matrixAdds a dense matrix to another This is the implementation of the convenience expression result += mat1;
mat1 The left hand side operand
mat2 The right hand side operand
result The resulting matrixSubtracts two dense matrices and writes the result to a third matrix This is the implementation of the convenience expression result = mat1 - mat2;
mat1 The left hand side operand
mat2 The right hand side operand
result The resulting matrix
viennacl::enable_if< viennacl::is_vector<V1>::value && viennacl::is_vector<V2>::value && viennacl::is_vector<V3>::value >::type viennacl::linalg::sub ( const V1 &  vec1,
const V2 &  vec2,
V3 &  result 
)

Subtraction of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.

result = vec1 - vec2

Parameters:
vec1 The first operand.
vec2 The second operand.
result The result vector.
void viennacl::linalg::trans_prod_impl ( const matrix< SCALARTYPE, F, ALIGNMENT > &  mat,
const viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  vec,
viennacl::vector< SCALARTYPE, VECTOR_ALIGNMENT > &  result 
)

Carries out matrix-vector multiplication with a transposed matrix.

Implementation of the convenience expression result = trans(mat) * vec;

Parameters:
mat The matrix
vec The vector
result The result vector
void viennacl::linalg::write_householder_to_A ( MatrixType &  A,
VectorType const &  v,
size_t  j 
)