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

Provides all linear algebra operations which are not covered by operator overloads. More...

Namespaces

 cuda
 Holds all CUDA compute kernels used by ViennaCL.
 
 detail
 Namespace holding implementation details for linear algebra routines. Usually not of interest for a library user.
 
 host_based
 Holds all compute kernels with conventional host-based execution (buffers in CPU RAM).
 
 kernels
 Namespace containing the OpenCL kernels. Deprecated, will be moved to viennacl::linalg::opencl in future releases.
 
 opencl
 Holds all routines providing OpenCL linear algebra operations.
 

Classes

class  amg_coarse_problem_too_large_exception
 
class  amg_precond
 AMG preconditioner class, can be supplied to solve()-routines. More...
 
class  amg_precond< compressed_matrix< NumericT, AlignmentV > >
 AMG preconditioner class, can be supplied to solve()-routines. More...
 
class  amg_tag
 A tag for algebraic multigrid (AMG). Used to transport information from the user to the implementation. More...
 
class  bicgstab_solver
 
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  block_ilu_precond
 A block ILU preconditioner class, can be supplied to solve()-routines. More...
 
class  block_ilu_precond< compressed_matrix< NumericT, AlignmentV >, ILUTagT >
 ILUT preconditioner class, can be supplied to solve()-routines. More...
 
class  cg_solver
 
class  cg_tag
 A tag for the conjugate gradient Used for supplying solver parameters and for dispatching the solve() function. More...
 
class  chow_patel_icc_precond
 Parallel Chow-Patel ILU preconditioner class, can be supplied to solve()-routines. More...
 
class  chow_patel_icc_precond< viennacl::compressed_matrix< NumericT, AlignmentV > >
 Parallel Chow-Patel ILU preconditioner class, can be supplied to solve()-routines. More...
 
class  chow_patel_ilu_precond
 Parallel Chow-Patel ILU preconditioner class, can be supplied to solve()-routines. More...
 
class  chow_patel_ilu_precond< viennacl::compressed_matrix< NumericT, AlignmentV > >
 Parallel Chow-Patel ILU preconditioner class, can be supplied to solve()-routines. More...
 
class  chow_patel_tag
 A tag for incomplete LU and incomplete Cholesky factorization with static pattern (Parallel-ILU0, Parallel ICC0) More...
 
class  fspai_precond
 Implementation of the Factored SParse Approximate Inverse Algorithm for a generic, uBLAS-compatible matrix type. More...
 
class  fspai_precond< viennacl::compressed_matrix< ScalarType, MAT_ALIGNMENT > >
 Implementation of the Factored SParse Approximate Inverse Algorithm for a ViennaCL compressed_matrix. More...
 
class  gmres_solver
 
class  gmres_tag
 A tag for the solver GMRES. Used for supplying solver parameters and for dispatching the solve() function. More...
 
class  ichol0_precond
 Incomplete Cholesky preconditioner class with static pattern (ICHOL0), can be supplied to solve()-routines. More...
 
class  ichol0_precond< compressed_matrix< NumericT, AlignmentV > >
 ILU0 preconditioner class, can be supplied to solve()-routines. More...
 
class  ichol0_tag
 A tag for incomplete Cholesky factorization with static pattern (ILU0) More...
 
class  ilu0_precond
 ILU0 preconditioner class, can be supplied to solve()-routines. More...
 
class  ilu0_precond< viennacl::compressed_matrix< NumericT, AlignmentV > >
 ILU0 preconditioner class, can be supplied to solve()-routines. More...
 
class  ilu0_tag
 A tag for incomplete LU factorization with static pattern (ILU0) More...
 
class  ilut_precond
 ILUT preconditioner class, can be supplied to solve()-routines. More...
 
class  ilut_precond< viennacl::compressed_matrix< NumericT, AlignmentV > >
 ILUT preconditioner class, can be supplied to solve()-routines. More...
 
class  ilut_tag
 A tag for incomplete LU factorization with threshold (ILUT) More...
 
class  jacobi_precond
 Jacobi preconditioner class, can be supplied to solve()-routines. Generic version for non-ViennaCL matrices. More...
 
class  jacobi_precond< MatrixT, true >
 Jacobi preconditioner class, can be supplied to solve()-routines. More...
 
class  jacobi_tag
 A tag for a jacobi preconditioner. More...
 
class  lanczos_tag
 A tag for the lanczos algorithm. More...
 
struct  lower_tag
 A tag class representing a lower triangular matrix. More...
 
class  mixed_precision_cg_tag
 A tag for the conjugate gradient Used for supplying solver parameters and for dispatching the solve() function. More...
 
class  nmf_config
 Configuration class for the nonnegative-matrix-factorization algorithm. Specify tolerances, maximum iteration counts, etc., here. More...
 
class  no_precond
 A tag class representing the use of no preconditioner. More...
 
class  power_iter_tag
 A tag for the power iteration algorithm. More...
 
class  row_scaling
 Jacobi-type preconditioner class, can be supplied to solve()-routines. This is a diagonal preconditioner with the diagonal entries being (configurable) row norms of the matrix. More...
 
class  row_scaling< MatrixType, true >
 Jacobi preconditioner class, can be supplied to solve()-routines. More...
 
class  row_scaling_tag
 A tag for a row scaling preconditioner which merely normalizes the equation system such that each row of the system matrix has unit norm. More...
 
class  spai_precond
 Implementation of the SParse Approximate Inverse Algorithm for a generic, uBLAS-compatible matrix type. More...
 
class  spai_precond< viennacl::compressed_matrix< ScalarType, MAT_ALIGNMENT > >
 Implementation of the SParse Approximate Inverse Algorithm for a ViennaCL compressed_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...
 
struct  upper_tag
 A tag class representing an upper triangular matrix. More...
 

Typedefs

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

Enumerations

enum  amg_coarsening_method { AMG_COARSENING_METHOD_ONEPASS = 1, AMG_COARSENING_METHOD_AGGREGATION, AMG_COARSENING_METHOD_MIS2_AGGREGATION }
 Enumeration of coarsening methods for algebraic multigrid. More...
 
enum  amg_interpolation_method { AMG_INTERPOLATION_METHOD_DIRECT = 1, AMG_INTERPOLATION_METHOD_AGGREGATION, AMG_INTERPOLATION_METHOD_SMOOTHED_AGGREGATION }
 Enumeration of interpolation methods for algebraic multigrid. More...
 

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 T >
viennacl::vector_expression< const vector_base< T >, const vector_base< T >, op_element_binary< op_prod > > element_prod (vector_base< T > const &v1, vector_base< T > const &v2)
 
template<typename T >
viennacl::vector_expression< const vector_base< T >, const vector_base< T >, op_element_binary< op_div > > element_div (vector_base< T > const &v1, vector_base< T > const &v2)
 
template<typename T >
void inner_prod_impl (vector_base< T > const &vec1, vector_base< T > const &vec2, scalar< T > &result)
 Computes the inner product of two vectors - dispatcher interface. More...
 
template<typename LHS , typename RHS , typename OP , typename T >
void inner_prod_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec1, vector_base< T > const &vec2, scalar< T > &result)
 
template<typename T , typename LHS , typename RHS , typename OP >
void inner_prod_impl (vector_base< T > const &vec1, viennacl::vector_expression< LHS, RHS, OP > const &vec2, scalar< T > &result)
 
template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 , typename T >
void inner_prod_impl (viennacl::vector_expression< LHS1, RHS1, OP1 > const &vec1, viennacl::vector_expression< LHS2, RHS2, OP2 > const &vec2, scalar< T > &result)
 
template<typename T >
void inner_prod_cpu (vector_base< T > const &vec1, vector_base< T > const &vec2, T &result)
 Computes the inner product of two vectors with the final reduction step on the CPU - dispatcher interface. More...
 
template<typename LHS , typename RHS , typename OP , typename T >
void inner_prod_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec1, vector_base< T > const &vec2, T &result)
 
template<typename T , typename LHS , typename RHS , typename OP >
void inner_prod_cpu (vector_base< T > const &vec1, viennacl::vector_expression< LHS, RHS, OP > const &vec2, T &result)
 
template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 , typename S3 >
void inner_prod_cpu (viennacl::vector_expression< LHS1, RHS1, OP1 > const &vec1, viennacl::vector_expression< LHS2, RHS2, OP2 > const &vec2, S3 &result)
 
template<typename T >
void norm_1_impl (vector_base< T > const &vec, scalar< T > &result)
 Computes the l^1-norm of a vector - dispatcher interface. More...
 
template<typename LHS , typename RHS , typename OP , typename T >
void norm_1_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, scalar< T > &result)
 
template<typename T >
void norm_1_cpu (vector_base< T > const &vec, T &result)
 Computes the l^1-norm of a vector with final reduction on the CPU. More...
 
template<typename LHS , typename RHS , typename OP , typename S2 >
void norm_1_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec, S2 &result)
 Computes the l^1-norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary. More...
 
template<typename T >
void norm_2_impl (vector_base< T > const &vec, scalar< T > &result)
 Computes the l^2-norm of a vector - dispatcher interface. More...
 
template<typename LHS , typename RHS , typename OP , typename T >
void norm_2_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, scalar< T > &result)
 Computes the l^2-norm of a vector - interface for a vector expression. Creates a temporary. More...
 
template<typename T >
void norm_2_cpu (vector_base< T > const &vec, T &result)
 Computes the l^2-norm of a vector with final reduction on the CPU - dispatcher interface. More...
 
template<typename LHS , typename RHS , typename OP , typename S2 >
void norm_2_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec, S2 &result)
 Computes the l^2-norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary. More...
 
template<typename T >
void norm_inf_impl (vector_base< T > const &vec, scalar< T > &result)
 Computes the supremum-norm of a vector. More...
 
template<typename LHS , typename RHS , typename OP , typename T >
void norm_inf_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, scalar< T > &result)
 Computes the supremum norm of a vector - interface for a vector expression. Creates a temporary. More...
 
template<typename T >
void norm_inf_cpu (vector_base< T > const &vec, T &result)
 Computes the supremum-norm of a vector with final reduction on the CPU. More...
 
template<typename LHS , typename RHS , typename OP , typename S2 >
void norm_inf_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec, S2 &result)
 Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary. More...
 
template<typename T >
void max_impl (vector_base< T > const &vec, scalar< T > &result)
 
template<typename LHS , typename RHS , typename OP , typename T >
void max_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, scalar< T > &result)
 
template<typename T >
void max_cpu (vector_base< T > const &vec, T &result)
 Computes the maximum of a vector with final reduction on the CPU. More...
 
template<typename LHS , typename RHS , typename OP , typename S2 >
void max_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec, S2 &result)
 Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary. More...
 
template<typename T >
void min_impl (vector_base< T > const &vec, scalar< T > &result)
 
template<typename LHS , typename RHS , typename OP , typename T >
void min_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, scalar< T > &result)
 
template<typename T >
void min_cpu (vector_base< T > const &vec, T &result)
 Computes the minimum of a vector with final reduction on the CPU. More...
 
template<typename LHS , typename RHS , typename OP , typename S2 >
void min_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec, S2 &result)
 Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary. More...
 
template<typename T >
void sum_impl (vector_base< T > const &vec, scalar< T > &result)
 
template<typename LHS , typename RHS , typename OP , typename T >
void sum_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, scalar< T > &result)
 
template<typename T >
void sum_cpu (vector_base< T > const &vec, T &result)
 Computes the sum of a vector with final reduction on the CPU. More...
 
template<typename LHS , typename RHS , typename OP , typename S2 >
void sum_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec, S2 &result)
 Computes the sum of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary. More...
 
template<typename T >
void norm_frobenius_impl (matrix_base< T > const &A, scalar< T > &result)
 Computes the Frobenius norm of a matrix - dispatcher interface. More...
 
template<typename T >
void norm_frobenius_cpu (matrix_base< T > const &A, T &result)
 Computes the Frobenius norm of a vector with final reduction on the CPU. More...
 
template<typename T >
vcl_size_t index_norm_inf (vector_base< T > const &vec)
 Computes the index of the first entry that is equal to the supremum-norm in modulus. More...
 
template<typename LHS , typename RHS , typename OP >
vcl_size_t index_norm_inf (viennacl::vector_expression< LHS, RHS, OP > const &vec)
 Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary. More...
 
template<typename NumericT >
void prod_impl (const matrix_base< NumericT > &mat, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
 Carries out matrix-vector multiplication. More...
 
template<typename NumericT >
void prod_impl (const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &mat_trans, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
 Carries out matrix-vector multiplication with a transposed matrix. More...
 
template<typename SparseMatrixType , class SCALARTYPE , unsigned int ALIGNMENT>
viennacl::enable_if< viennacl::is_any_sparse_matrix< SparseMatrixType >::value, vector_expression< const SparseMatrixType, const vector< SCALARTYPE, ALIGNMENT >, op_prod > >::type prod_impl (const SparseMatrixType &mat, const vector< SCALARTYPE, ALIGNMENT > &vec)
 
template<typename NumericT >
void row_sum_impl (const matrix_base< NumericT > &A, vector_base< NumericT > &result)
 
template<typename NumericT >
void column_sum_impl (const matrix_base< NumericT > &A, vector_base< NumericT > &result)
 
template<typename MatrixT , typename VectorT , typename PreconditionerT >
VectorT solve (MatrixT const &matrix, VectorT const &rhs, bicgstab_tag const &tag, PreconditionerT const &precond)
 
template<typename IndexT , typename NumericT , typename PreconditionerT >
std::vector< NumericTsolve (std::vector< std::map< IndexT, NumericT > > const &A, std::vector< NumericT > const &rhs, bicgstab_tag const &tag, PreconditionerT const &precond)
 Convenience overload for calling the preconditioned BiCGStab solver using types from the C++ STL. More...
 
template<typename MatrixT , typename VectorT >
VectorT solve (MatrixT const &matrix, VectorT const &rhs, bicgstab_tag const &tag)
 Entry point for the unpreconditioned BiCGStab method. More...
 
template<typename VectorT >
std::vector< typename viennacl::result_of::cpu_value_type< typename VectorT::value_type >::type > bisect (VectorT const &alphas, VectorT const &betas)
 Implementation of the bisect-algorithm for the calculation of the eigenvalues of a tridiagonal matrix. Experimental - interface might change. More...
 
template<typename NumericT >
bool bisect (const std::vector< NumericT > &diagonal, const std::vector< NumericT > &superdiagonal, std::vector< NumericT > &eigenvalues)
 bisect The bisection algorithm computes the eigevalues of a symmetric tridiagonal matrix. More...
 
template<typename NumericT >
bool bisect (const viennacl::vector< NumericT > &diagonal, const viennacl::vector< NumericT > &superdiagonal, viennacl::vector< NumericT > &eigenvalues)
 bisect The bisection algorithm computes the eigevalues of a symmetric tridiagonal matrix. More...
 
template<typename MatrixT , typename VectorT , typename PreconditionerT >
VectorT solve (MatrixT const &matrix, VectorT const &rhs, cg_tag const &tag, PreconditionerT const &precond)
 Implementation of the preconditioned conjugate gradient solver, generic implementation for non-ViennaCL types. More...
 
template<typename IndexT , typename NumericT , typename PreconditionerT >
std::vector< NumericTsolve (std::vector< std::map< IndexT, NumericT > > const &A, std::vector< NumericT > const &rhs, cg_tag const &tag, PreconditionerT const &precond)
 Convenience overload for calling the CG solver using types from the C++ STL. More...
 
template<typename MatrixT , typename VectorT >
VectorT solve (MatrixT const &matrix, VectorT const &rhs, cg_tag const &tag)
 Entry point for the unpreconditioned CG method. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::circulant_matrix< NumericT, AlignmentV > const &mat, viennacl::vector_base< NumericT > const &vec, viennacl::vector_base< NumericT > &result)
 Carries out matrix-vector multiplication with a circulant_matrix. More...
 
template<typename NumericT >
void precondition (viennacl::compressed_matrix< NumericT > &A, ilu0_tag const &)
 Implementation of a ILU-preconditioner with static pattern. Optimized version for CSR matrices. More...
 
template<typename NumericT >
void precondition (viennacl::compressed_matrix< NumericT > const &A, viennacl::compressed_matrix< NumericT > &L, viennacl::compressed_matrix< NumericT > &U, ilut_tag const &tag)
 Implementation of a ILU-preconditioner with threshold. Optimized implementation for compressed_matrix. More...
 
template<typename NumericT , typename SolverTagT >
void inplace_solve (const matrix_base< NumericT > &A, matrix_base< NumericT > &B, SolverTagT)
 Direct inplace solver for triangular systems with multiple right hand sides, i.e. A \ B (MATLAB notation) More...
 
template<typename NumericT , typename SolverTagT >
void inplace_solve (const matrix_base< NumericT > &A, matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > proxy_B, SolverTagT)
 Direct inplace solver for triangular systems with multiple transposed right hand sides, i.e. A \ B^T (MATLAB notation) More...
 
template<typename NumericT , typename SolverTagT >
void inplace_solve (const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &proxy_A, matrix_base< NumericT > &B, SolverTagT)
 Direct inplace solver for transposed triangular systems with multiple right hand sides, i.e. A^T \ B (MATLAB notation) More...
 
template<typename NumericT , typename SolverTagT >
void inplace_solve (matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > const &proxy_A, matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > proxy_B, SolverTagT)
 Direct inplace solver for transposed triangular systems with multiple transposed right hand sides, i.e. A^T \ B^T (MATLAB notation) More...
 
template<typename NumericT , typename SolverTagT >
matrix_base< NumericTsolve (const matrix_base< NumericT > &A, const matrix_base< NumericT > &B, SolverTagT tag)
 Convenience functions for C = solve(A, B, some_tag()); Creates a temporary result matrix and forwards the request to inplace_solve() More...
 
template<typename NumericT , typename SolverTagT >
matrix_base< NumericTsolve (const matrix_base< NumericT > &A, const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &proxy, SolverTagT tag)
 Convenience functions for C = solve(A, B^T, some_tag()); Creates a temporary result matrix and forwards the request to inplace_solve() More...
 
template<typename NumericT , typename SolverTagT >
matrix_base< NumericTsolve (const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &proxy, const matrix_base< NumericT > &B, SolverTagT tag)
 Convenience functions for result = solve(trans(mat), B, some_tag()); Creates a temporary result matrix and forwards the request to inplace_solve() More...
 
template<typename NumericT , typename SolverTagT >
matrix_base< NumericTsolve (const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &proxy_A, const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &proxy_B, SolverTagT tag)
 Convenience functions for result = solve(trans(mat), vec, some_tag()); Creates a temporary result vector and forwards the request to inplace_solve() More...
 
template<typename NumericT , typename SolverTagT >
void inplace_solve (const matrix_base< NumericT > &mat, vector_base< NumericT > &vec, SolverTagT const &tag)
 Inplace solution of a triangular system. Matlab notation A \ b. More...
 
template<typename NumericT , typename SolverTagT >
void inplace_solve (matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > const &proxy, vector_base< NumericT > &vec, SolverTagT const &tag)
 Inplace solution of a triangular system with transposed system matrix.. Matlab notation A' \ b. More...
 
template<typename NumericT >
vector< NumericTsolve (const matrix_base< NumericT > &mat, const vector_base< NumericT > &vec, viennacl::linalg::upper_tag const &tag)
 Convenience function for result = solve(mat, vec, upper_tag()); for an upper triangular solve. More...
 
template<typename NumericT >
vector< NumericTsolve (const matrix_base< NumericT > &mat, const vector_base< NumericT > &vec, viennacl::linalg::unit_upper_tag const &tag)
 Convenience function for result = solve(mat, vec, upper_tag()); for an upper triangular solve with unit diagonal. More...
 
template<typename NumericT >
vector< NumericTsolve (const matrix_base< NumericT > &mat, const vector_base< NumericT > &vec, viennacl::linalg::lower_tag const &tag)
 Convenience function for result = solve(mat, vec, upper_tag()); for a lower triangular solve. More...
 
template<typename NumericT >
vector< NumericTsolve (const matrix_base< NumericT > &mat, const vector_base< NumericT > &vec, viennacl::linalg::unit_lower_tag const &tag)
 Convenience function for result = solve(mat, vec, upper_tag()); for a lower triangular solve with unit diagonal. More...
 
template<typename NumericT , typename SolverTagT >
vector< NumericTsolve (const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &proxy, const vector_base< NumericT > &vec, SolverTagT const &tag)
 Convenience functions for result = solve(trans(mat), vec, some_tag()); Creates a temporary result vector and forwards the request to inplace_solve() More...
 
template<typename NumericT , unsigned int AlignmentV>
void direct (viennacl::vector< NumericT, AlignmentV > const &in, viennacl::vector< NumericT, AlignmentV > &out, vcl_size_t size, vcl_size_t stride, vcl_size_t batch_num, NumericT sign=NumericT(-1), viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Direct 1D algorithm for computing Fourier transformation. More...
 
template<typename NumericT , unsigned int AlignmentV>
void direct (viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > const &in, viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &out, vcl_size_t size, vcl_size_t stride, vcl_size_t batch_num, NumericT sign=NumericT(-1), viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Direct 2D algorithm for computing Fourier transformation. More...
 
template<typename NumericT , unsigned int AlignmentV>
void reorder (viennacl::vector< NumericT, AlignmentV > &in, vcl_size_t size, vcl_size_t stride, vcl_size_t bits_datasize, vcl_size_t batch_num, viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 
template<typename NumericT , unsigned int AlignmentV>
void radix2 (viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &in, vcl_size_t size, vcl_size_t stride, vcl_size_t batch_num, NumericT sign=NumericT(-1), viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Radix-2 1D algorithm for computing Fourier transformation. More...
 
template<typename NumericT , unsigned int AlignmentV>
void radix2 (viennacl::vector< NumericT, AlignmentV > &in, vcl_size_t size, vcl_size_t stride, vcl_size_t batch_num, NumericT sign=NumericT(-1), viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER data_order=viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR)
 Radix-2 2D algorithm for computing Fourier transformation. More...
 
template<typename NumericT , unsigned int AlignmentV>
void bluestein (viennacl::vector< NumericT, AlignmentV > &in, viennacl::vector< NumericT, AlignmentV > &out, vcl_size_t)
 Bluestein's algorithm for computing Fourier transformation. More...
 
template<typename NumericT , unsigned int AlignmentV>
void multiply_complex (viennacl::vector< NumericT, AlignmentV > const &input1, viennacl::vector< NumericT, AlignmentV > const &input2, viennacl::vector< NumericT, AlignmentV > &output)
 Mutiply two complex vectors and store result in output. More...
 
template<typename NumericT , unsigned int AlignmentV>
void normalize (viennacl::vector< NumericT, AlignmentV > &input)
 Normalize vector on with his own size. More...
 
template<typename NumericT , unsigned int AlignmentV>
void transpose (viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &input)
 Inplace_transpose matrix. More...
 
template<typename NumericT , unsigned int AlignmentV>
void transpose (viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > const &input, viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &output)
 Transpose matrix. More...
 
template<typename NumericT >
void real_to_complex (viennacl::vector_base< NumericT > const &in, viennacl::vector_base< NumericT > &out, vcl_size_t size)
 Create complex vector from real vector (even elements(2*k) = real part, odd elements(2*k+1) = imaginary part) More...
 
template<typename NumericT >
void complex_to_real (viennacl::vector_base< NumericT > const &in, viennacl::vector_base< NumericT > &out, vcl_size_t size)
 Create real vector from complex vector (even elements(2*k) = real part, odd elements(2*k+1) = imaginary part) More...
 
template<typename NumericT >
void reverse (viennacl::vector_base< NumericT > &in)
 Reverse vector to oposite order and save it in input vector. More...
 
template<typename MatrixT , typename VectorT , typename PreconditionerT >
VectorT solve (MatrixT const &matrix, VectorT const &rhs, gmres_tag const &tag, PreconditionerT const &precond)
 
template<typename IndexT , typename NumericT , typename PreconditionerT >
std::vector< NumericTsolve (std::vector< std::map< IndexT, NumericT > > const &A, std::vector< NumericT > const &rhs, gmres_tag const &tag, PreconditionerT const &precond)
 Convenience overload for calling the preconditioned BiCGStab solver using types from the C++ STL. More...
 
template<typename MatrixT , typename VectorT >
VectorT solve (MatrixT const &A, VectorT const &rhs, gmres_tag const &tag)
 Entry point for the unpreconditioned GMRES method. More...
 
template<typename NumericT , unsigned int AlignmentV>
void prod_impl (viennacl::hankel_matrix< NumericT, AlignmentV > const &A, viennacl::vector_base< NumericT > const &vec, viennacl::vector_base< NumericT > &result)
 Carries out matrix-vector multiplication with a hankel_matrix. More...
 
template<typename NumericT >
void precondition (viennacl::compressed_matrix< NumericT > &A, ichol0_tag const &)
 Implementation of a ILU-preconditioner with static pattern. Optimized version for CSR matrices. More...
 
template<typename NumericT >
void extract_L (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L)
 Extracts the lower triangular part L from A. More...
 
template<typename NumericT >
void icc_scale (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L)
 Scales the values extracted from A such that A' = DAD has unit diagonal. Updates values from A in L accordingly. More...
 
template<typename NumericT >
void icc_chow_patel_sweep (compressed_matrix< NumericT > &L, vector< NumericT > &aij_L)
 Performs one nonlinear relaxation step in the Chow-Patel-ICC (cf. Algorithm 3 in paper, but for L rather than U) More...
 
template<typename NumericT >
void extract_LU (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L, compressed_matrix< NumericT > &U)
 Extracts the lower triangular part L and the upper triangular part U from A. More...
 
template<typename NumericT >
void ilu_scale (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L, compressed_matrix< NumericT > &U)
 Scales the values extracted from A such that A' = DAD has unit diagonal. Updates values from A in L and U accordingly. More...
 
template<typename NumericT >
void ilu_transpose (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &B)
 Transposition B <- A^T, where the aij-vector is permuted in the same way as the value array in A when assigned to B. More...
 
template<typename NumericT >
void ilu_chow_patel_sweep (compressed_matrix< NumericT > &L, vector< NumericT > const &aij_L, compressed_matrix< NumericT > &U_trans, vector< NumericT > const &aij_U_trans)
 Performs one nonlinear relaxation step in the Chow-Patel-ILU (cf. Algorithm 2 in paper) More...
 
template<typename NumericT >
void ilu_form_neumann_matrix (compressed_matrix< NumericT > &R, vector< NumericT > &diag_R)
 Extracts the lower triangular part L and the upper triangular part U from A. More...
 
template<typename VectorT1 , typename VectorT2 >
viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< VectorT1 >::type >::value, typename VectorT1::value_type >::type inner_prod (VectorT1 const &v1, VectorT2 const &v2)
 
template<typename NumericT >
viennacl::scalar_expression< const vector_base< NumericT >, const vector_base< NumericT >, viennacl::op_inner_prodinner_prod (vector_base< NumericT > const &vector1, vector_base< NumericT > const &vector2)
 
template<typename LHS , typename RHS , typename OP , typename NumericT >
viennacl::scalar_expression< const viennacl::vector_expression< LHS, RHS, OP >, const vector_base< NumericT >, viennacl::op_inner_prodinner_prod (viennacl::vector_expression< LHS, RHS, OP > const &vector1, vector_base< NumericT > const &vector2)
 
template<typename NumericT , typename LHS , typename RHS , typename OP >
viennacl::scalar_expression< const vector_base< NumericT >, const viennacl::vector_expression< LHS, RHS, OP >, viennacl::op_inner_prodinner_prod (vector_base< NumericT > const &vector1, viennacl::vector_expression< LHS, RHS, OP > const &vector2)
 
template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 >
viennacl::scalar_expression< const viennacl::vector_expression< LHS1, RHS1, OP1 >, const viennacl::vector_expression< LHS2, RHS2, OP2 >, viennacl::op_inner_prodinner_prod (viennacl::vector_expression< LHS1, RHS1, OP1 > const &vector1, viennacl::vector_expression< LHS2, RHS2, OP2 > const &vector2)
 
template<typename NumericT >
viennacl::vector_expression< const vector_base< NumericT >, const vector_tuple< NumericT >, viennacl::op_inner_prodinner_prod (vector_base< NumericT > const &x, vector_tuple< NumericT > const &y_tuple)
 
template<typename NumericT >
void pipelined_cg_vector_update (vector_base< NumericT > &result, NumericT alpha, vector_base< NumericT > &p, vector_base< NumericT > &r, vector_base< NumericT > const &Ap, NumericT beta, vector_base< NumericT > &inner_prod_buffer)
 Performs a joint vector update operation needed for an efficient pipelined CG algorithm. More...
 
template<typename MatrixT , typename NumericT >
void pipelined_cg_prod (MatrixT const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > &inner_prod_buffer)
 Performs a joint vector update operation needed for an efficient pipelined CG algorithm. More...
 
template<typename NumericT >
void pipelined_bicgstab_update_s (vector_base< NumericT > &s, vector_base< NumericT > &r, vector_base< NumericT > const &Ap, vector_base< NumericT > &inner_prod_buffer, vcl_size_t buffer_chunk_size, vcl_size_t buffer_chunk_offset)
 Performs a joint vector update operation needed for an efficient pipelined CG algorithm. More...
 
template<typename NumericT >
void pipelined_bicgstab_vector_update (vector_base< NumericT > &result, NumericT alpha, vector_base< NumericT > &p, NumericT omega, vector_base< NumericT > const &s, vector_base< NumericT > &residual, vector_base< NumericT > const &As, NumericT beta, vector_base< NumericT > const &Ap, vector_base< NumericT > const &r0star, vector_base< NumericT > &inner_prod_buffer, vcl_size_t buffer_chunk_size)
 Performs a joint vector update operation needed for an efficient pipelined BiCGStab algorithm. More...
 
template<typename MatrixT , typename NumericT >
void pipelined_bicgstab_prod (MatrixT const &A, vector_base< NumericT > const &p, vector_base< NumericT > &Ap, vector_base< NumericT > const &r0star, vector_base< NumericT > &inner_prod_buffer, vcl_size_t buffer_chunk_size, vcl_size_t buffer_chunk_offset)
 Performs a joint vector update operation needed for an efficient pipelined CG algorithm. More...
 
template<typename T >
void pipelined_gmres_normalize_vk (vector_base< T > &v_k, vector_base< T > const &residual, vector_base< T > &R_buffer, vcl_size_t offset_in_R, vector_base< T > const &inner_prod_buffer, vector_base< T > &r_dot_vk_buffer, vcl_size_t buffer_chunk_size, vcl_size_t buffer_chunk_offset)
 Performs a vector normalization needed for an efficient pipelined GMRES algorithm. More...
 
template<typename T >
void pipelined_gmres_gram_schmidt_stage1 (vector_base< T > const &device_krylov_basis, vcl_size_t v_k_size, vcl_size_t v_k_internal_size, vcl_size_t k, vector_base< T > &vi_in_vk_buffer, vcl_size_t buffer_chunk_size)
 Computes the first reduction stage for multiple inner products <v_i, v_k>, i=0..k-1. More...
 
template<typename T >
void pipelined_gmres_gram_schmidt_stage2 (vector_base< T > &device_krylov_basis, vcl_size_t v_k_size, vcl_size_t v_k_internal_size, vcl_size_t k, vector_base< T > const &vi_in_vk_buffer, vector_base< T > &R_buffer, vcl_size_t krylov_dim, vector_base< T > &inner_prod_buffer, vcl_size_t buffer_chunk_size)
 Computes the second reduction stage for multiple inner products <v_i, v_k>, i=0..k-1, then updates v_k -= <v_i, v_k> v_i and computes the first reduction stage for ||v_k||. More...
 
template<typename T >
void pipelined_gmres_update_result (vector_base< T > &result, vector_base< T > const &residual, vector_base< T > const &krylov_basis, vcl_size_t v_k_size, vcl_size_t v_k_internal_size, vector_base< T > const &coefficients, vcl_size_t k)
 Computes x += eta_0 r + sum_{i=1}^{k-1} eta_i v_{i-1}. More...
 
template<typename MatrixType , typename T >
void pipelined_gmres_prod (MatrixType const &A, vector_base< T > const &p, vector_base< T > &Ap, vector_base< T > &inner_prod_buffer)
 Performs a joint vector update operation needed for an efficient pipelined GMRES algorithm. More...
 
template<typename MatrixT , typename DenseMatrixT >
std::vector< typename viennacl::result_of::cpu_value_type< typename MatrixT::value_type >::type > eig (MatrixT const &matrix, DenseMatrixT &eigenvectors_A, lanczos_tag const &tag, bool compute_eigenvectors=true)
 Implementation of the calculation of eigenvalues using lanczos (with and without reorthogonalization). More...
 
template<typename MatrixT >
std::vector< typename viennacl::result_of::cpu_value_type< typename MatrixT::value_type >::type > eig (MatrixT const &matrix, lanczos_tag const &tag)
 Implementation of the calculation of eigenvalues using lanczos (with and without reorthogonalization). More...
 
template<typename NumericT >
void lu_factorize (matrix< NumericT, viennacl::row_major > &A)
 LU factorization of a row-major dense matrix. More...
 
template<typename NumericT >
void lu_factorize (matrix< NumericT, viennacl::column_major > &A)
 LU factorization of a column-major dense matrix. More...
 
template<typename NumericT , typename F1 , typename F2 , unsigned int AlignmentV1, unsigned int AlignmentV2>
void lu_substitute (matrix< NumericT, F1, AlignmentV1 > const &A, matrix< NumericT, F2, AlignmentV2 > &B)
 LU substitution for the system LU = rhs. More...
 
template<typename NumericT , typename F , unsigned int MatAlignmentV, unsigned int VecAlignmentV>
void lu_substitute (matrix< NumericT, F, MatAlignmentV > const &A, vector< NumericT, VecAlignmentV > &vec)
 LU substitution for the system LU = rhs. More...
 
template<typename DestNumericT , typename SrcNumericT >
void convert (matrix_base< DestNumericT > &dest, matrix_base< SrcNumericT > const &src)
 
template<typename NumericT , typename SizeT , typename DistanceT >
void trans (const matrix_expression< const matrix_base< NumericT, SizeT, DistanceT >, const matrix_base< NumericT, SizeT, DistanceT >, op_trans > &proxy, matrix_base< NumericT > &temp_trans)
 
template<typename NumericT , typename ScalarType1 >
void am (matrix_base< NumericT > &mat1, matrix_base< NumericT > const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha)
 
template<typename NumericT , typename ScalarType1 , typename ScalarType2 >
void ambm (matrix_base< NumericT > &mat1, matrix_base< NumericT > const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT > const &mat3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT , typename ScalarType1 , typename ScalarType2 >
void ambm_m (matrix_base< NumericT > &mat1, matrix_base< NumericT > const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT > const &mat3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT >
void matrix_assign (matrix_base< NumericT > &mat, NumericT s, bool clear=false)
 
template<typename NumericT >
void matrix_diagonal_assign (matrix_base< NumericT > &mat, NumericT s)
 
template<typename NumericT >
void matrix_diag_from_vector (const vector_base< NumericT > &v, int k, matrix_base< NumericT > &A)
 Dispatcher interface for A = diag(v, k) More...
 
template<typename NumericT >
void matrix_diag_to_vector (const matrix_base< NumericT > &A, int k, vector_base< NumericT > &v)
 Dispatcher interface for v = diag(A, k) More...
 
template<typename NumericT >
void matrix_row (const matrix_base< NumericT > &A, unsigned int i, vector_base< NumericT > &v)
 
template<typename NumericT >
void matrix_column (const matrix_base< NumericT > &A, unsigned int j, vector_base< NumericT > &v)
 
template<typename NumericT , typename ScalarType >
void prod_impl (const matrix_base< NumericT > &A, const matrix_base< NumericT > &B, matrix_base< NumericT > &C, ScalarType alpha, ScalarType beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename NumericT , typename ScalarType >
void prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &A, const matrix_base< NumericT > &B, matrix_base< NumericT > &C, ScalarType alpha, ScalarType beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename NumericT , typename ScalarType >
void prod_impl (const matrix_base< NumericT > &A, const viennacl::matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &B, matrix_base< NumericT > &C, ScalarType alpha, ScalarType beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename NumericT , typename ScalarType >
void prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &A, const viennacl::matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &B, matrix_base< NumericT > &C, ScalarType alpha, ScalarType beta)
 Carries out matrix-matrix multiplication. More...
 
template<typename T , typename OP >
void element_op (matrix_base< T > &A, matrix_expression< const matrix_base< T >, const matrix_base< T >, OP > const &proxy)
 Implementation of the element-wise operation A = B .* C and A = B ./ C for matrices (using MATLAB syntax). Don't use this function directly, use element_prod() and element_div(). More...
 
template<typename NumericT >
viennacl::matrix_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_prodouter_prod (const vector_base< NumericT > &vec1, const vector_base< NumericT > &vec2)
 Returns a proxy class for the operation mat += vec1 * vec2^T, i.e. a rank 1 update. More...
 
template<typename NumericT , typename S1 >
void scaled_rank_1_update (matrix_base< NumericT > &mat1, S1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, const vector_base< NumericT > &vec1, const vector_base< NumericT > &vec2)
 The implementation of the operation mat += alpha * vec1 * vec2^T, i.e. a scaled rank 1 update. More...
 
template<typename NumericT , typename VectorType >
void bidiag_pack (matrix_base< NumericT > &A, VectorType &dh, VectorType &sh)
 This function stores the diagonal and the superdiagonal of a matrix in two vectors. More...
 
template<typename SCALARTYPE >
void copy_vec (matrix_base< SCALARTYPE > &A, vector_base< SCALARTYPE > &V, vcl_size_t row_start, vcl_size_t col_start, bool copy_col)
 This function copies a row or a column from a matrix to a vector. More...
 
template<typename NumericT >
void house_update_A_left (matrix_base< NumericT > &A, vector_base< NumericT > &D, vcl_size_t start)
 This function applies a householder transformation to a matrix. A <- P * A with a householder reflection P. More...
 
template<typename NumericT >
void house_update_A_right (matrix_base< NumericT > &A, vector_base< NumericT > &D)
 This function applies a householder transformation to a matrix: A <- A * P with a householder reflection P. More...
 
template<typename NumericT >
void house_update_QL (matrix_base< NumericT > &Q, vector_base< NumericT > &D, vcl_size_t A_size1)
 This function updates the matrix Q, which is needed for the computation of the eigenvectors. More...
 
template<typename NumericT >
void givens_next (matrix_base< NumericT > &Q, vector_base< NumericT > &tmp1, vector_base< NumericT > &tmp2, int l, int m)
 This function updates the matrix Q. It is part of the tql2 algorithm. More...
 
template<typename NumericT >
NumericT max (std::vector< NumericT > const &v1)
 
template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base< ScalarType >, const viennacl::vector_base< ScalarType >, viennacl::op_maxmax (viennacl::vector_base< ScalarType > const &v1)
 
template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression< const viennacl::vector_expression< const LHS, const RHS, OP >, const viennacl::vector_expression< const LHS, const RHS, OP >, viennacl::op_maxmax (viennacl::vector_expression< const LHS, const RHS, OP > const &vector)
 
template<typename NumericT >
NumericT min (std::vector< NumericT > const &v1)
 
template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base< ScalarType >, const viennacl::vector_base< ScalarType >, viennacl::op_minmin (viennacl::vector_base< ScalarType > const &v1)
 
template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base< ScalarType >, const viennacl::vector_base< ScalarType >, viennacl::op_minmin (viennacl::vector< ScalarType > const &v1)
 
template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression< const viennacl::vector_expression< const LHS, const RHS, OP >, const viennacl::vector_expression< const LHS, const RHS, OP >, viennacl::op_minmin (viennacl::vector_expression< const LHS, const RHS, OP > const &vector)
 
template<typename MatrixType , typename VectorType >
VectorType solve (const MatrixType &matrix, VectorType const &rhs, mixed_precision_cg_tag const &tag)
 Implementation of the conjugate gradient solver without preconditioner. More...
 
template<typename MatrixType , typename VectorType >
VectorType solve (const MatrixType &matrix, VectorType const &rhs, mixed_precision_cg_tag const &tag, viennacl::linalg::no_precond)
 
template<typename ScalarType >
void nmf (viennacl::matrix_base< ScalarType > const &V, viennacl::matrix_base< ScalarType > &W, viennacl::matrix_base< ScalarType > &H, viennacl::linalg::nmf_config const &conf)
 The nonnegative matrix factorization (approximation) algorithm as suggested by Lee and Seung. Factorizes a matrix V with nonnegative entries into matrices W and H such that ||V - W*H|| is minimized. More...
 
template<typename T , typename A >
norm_1 (std::vector< T, A > const &v1)
 
template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base< ScalarType >, const viennacl::vector_base< ScalarType >, viennacl::op_norm_1norm_1 (viennacl::vector_base< ScalarType > const &vector)
 
template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression< const viennacl::vector_expression< const LHS, const RHS, OP >, const viennacl::vector_expression< const LHS, const RHS, OP >, viennacl::op_norm_1norm_1 (viennacl::vector_expression< const LHS, const RHS, OP > const &vector)
 
template<typename T , typename A >
norm_2 (std::vector< T, A > const &v1)
 
template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base< ScalarType >, const viennacl::vector_base< ScalarType >, viennacl::op_norm_2norm_2 (viennacl::vector_base< ScalarType > const &v)
 
template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression< const viennacl::vector_expression< const LHS, const RHS, OP >, const viennacl::vector_expression< const LHS, const RHS, OP >, viennacl::op_norm_2norm_2 (viennacl::vector_expression< const LHS, const RHS, OP > const &vector)
 
template<typename NumericT >
scalar_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_norm_frobeniusnorm_frobenius (const matrix_base< NumericT > &A)
 
template<typename T , typename A >
norm_inf (std::vector< T, A > const &v1)
 
template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base< ScalarType >, const viennacl::vector_base< ScalarType >, viennacl::op_norm_infnorm_inf (viennacl::vector_base< ScalarType > const &v1)
 
template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression< const viennacl::vector_expression< const LHS, const RHS, OP >, const viennacl::vector_expression< const LHS, const RHS, OP >, viennacl::op_norm_infnorm_inf (viennacl::vector_expression< const LHS, const RHS, OP > const &vector)
 
template<typename MatrixT , typename VectorT >
viennacl::result_of::cpu_value_type< typename MatrixT::value_type >::type eig (MatrixT const &A, power_iter_tag const &tag, VectorT &eigenvec)
 Implementation of the calculation of the largest eigenvalue (in modulus) and the associated eigenvector using power iteration. More...
 
template<typename MatrixT >
viennacl::result_of::cpu_value_type< typename MatrixT::value_type >::type eig (MatrixT const &A, power_iter_tag const &tag)
 Implementation of the calculation of eigenvalues using power iteration. Does not return the eigenvector. More...
 
template<typename T , typename A1 , typename A2 , typename VectorT >
VectorT prod (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 (std::vector< std::map< KEY, DATA, COMPARE, AMAP >, AVEC > const &matrix, VectorT const &vector)
 
template<typename NumericT >
viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_mat_mat_prodprod (viennacl::matrix_base< NumericT > const &A, viennacl::matrix_base< NumericT > const &B)
 
template<typename NumericT , typename LhsT , typename RhsT , typename OpT >
viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_expression< const LhsT, const RhsT, OpT >, viennacl::op_mat_mat_prodprod (viennacl::matrix_base< NumericT > const &A, viennacl::matrix_expression< const LhsT, const RhsT, OpT > const &B)
 
template<typename LhsT , typename RhsT , typename OpT , typename NumericT >
viennacl::matrix_expression< const viennacl::matrix_expression< const LhsT, const RhsT, OpT >, const viennacl::matrix_base< NumericT >, viennacl::op_mat_mat_prodprod (viennacl::matrix_expression< const LhsT, const RhsT, OpT > const &A, viennacl::matrix_base< NumericT > const &B)
 
template<typename LhsT1 , typename RhsT1 , typename OpT1 , typename LhsT2 , typename RhsT2 , typename OpT2 >
viennacl::matrix_expression< const viennacl::matrix_expression< const LhsT1, const RhsT1, OpT1 >, const viennacl::matrix_expression< const LhsT2, const RhsT2, OpT2 >, viennacl::op_mat_mat_prodprod (viennacl::matrix_expression< const LhsT1, const RhsT1, OpT1 > const &A, viennacl::matrix_expression< const LhsT2, const RhsT2, OpT2 > const &B)
 
template<typename NumericT >
viennacl::vector_expression< const viennacl::matrix_base< NumericT >, const viennacl::vector_base< NumericT >, viennacl::op_prodprod (viennacl::matrix_base< NumericT > const &A, viennacl::vector_base< NumericT > const &x)
 
template<typename NumericT , typename F >
viennacl::vector_expression< const viennacl::matrix_base< NumericT >, const viennacl::vector_base< NumericT >, viennacl::op_prodprod (viennacl::matrix< NumericT, F > const &A, viennacl::vector_base< NumericT > const &x)
 
template<typename MatrixT , typename NumericT >
viennacl::vector_expression< const viennacl::matrix_base< NumericT >, const viennacl::vector_base< NumericT >, viennacl::op_prodprod (viennacl::matrix_range< MatrixT > const &A, viennacl::vector_base< NumericT > const &x)
 
template<typename MatrixT , typename NumericT >
viennacl::vector_expression< const viennacl::matrix_base< NumericT >, const viennacl::vector_base< NumericT >, viennacl::op_prodprod (viennacl::matrix_slice< MatrixT > const &A, viennacl::vector_base< NumericT > const &x)
 
template<typename NumericT , typename LhsT , typename RhsT , typename OpT >
viennacl::vector_expression< const viennacl::matrix_expression< const LhsT, const RhsT, OpT >, const viennacl::vector_base< NumericT >, viennacl::op_prodprod (viennacl::matrix_expression< const LhsT, const RhsT, OpT > const &A, viennacl::vector_base< NumericT > const &x)
 
template<typename NumericT , typename LhsT , typename RhsT , typename OpT >
viennacl::vector_expression< const viennacl::matrix_base< NumericT >, const viennacl::vector_expression< const LhsT, const RhsT, OpT >, viennacl::op_prodprod (viennacl::matrix_base< NumericT > const &A, viennacl::vector_expression< const LhsT, const RhsT, OpT > const &x)
 
template<typename LhsT1 , typename RhsT1 , typename OpT1 , typename LhsT2 , typename RhsT2 , typename OpT2 >
viennacl::vector_expression< const viennacl::matrix_expression< const LhsT1, const RhsT1, OpT1 >, const viennacl::vector_expression< const LhsT2, const RhsT2, OpT2 >, viennacl::op_prodprod (viennacl::matrix_expression< const LhsT1, const RhsT1, OpT1 > const &A, viennacl::vector_expression< const LhsT2, const RhsT2, OpT2 > const &x)
 
template<typename SparseMatrixType , typename SCALARTYPE >
viennacl::enable_if< viennacl::is_any_sparse_matrix< SparseMatrixType >::value, viennacl::matrix_expression< const SparseMatrixType, const matrix_base< SCALARTYPE >, op_prod > >::type prod (const SparseMatrixType &sp_mat, const viennacl::matrix_base< SCALARTYPE > &d_mat)
 
template<typename SparseMatrixType , typename SCALARTYPE >
viennacl::enable_if< viennacl::is_any_sparse_matrix< SparseMatrixType >::value, viennacl::matrix_expression< const SparseMatrixType, const viennacl::matrix_expression< const viennacl::matrix_base< SCALARTYPE >, const viennacl::matrix_base< SCALARTYPE >, op_trans >, viennacl::op_prod > >::type prod (const SparseMatrixType &A, viennacl::matrix_expression< const viennacl::matrix_base< SCALARTYPE >, const viennacl::matrix_base< SCALARTYPE >, op_trans > const &B)
 
template<typename NumericT >
viennacl::matrix_expression< const compressed_matrix< NumericT >, const compressed_matrix< NumericT >, op_prodprod (compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > const &B)
 Sparse matrix-matrix product with compressed_matrix objects. More...
 
template<typename SparseMatrixType , typename NumericT >
vector_expression< const SparseMatrixType, const vector_base< NumericT >, op_prodprod (const SparseMatrixType &A, const vector_base< NumericT > &x)
 Generic matrix-vector product with user-provided sparse matrix type. More...
 
template<typename SCALARTYPE >
void qr_method_nsm (viennacl::matrix< SCALARTYPE > &A, viennacl::matrix< SCALARTYPE > &Q, std::vector< SCALARTYPE > &D, std::vector< SCALARTYPE > &E)
 
template<typename SCALARTYPE >
void qr_method_sym (viennacl::matrix< SCALARTYPE > &A, viennacl::matrix< SCALARTYPE > &Q, std::vector< SCALARTYPE > &D)
 
template<typename SCALARTYPE >
void qr_method_sym (viennacl::matrix< SCALARTYPE > &A, viennacl::matrix< SCALARTYPE > &Q, viennacl::vector_base< SCALARTYPE > &D)
 
template<typename MatrixType , typename VectorType >
void recoverQ (MatrixType const &A, VectorType const &betas, MatrixType &Q, MatrixType &R)
 
template<typename MatrixType , typename VectorType1 , typename VectorType2 >
void inplace_qr_apply_trans_Q (MatrixType const &A, VectorType1 const &betas, VectorType2 &b)
 Computes Q^T b, where Q is an implicit orthogonal matrix defined via its Householder reflectors stored in A. More...
 
template<typename T , typename F , unsigned int ALIGNMENT, typename VectorType1 , unsigned int A2>
void inplace_qr_apply_trans_Q (viennacl::matrix< T, F, ALIGNMENT > const &A, VectorType1 const &betas, viennacl::vector< T, A2 > &b)
 
template<typename T , typename F , unsigned int ALIGNMENT>
std::vector< T > inplace_qr (viennacl::matrix< T, F, ALIGNMENT > &A, vcl_size_t block_size=16)
 Overload of inplace-QR factorization of a ViennaCL matrix A. More...
 
template<typename MatrixType >
std::vector< typename MatrixType::value_type > inplace_qr (MatrixType &A, vcl_size_t block_size=16)
 Overload of inplace-QR factorization for a general Boost.uBLAS compatible matrix A. More...
 
template<typename S1 , typename S2 , typename ScalarType1 >
viennacl::enable_if< viennacl::is_scalar< S1 >::value &&viennacl::is_scalar< S2 >::value &&viennacl::is_any_scalar< ScalarType1 >::value >::type as (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha)
 Interface for the generic operation s1 = s2 @ alpha, where s1 and s2 are GPU scalars, @ denotes multiplication or division, and alpha is either a GPU or a CPU scalar. More...
 
template<typename S1 , typename S2 , typename ScalarType1 , typename S3 , typename ScalarType2 >
viennacl::enable_if< viennacl::is_scalar< S1 >::value &&viennacl::is_scalar< S2 >::value &&viennacl::is_scalar< S3 >::value &&viennacl::is_any_scalar< ScalarType1 >::value &&viennacl::is_any_scalar< ScalarType2 >::value >::type asbs (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, S3 const &s3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 Interface for the generic operation s1 = s2 @ alpha + s3 @ beta, where s1, s2 and s3 are GPU scalars, @ denotes multiplication or division, and alpha, beta are either a GPU or a CPU scalar. More...
 
template<typename S1 , typename S2 , typename ScalarType1 , typename S3 , typename ScalarType2 >
viennacl::enable_if< viennacl::is_scalar< S1 >::value &&viennacl::is_scalar< S2 >::value &&viennacl::is_scalar< S3 >::value &&viennacl::is_any_scalar< ScalarType1 >::value &&viennacl::is_any_scalar< ScalarType2 >::value >::type asbs_s (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, S3 const &s3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 Interface for the generic operation s1 += s2 @ alpha + s3 @ beta, where s1, s2 and s3 are GPU scalars, @ denotes multiplication or division, and alpha, beta are either a GPU or a CPU scalar. More...
 
template<typename S1 , typename S2 >
viennacl::enable_if< viennacl::is_scalar< S1 >::value &&viennacl::is_scalar< S2 >::value >::type swap (S1 &s1, S2 &s2)
 Swaps the contents of two scalars. More...
 
template<typename SparseMatrixType , class ScalarType >
viennacl::enable_if< viennacl::is_any_sparse_matrix< SparseMatrixType >::value >::type prod_impl (const SparseMatrixType &mat, const viennacl::vector_base< ScalarType > &vec, viennacl::vector_base< ScalarType > &result)
 Carries out matrix-vector multiplication involving a sparse matrix type. More...
 
template<typename SparseMatrixType , class ScalarType >
viennacl::enable_if< viennacl::is_any_sparse_matrix< SparseMatrixType >::value >::type prod_impl (const SparseMatrixType &sp_mat, const viennacl::matrix_base< ScalarType > &d_mat, viennacl::matrix_base< ScalarType > &result)
 Carries out matrix-matrix multiplication first matrix being sparse. More...
 
template<typename SparseMatrixType , class ScalarType >
viennacl::enable_if< viennacl::is_any_sparse_matrix< SparseMatrixType >::value >::type prod_impl (const SparseMatrixType &sp_mat, const viennacl::matrix_expression< const viennacl::matrix_base< ScalarType >, const viennacl::matrix_base< ScalarType >, viennacl::op_trans > &d_mat, viennacl::matrix_base< ScalarType > &result)
 Carries out matrix-matrix multiplication first matrix being sparse, and the second transposed. More...
 
template<typename NumericT >
void prod_impl (const viennacl::compressed_matrix< NumericT > &A, const viennacl::compressed_matrix< NumericT > &B, viennacl::compressed_matrix< NumericT > &C)
 Carries out sparse_matrix-sparse_matrix multiplication for CSR matrices. More...
 
template<typename SparseMatrixType , class ScalarType , typename SOLVERTAG >
viennacl::enable_if< viennacl::is_any_sparse_matrix< SparseMatrixType >::value >::type inplace_solve (const SparseMatrixType &mat, viennacl::vector_base< ScalarType > &vec, SOLVERTAG tag)
 Carries out triangular inplace solves. More...
 
template<typename SparseMatrixType , class ScalarType , typename SOLVERTAG >
viennacl::enable_if< viennacl::is_any_sparse_matrix< SparseMatrixType >::value >::type inplace_solve (const matrix_expression< const SparseMatrixType, const SparseMatrixType, op_trans > &mat, viennacl::vector_base< ScalarType > &vec, SOLVERTAG tag)
 Carries out transposed triangular inplace solves. More...
 
template<typename NumericT >
viennacl::scalar_expression< const viennacl::vector_base< NumericT >, const viennacl::vector_base< NumericT >, viennacl::op_sumsum (viennacl::vector_base< NumericT > const &x)
 User interface function for computing the sum of all elements of a vector. More...
 
template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression< const viennacl::vector_expression< const LHS, const RHS, OP >, const viennacl::vector_expression< const LHS, const RHS, OP >, viennacl::op_sumsum (viennacl::vector_expression< const LHS, const RHS, OP > const &x)
 User interface function for computing the sum of all elements of a vector specified by a vector operation. More...
 
template<typename NumericT >
viennacl::vector_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_row_sumrow_sum (viennacl::matrix_base< NumericT > const &A)
 User interface function for computing the sum of all elements of each row of a matrix. More...
 
template<typename LHS , typename RHS , typename OP >
viennacl::vector_expression< const viennacl::matrix_expression< const LHS, const RHS, OP >, const viennacl::matrix_expression< const LHS, const RHS, OP >, viennacl::op_row_sumrow_sum (viennacl::matrix_expression< const LHS, const RHS, OP > const &A)
 User interface function for computing the sum of all elements of each row of a matrix specified by a matrix operation. More...
 
template<typename NumericT >
viennacl::vector_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_col_sumcolumn_sum (viennacl::matrix_base< NumericT > const &A)
 User interface function for computing the sum of all elements of each column of a matrix. More...
 
template<typename LHS , typename RHS , typename OP >
viennacl::vector_expression< const viennacl::matrix_expression< const LHS, const RHS, OP >, const viennacl::matrix_expression< const LHS, const RHS, OP >, viennacl::op_col_sumcolumn_sum (viennacl::matrix_expression< const LHS, const RHS, OP > const &A)
 User interface function for computing the sum of all elements of each column of a matrix specified by a matrix operation. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void svd (viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &A, viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &QL, viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &QR)
 Computes the singular value decomposition of a matrix A. Experimental in 1.3.x. More...
 
template<class SCALARTYPE , unsigned int ALIGNMENT>
void prod_impl (const viennacl::toeplitz_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector_base< SCALARTYPE > &vec, viennacl::vector_base< SCALARTYPE > &result)
 Carries out matrix-vector multiplication with a toeplitz_matrix. More...
 
template<typename SCALARTYPE , typename VectorType >
void tql1 (vcl_size_t n, VectorType &d, VectorType &e)
 
template<typename SCALARTYPE , typename VectorType , typename F >
void tql2 (matrix_base< SCALARTYPE, F > &Q, VectorType &d, VectorType &e)
 
template<class SCALARTYPE , unsigned int ALIGNMENT>
void prod_impl (const viennacl::vandermonde_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector_base< SCALARTYPE > &vec, viennacl::vector_base< SCALARTYPE > &result)
 Carries out matrix-vector multiplication with a vandermonde_matrix. More...
 
template<typename DestNumericT , typename SrcNumericT >
void convert (vector_base< DestNumericT > &dest, vector_base< SrcNumericT > const &src)
 
template<typename T , typename ScalarType1 >
void av (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha)
 
template<typename T , typename ScalarType1 , typename ScalarType2 >
void avbv (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename T , typename ScalarType1 , typename ScalarType2 >
void avbv_v (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename T >
void vector_assign (vector_base< T > &vec1, const T &alpha, bool up_to_internal_size=false)
 Assign a constant value to a vector (-range/-slice) More...
 
template<typename T >
void vector_swap (vector_base< T > &vec1, vector_base< T > &vec2)
 Swaps the contents of two vectors, data is copied. More...
 
template<typename T , typename OP >
void element_op (vector_base< T > &vec1, vector_expression< const vector_base< T >, const vector_base< T >, OP > const &proxy)
 Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax) More...
 
template<typename T >
void inner_prod_impl (vector_base< T > const &x, vector_tuple< T > const &y_tuple, vector_base< T > &result)
 Computes the inner products <x, y1>, <x, y2>, ..., <x, y_N> and writes the result to a (sub-)vector. More...
 
template<typename LHS , typename RHS , typename OP , typename S2 >
void norm_1_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, S2 &result)
 Computes the l^1-norm of a vector - interface for a vector expression. Creates a temporary. More...
 
template<typename NumericT >
void max_impl (vector_base< NumericT > const &vec, viennacl::scalar< NumericT > &result)
 Computes the maximum of a vector with final reduction on the CPU. More...
 
template<typename LHS , typename RHS , typename OP , typename NumericT >
void max_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, viennacl::scalar< NumericT > &result)
 Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary. More...
 
template<typename NumericT >
void min_impl (vector_base< NumericT > const &vec, viennacl::scalar< NumericT > &result)
 Computes the minimum of a vector with final reduction on the CPU. More...
 
template<typename LHS , typename RHS , typename OP , typename NumericT >
void min_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, viennacl::scalar< NumericT > &result)
 Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary. More...
 
template<typename NumericT >
void sum_impl (vector_base< NumericT > const &vec, viennacl::scalar< NumericT > &result)
 Computes the sum of a vector with final reduction on the device (GPU, etc.) More...
 
template<typename LHS , typename RHS , typename OP , typename NumericT >
void sum_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, viennacl::scalar< NumericT > &result)
 Computes the sum of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary. More...
 
template<typename T >
void plane_rotation (vector_base< T > &vec1, vector_base< T > &vec2, T alpha, T beta)
 Computes a plane rotation of two vectors. More...
 
template<typename NumericT >
void inclusive_scan (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2)
 This function implements an inclusive scan. More...
 
template<typename NumericT >
void inclusive_scan (vector_base< NumericT > &vec)
 Implements an in-place inclusive scan of a vector. More...
 
template<typename NumericT >
void exclusive_scan (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2)
 This function implements an exclusive scan. More...
 
template<typename NumericT >
void exclusive_scan (vector_base< NumericT > &vec)
 Inplace exclusive scan of a vector. More...
 

Variables

const std::string SVD_HOUSEHOLDER_UPDATE_QR_KERNEL = "house_update_QR"
 
const std::string SVD_MATRIX_TRANSPOSE_KERNEL = "transpose_inplace"
 
const std::string SVD_INVERSE_SIGNS_KERNEL = "inverse_signs"
 
const std::string SVD_GIVENS_PREV_KERNEL = "givens_prev"
 
const std::string SVD_FINAL_ITER_UPDATE_KERNEL = "final_iter_update"
 
const std::string SVD_UPDATE_QR_COLUMN_KERNEL = "update_qr_column"
 
const std::string SVD_HOUSEHOLDER_UPDATE_A_LEFT_KERNEL = "house_update_A_left"
 
const std::string SVD_HOUSEHOLDER_UPDATE_A_RIGHT_KERNEL = "house_update_A_right"
 
const std::string SVD_HOUSEHOLDER_UPDATE_QL_KERNEL = "house_update_QL"
 

Detailed Description

Provides all linear algebra operations which are not covered by operator overloads.

Typedef Documentation

Enumeration Type Documentation

Enumeration of coarsening methods for algebraic multigrid.

Enumerator
AMG_COARSENING_METHOD_ONEPASS 
AMG_COARSENING_METHOD_AGGREGATION 
AMG_COARSENING_METHOD_MIS2_AGGREGATION 

Definition at line 46 of file amg_base.hpp.

Enumeration of interpolation methods for algebraic multigrid.

Enumerator
AMG_INTERPOLATION_METHOD_DIRECT 
AMG_INTERPOLATION_METHOD_AGGREGATION 
AMG_INTERPOLATION_METHOD_SMOOTHED_AGGREGATION 

Definition at line 54 of file amg_base.hpp.

Function Documentation

template<typename NumericT , typename ScalarType1 >
void viennacl::linalg::am ( matrix_base< NumericT > &  mat1,
matrix_base< NumericT > const &  mat2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Definition at line 111 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarType1 , typename ScalarType2 >
void viennacl::linalg::ambm ( matrix_base< NumericT > &  mat1,
matrix_base< NumericT > const &  mat2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
matrix_base< NumericT > const &  mat3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 139 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarType1 , typename ScalarType2 >
void viennacl::linalg::ambm_m ( matrix_base< NumericT > &  mat1,
matrix_base< NumericT > const &  mat2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
matrix_base< NumericT > const &  mat3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 174 of file matrix_operations.hpp.

template<typename S1 , typename S2 , typename ScalarType1 >
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value && viennacl::is_any_scalar<ScalarType1>::value >::type viennacl::linalg::as ( S1 &  s1,
S2 const &  s2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Interface for the generic operation s1 = s2 @ alpha, where s1 and s2 are GPU scalars, @ denotes multiplication or division, and alpha is either a GPU or a CPU scalar.

Parameters
s1The first (GPU) scalar
s2The second (GPU) scalar
alphaThe scalar alpha in the operation
len_alphaIf alpha is obtained from summing over a small GPU vector (e.g. the final summation after a multi-group reduction), then supply the length of the array here
reciprocal_alphaIf true, then s2 / alpha instead of s2 * alpha is computed
flip_sign_alphaIf true, then (-alpha) is used instead of alpha

Definition at line 65 of file scalar_operations.hpp.

template<typename S1 , typename S2 , typename ScalarType1 , typename S3 , typename ScalarType2 >
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value && viennacl::is_scalar<S3>::value && viennacl::is_any_scalar<ScalarType1>::value && viennacl::is_any_scalar<ScalarType2>::value >::type viennacl::linalg::asbs ( S1 &  s1,
S2 const &  s2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
S3 const &  s3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Interface for the generic operation s1 = s2 @ alpha + s3 @ beta, where s1, s2 and s3 are GPU scalars, @ denotes multiplication or division, and alpha, beta are either a GPU or a CPU scalar.

Parameters
s1The first (GPU) scalar
s2The second (GPU) scalar
alphaThe scalar alpha in the operation
len_alphaIf alpha is a small GPU vector, which needs to be summed in order to obtain the final scalar, then supply the length of the array here
reciprocal_alphaIf true, then s2 / alpha instead of s2 * alpha is computed
flip_sign_alphaIf true, then (-alpha) is used instead of alpha
s3The third (GPU) scalar
betaThe scalar beta in the operation
len_betaIf beta is obtained from summing over a small GPU vector (e.g. the final summation after a multi-group reduction), then supply the length of the array here
reciprocal_betaIf true, then s2 / beta instead of s2 * beta is computed
flip_sign_betaIf true, then (-beta) is used instead of beta

Definition at line 114 of file scalar_operations.hpp.

template<typename S1 , typename S2 , typename ScalarType1 , typename S3 , typename ScalarType2 >
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value && viennacl::is_scalar<S3>::value && viennacl::is_any_scalar<ScalarType1>::value && viennacl::is_any_scalar<ScalarType2>::value >::type viennacl::linalg::asbs_s ( S1 &  s1,
S2 const &  s2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
S3 const &  s3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Interface for the generic operation s1 += s2 @ alpha + s3 @ beta, where s1, s2 and s3 are GPU scalars, @ denotes multiplication or division, and alpha, beta are either a GPU or a CPU scalar.

Parameters
s1The first (GPU) scalar
s2The second (GPU) scalar
alphaThe scalar alpha in the operation
len_alphaIf alpha is a small GPU vector, which needs to be summed in order to obtain the final scalar, then supply the length of the array here
reciprocal_alphaIf true, then s2 / alpha instead of s2 * alpha is computed
flip_sign_alphaIf true, then (-alpha) is used instead of alpha
s3The third (GPU) scalar
betaThe scalar beta in the operation
len_betaIf beta is obtained from summing over a small GPU vector (e.g. the final summation after a multi-group reduction), then supply the length of the array here
reciprocal_betaIf true, then s2 / beta instead of s2 * beta is computed
flip_sign_betaIf true, then (-beta) is used instead of beta

Definition at line 170 of file scalar_operations.hpp.

template<typename T , typename ScalarType1 >
void viennacl::linalg::av ( vector_base< T > &  vec1,
vector_base< T > const &  vec2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha 
)

Definition at line 78 of file vector_operations.hpp.

template<typename T , typename ScalarType1 , typename ScalarType2 >
void viennacl::linalg::avbv ( vector_base< T > &  vec1,
vector_base< T > const &  vec2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
vector_base< T > const &  vec3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 107 of file vector_operations.hpp.

template<typename T , typename ScalarType1 , typename ScalarType2 >
void viennacl::linalg::avbv_v ( vector_base< T > &  vec1,
vector_base< T > const &  vec2,
ScalarType1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
vector_base< T > const &  vec3,
ScalarType2 const &  beta,
vcl_size_t  len_beta,
bool  reciprocal_beta,
bool  flip_sign_beta 
)

Definition at line 144 of file vector_operations.hpp.

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

This function stores the diagonal and the superdiagonal of a matrix in two vectors.

Parameters
AThe matrix from which the vectors will be extracted of.
dhThe vector in which the diagonal of the matrix will be stored in.
shThe vector in which the superdiagonal of the matrix will be stored in.

Definition at line 901 of file matrix_operations.hpp.

template<typename NumericT >
bool viennacl::linalg::bisect ( const std::vector< NumericT > &  diagonal,
const std::vector< NumericT > &  superdiagonal,
std::vector< NumericT > &  eigenvalues 
)

bisect The bisection algorithm computes the eigevalues of a symmetric tridiagonal matrix.

Parameters
diagonaldiagonal elements of the matrix
superdiagonalsuperdiagonal elements of the matrix
eigenvaluesVectors with the eigenvalues in ascending order
Returns
return false if any errors occured

overloaded function template: std::vectors as parameters

Definition at line 60 of file bisect_gpu.hpp.

template<typename VectorT >
std::vector< typename viennacl::result_of::cpu_value_type<typename VectorT::value_type>::type > viennacl::linalg::bisect ( VectorT const &  alphas,
VectorT const &  betas 
)

Implementation of the bisect-algorithm for the calculation of the eigenvalues of a tridiagonal matrix. Experimental - interface might change.

Refer to "Calculation of the Eigenvalues of a Symmetric Tridiagonal Matrix by the Method of Bisection" in the Handbook Series Linear Algebra, contributed by Barth, Martin, and Wilkinson. http://www.maths.ed.ac.uk/~aar/papers/bamawi.pdf

Parameters
alphasElements of the main diagonal
betasElements of the secondary diagonal
Returns
Returns the eigenvalues of the tridiagonal matrix defined by alpha and beta
Examples:
bisect.cpp.

Definition at line 78 of file bisect.hpp.

template<typename NumericT >
bool viennacl::linalg::bisect ( const viennacl::vector< NumericT > &  diagonal,
const viennacl::vector< NumericT > &  superdiagonal,
viennacl::vector< NumericT > &  eigenvalues 
)

bisect The bisection algorithm computes the eigevalues of a symmetric tridiagonal matrix.

Parameters
diagonaldiagonal elements of the matrix
superdiagonalsuperdiagonal elements of the matrix
eigenvaluesVectors with the eigenvalues in ascending order
Returns
return false if any errors occured

overloaded function template: viennacl::vectors as parameters

Definition at line 122 of file bisect_gpu.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::bluestein ( viennacl::vector< NumericT, AlignmentV > &  in,
viennacl::vector< NumericT, AlignmentV > &  out,
vcl_size_t   
)

Bluestein's algorithm for computing Fourier transformation.

Currently, Works only for sizes of input data which less than 2^16. Uses a lot of additional memory, but should be fast for any size of data. Serial implementation has something about o(n * lg n) complexity

Examples:
fft.cpp.

Definition at line 235 of file fft_operations.hpp.

template<typename NumericT >
viennacl::vector_expression< const viennacl::matrix_base<NumericT>, const viennacl::matrix_base<NumericT>, viennacl::op_col_sum > viennacl::linalg::column_sum ( viennacl::matrix_base< NumericT > const &  A)

User interface function for computing the sum of all elements of each column of a matrix.

Definition at line 109 of file sum.hpp.

template<typename LHS , typename RHS , typename OP >
viennacl::vector_expression<const viennacl::matrix_expression<const LHS, const RHS, OP>, const viennacl::matrix_expression<const LHS, const RHS, OP>, viennacl::op_col_sum> viennacl::linalg::column_sum ( viennacl::matrix_expression< const LHS, const RHS, OP > const &  A)

User interface function for computing the sum of all elements of each column of a matrix specified by a matrix operation.

Typical use case: vector<double> my_sums = viennacl::linalg::column_sum(A + B);

Definition at line 124 of file sum.hpp.

template<typename NumericT >
void viennacl::linalg::column_sum_impl ( const matrix_base< NumericT > &  A,
vector_base< NumericT > &  result 
)

Definition at line 686 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::complex_to_real ( viennacl::vector_base< NumericT > const &  in,
viennacl::vector_base< NumericT > &  out,
vcl_size_t  size 
)

Create real vector from complex vector (even elements(2*k) = real part, odd elements(2*k+1) = imaginary part)

Examples:
fft.cpp.

Definition at line 421 of file fft_operations.hpp.

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

Definition at line 51 of file vector_operations.hpp.

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

Definition at line 54 of file matrix_operations.hpp.

template<class SCALARTYPE , unsigned int ALIGNMENT>
void viennacl::linalg::convolve_i ( viennacl::vector< SCALARTYPE, ALIGNMENT > &  input1,
viennacl::vector< SCALARTYPE, ALIGNMENT > &  input2,
viennacl::vector< SCALARTYPE, ALIGNMENT > &  output 
)
template<typename SCALARTYPE >
void viennacl::linalg::copy_vec ( matrix_base< SCALARTYPE > &  A,
vector_base< SCALARTYPE > &  V,
vcl_size_t  row_start,
vcl_size_t  col_start,
bool  copy_col 
)

This function copies a row or a column from a matrix to a vector.

Parameters
AThe matrix where to copy from.
VThe vector to fill with data.
row_startThe number of the first row to copy.
col_startThe number of the first column to copy.
copy_colSet to TRUE to copy a column, FALSE to copy a row.

Definition at line 942 of file matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::direct ( viennacl::vector< NumericT, AlignmentV > const &  in,
viennacl::vector< NumericT, AlignmentV > &  out,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  batch_num,
NumericT  sign = NumericT(-1),
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Direct 1D algorithm for computing Fourier transformation.

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

Definition at line 51 of file fft_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::direct ( viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > const &  in,
viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &  out,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  batch_num,
NumericT  sign = NumericT(-1),
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Direct 2D algorithm for computing Fourier transformation.

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

Definition at line 89 of file fft_operations.hpp.

template<typename MatrixT , typename VectorT >
viennacl::result_of::cpu_value_type<typename MatrixT::value_type>::type viennacl::linalg::eig ( MatrixT const &  A,
power_iter_tag const &  tag,
VectorT &  eigenvec 
)

Implementation of the calculation of the largest eigenvalue (in modulus) and the associated eigenvector using power iteration.

Parameters
AThe system matrix
tagTag with termination factor
eigenvecVector which holds the associated eigenvector once the routine completes
Returns
Returns the largest eigenvalue computed by the power iteration method

Definition at line 74 of file power_iter.hpp.

template<typename MatrixT >
viennacl::result_of::cpu_value_type<typename MatrixT::value_type>::type viennacl::linalg::eig ( MatrixT const &  A,
power_iter_tag const &  tag 
)

Implementation of the calculation of eigenvalues using power iteration. Does not return the eigenvector.

Parameters
AThe system matrix
tagTag with termination factor
Returns
Returns the largest eigenvalue computed by the power iteration method

Definition at line 119 of file power_iter.hpp.

template<typename MatrixT , typename DenseMatrixT >
std::vector< typename viennacl::result_of::cpu_value_type<typename MatrixT::value_type>::type > viennacl::linalg::eig ( MatrixT const &  matrix,
DenseMatrixT &  eigenvectors_A,
lanczos_tag const &  tag,
bool  compute_eigenvectors = true 
)

Implementation of the calculation of eigenvalues using lanczos (with and without reorthogonalization).

Implementation of Lanczos with partial reorthogonalization is implemented separately.

Parameters
matrixThe system matrix
eigenvectors_AA dense matrix in which the eigenvectors of A will be stored. Both row- and column-major matrices are supported.
tagTag with several options for the lanczos algorithm
compute_eigenvectorsBoolean flag. If true, eigenvectors are computed. Otherwise the routine returns after calculating eigenvalues.
Returns
Returns the n largest eigenvalues (n defined in the lanczos_tag)
Examples:
lanczos.cpp, and power-iter.cpp.

Definition at line 452 of file lanczos.hpp.

template<typename MatrixT >
std::vector< typename viennacl::result_of::cpu_value_type<typename MatrixT::value_type>::type > viennacl::linalg::eig ( MatrixT const &  matrix,
lanczos_tag const &  tag 
)

Implementation of the calculation of eigenvalues using lanczos (with and without reorthogonalization).

Implementation of Lanczos with partial reorthogonalization is implemented separately.

Parameters
matrixThe system matrix
tagTag with several options for the lanczos algorithm
Returns
Returns the n largest eigenvalues (n defined in the lanczos_tag)

Definition at line 505 of file lanczos.hpp.

template<typename T >
viennacl::vector_expression<const vector_base<T>, const vector_base<T>, op_element_binary<op_div> > viennacl::linalg::element_div ( vector_base< T > const &  v1,
vector_base< T > const &  v2 
)
template<typename T , typename OP >
void viennacl::linalg::element_op ( vector_base< T > &  vec1,
vector_expression< const vector_base< T >, const vector_base< T >, OP > const &  proxy 
)

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

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

Definition at line 255 of file vector_operations.hpp.

template<typename T , typename OP >
void viennacl::linalg::element_op ( matrix_base< T > &  A,
matrix_expression< const matrix_base< T >, const matrix_base< T >, OP > const &  proxy 
)

Implementation of the element-wise operation A = B .* C and A = B ./ C for matrices (using MATLAB syntax). Don't use this function directly, use element_prod() and element_div().

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

Definition at line 702 of file matrix_operations.hpp.

template<typename T >
viennacl::vector_expression<const vector_base<T>, const vector_base<T>, op_element_binary<op_prod> > viennacl::linalg::element_prod ( vector_base< T > const &  v1,
vector_base< T > const &  v2 
)
template<typename NumericT >
void viennacl::linalg::exclusive_scan ( vector_base< NumericT > &  vec1,
vector_base< NumericT > &  vec2 
)

This function implements an exclusive scan.

Given an element vector (x_0, x_1, ..., x_{n-1}), this routine computes (0, x_0, x_0 + x_1, ..., x_0 + x_1 + ... + x_{n-2})

The two vectors either need to be the same (in-place), or reside in distinct memory regions. Partial overlaps of vec1 and vec2 are not allowed.

Parameters
vec1Input vector.
vec2The output vector.

Definition at line 1240 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::exclusive_scan ( vector_base< NumericT > &  vec)

Inplace exclusive scan of a vector.

Given an element vector (x_0, x_1, ..., x_{n-1}), this routine overwrites the input vector with (0, x_0, x_0 + x_1, ..., x_0 + x_1 + ... + x_{n-2})

Definition at line 1273 of file vector_operations.hpp.

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

Extracts the lower triangular part L from A.

Diagonal of L is stored explicitly in order to enable better code reuse.

Definition at line 56 of file ilu_operations.hpp.

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

Extracts the lower triangular part L and the upper triangular part U from A.

Diagonals of L and U are stored explicitly in order to enable better code reuse.

Definition at line 156 of file ilu_operations.hpp.

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

This function updates the matrix Q. It is part of the tql2 algorithm.

Parameters
QThe matrix to be updated.
tmp1Vector with data from the tql2 algorithm.
tmp2Vector with data from the tql2 algorithm.
lData from the tql2 algorithm.
mData from the tql2 algorithm.

Definition at line 1092 of file matrix_operations.hpp.

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

This function applies a householder transformation to a matrix. A <- P * A with a householder reflection P.

Parameters
AThe matrix to be updated.
DThe normalized householder vector.
startThe repetition counter.

Definition at line 981 of file matrix_operations.hpp.

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

This function applies a householder transformation to a matrix: A <- A * P with a householder reflection P.

Parameters
AThe matrix to be updated.
DThe normalized householder vector.

Definition at line 1018 of file matrix_operations.hpp.

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

This function updates the matrix Q, which is needed for the computation of the eigenvectors.

Parameters
QThe matrix to be updated.
DThe householder vector.
A_size1size1 of matrix A

Definition at line 1053 of file matrix_operations.hpp.

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

Performs one nonlinear relaxation step in the Chow-Patel-ICC (cf. Algorithm 3 in paper, but for L rather than U)

We use a fully synchronous (Jacobi-like) variant, because asynchronous methods as described in the paper are a nightmare to debug (and particularly funny if they sometimes fail, sometimes not)

Parameters
LFactor L to be updated for the incomplete Cholesky factorization
aij_LLower triangular potion from system matrix

Definition at line 121 of file ilu_operations.hpp.

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

Scales the values extracted from A such that A' = DAD has unit diagonal. Updates values from A in L accordingly.

Since A should not be modified (const-correctness), updates are in L.

Definition at line 87 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::ilu_chow_patel_sweep ( compressed_matrix< NumericT > &  L,
vector< NumericT > const &  aij_L,
compressed_matrix< NumericT > &  U_trans,
vector< NumericT > const &  aij_U_trans 
)

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

We use a fully synchronous (Jacobi-like) variant, because asynchronous methods as described in the paper are a nightmare to debug (and particularly funny if they sometimes fail, sometimes not)

Parameters
LLower-triangular matrix L in LU factorization
aij_LLower-triangular matrix L from A
U_transUpper-triangular matrix U in CSC-storage, which is the same as U^trans in CSR-storage
aij_U_transUpper-triangular matrix from A in CSC-storage, which is the same as U^trans in CSR-storage

Definition at line 272 of file ilu_operations.hpp.

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

Extracts the lower triangular part L and the upper triangular part U from A.

Diagonals of L and U are stored explicitly in order to enable better code reuse.

Definition at line 305 of file ilu_operations.hpp.

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

Scales the values extracted from A such that A' = DAD has unit diagonal. Updates values from A in L and U accordingly.

Since A should not be modified (const-correctness), updates are in L and U.

Definition at line 188 of file ilu_operations.hpp.

template<typename NumericT >
void viennacl::linalg::ilu_transpose ( compressed_matrix< NumericT > const &  A,
compressed_matrix< NumericT > &  B 
)

Transposition B <- A^T, where the aij-vector is permuted in the same way as the value array in A when assigned to B.

Parameters
AInput matrix to be transposed
BOutput matrix containing the transposed matrix

Definition at line 220 of file ilu_operations.hpp.

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

This function implements an inclusive scan.

Given an element vector (x_0, x_1, ..., x_{n-1}), this routine computes (x_0, x_0 + x_1, ..., x_0 + x_1 + ... + x_{n-1})

The two vectors either need to be the same (in-place), or reside in distinct memory regions. Partial overlaps of vec1 and vec2 are not allowed.

Parameters
vec1Input vector.
vec2The output vector.

Definition at line 1190 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::inclusive_scan ( vector_base< NumericT > &  vec)

Implements an in-place inclusive scan of a vector.

Given an input element vector (x_0, x_1, ..., x_{n-1}), this routine overwrites the vector with (x_0, x_0 + x_1, ..., x_0 + x_1 + ... + x_{n-1})

Definition at line 1223 of file vector_operations.hpp.

template<typename T >
vcl_size_t viennacl::linalg::index_norm_inf ( vector_base< T > const &  vec)

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

Parameters
vecThe vector
Returns
The result. Note that the result must be a CPU scalar

Definition at line 845 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP >
vcl_size_t viennacl::linalg::index_norm_inf ( viennacl::vector_expression< LHS, RHS, OP > const &  vec)

Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression

Definition at line 871 of file vector_operations.hpp.

template<typename VectorT1 , typename VectorT2 >
viennacl::enable_if< viennacl::is_stl< typename viennacl::traits::tag_of< VectorT1 >::type >::value, typename VectorT1::value_type>::type viennacl::linalg::inner_prod ( VectorT1 const &  v1,
VectorT2 const &  v2 
)
Examples:
blas1.cpp, and lanczos.cpp.

Definition at line 100 of file inner_prod.hpp.

template<typename NumericT >
viennacl::scalar_expression< const vector_base<NumericT>, const vector_base<NumericT>, viennacl::op_inner_prod > viennacl::linalg::inner_prod ( vector_base< NumericT > const &  vector1,
vector_base< NumericT > const &  vector2 
)

Definition at line 116 of file inner_prod.hpp.

template<typename LHS , typename RHS , typename OP , typename NumericT >
viennacl::scalar_expression< const viennacl::vector_expression<LHS, RHS, OP>, const vector_base<NumericT>, viennacl::op_inner_prod > viennacl::linalg::inner_prod ( viennacl::vector_expression< LHS, RHS, OP > const &  vector1,
vector_base< NumericT > const &  vector2 
)

Definition at line 131 of file inner_prod.hpp.

template<typename NumericT , typename LHS , typename RHS , typename OP >
viennacl::scalar_expression< const vector_base<NumericT>, const viennacl::vector_expression<LHS, RHS, OP>, viennacl::op_inner_prod > viennacl::linalg::inner_prod ( vector_base< NumericT > const &  vector1,
viennacl::vector_expression< LHS, RHS, OP > const &  vector2 
)

Definition at line 145 of file inner_prod.hpp.

template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 >
viennacl::scalar_expression< const viennacl::vector_expression<LHS1, RHS1, OP1>, const viennacl::vector_expression<LHS2, RHS2, OP2>, viennacl::op_inner_prod > viennacl::linalg::inner_prod ( viennacl::vector_expression< LHS1, RHS1, OP1 > const &  vector1,
viennacl::vector_expression< LHS2, RHS2, OP2 > const &  vector2 
)

Definition at line 160 of file inner_prod.hpp.

template<typename NumericT >
viennacl::vector_expression< const vector_base<NumericT>, const vector_tuple<NumericT>, viennacl::op_inner_prod > viennacl::linalg::inner_prod ( vector_base< NumericT > const &  x,
vector_tuple< NumericT > const &  y_tuple 
)

Definition at line 173 of file inner_prod.hpp.

template<typename T >
void viennacl::linalg::inner_prod_cpu ( vector_base< T > const &  vec1,
vector_base< T > const &  vec2,
T &  result 
)

Computes the inner product of two vectors with the final reduction step on the CPU - dispatcher interface.

Parameters
vec1The first vector
vec2The second vector
resultThe result scalar (on the gpu)

Definition at line 459 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename T >
void viennacl::linalg::inner_prod_cpu ( viennacl::vector_expression< LHS, RHS, OP > const &  vec1,
vector_base< T > const &  vec2,
T &  result 
)

Definition at line 489 of file vector_operations.hpp.

template<typename T , typename LHS , typename RHS , typename OP >
void viennacl::linalg::inner_prod_cpu ( vector_base< T > const &  vec1,
viennacl::vector_expression< LHS, RHS, OP > const &  vec2,
T &  result 
)

Definition at line 500 of file vector_operations.hpp.

template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 , typename S3 >
void viennacl::linalg::inner_prod_cpu ( viennacl::vector_expression< LHS1, RHS1, OP1 > const &  vec1,
viennacl::vector_expression< LHS2, RHS2, OP2 > const &  vec2,
S3 &  result 
)

Definition at line 512 of file vector_operations.hpp.

template<typename T >
void viennacl::linalg::inner_prod_impl ( vector_base< T > const &  x,
vector_tuple< T > const &  y_tuple,
vector_base< T > &  result 
)

Computes the inner products <x, y1>, <x, y2>, ..., <x, y_N> and writes the result to a (sub-)vector.

Parameters
xThe common vector
y_tupleA collection of vector, all of the same size.
resultThe result scalar (on the gpu). Needs to match the number of elements in y_tuple

Definition at line 530 of file vector_operations.hpp.

template<typename T >
void viennacl::linalg::inner_prod_impl ( vector_base< T > const &  vec1,
vector_base< T > const &  vec2,
scalar< T > &  result 
)

Computes the inner product of two vectors - dispatcher interface.

Parameters
vec1The first vector
vec2The second vector
resultThe result scalar (on the gpu)

Definition at line 387 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename T >
void viennacl::linalg::inner_prod_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec1,
vector_base< T > const &  vec2,
scalar< T > &  result 
)

Definition at line 417 of file vector_operations.hpp.

template<typename T , typename LHS , typename RHS , typename OP >
void viennacl::linalg::inner_prod_impl ( vector_base< T > const &  vec1,
viennacl::vector_expression< LHS, RHS, OP > const &  vec2,
scalar< T > &  result 
)

Definition at line 428 of file vector_operations.hpp.

template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 , typename T >
void viennacl::linalg::inner_prod_impl ( viennacl::vector_expression< LHS1, RHS1, OP1 > const &  vec1,
viennacl::vector_expression< LHS2, RHS2, OP2 > const &  vec2,
scalar< T > &  result 
)

Definition at line 440 of file vector_operations.hpp.

template<typename T , typename F , unsigned int ALIGNMENT>
std::vector<T> viennacl::linalg::inplace_qr ( viennacl::matrix< T, F, ALIGNMENT > &  A,
vcl_size_t  block_size = 16 
)

Overload of inplace-QR factorization of a ViennaCL matrix A.

Parameters
AA dense ViennaCL matrix to be factored
block_sizeThe block size to be used.
Examples:
least-squares.cpp, and qr.cpp.

Definition at line 647 of file qr.hpp.

template<typename MatrixType >
std::vector<typename MatrixType::value_type> viennacl::linalg::inplace_qr ( MatrixType &  A,
vcl_size_t  block_size = 16 
)

Overload of inplace-QR factorization for a general Boost.uBLAS compatible matrix A.

Parameters
AA dense compatible to Boost.uBLAS
block_sizeThe block size to be used.

Definition at line 658 of file qr.hpp.

template<typename MatrixType , typename VectorType1 , typename VectorType2 >
void viennacl::linalg::inplace_qr_apply_trans_Q ( MatrixType const &  A,
VectorType1 const &  betas,
VectorType2 &  b 
)

Computes Q^T b, where Q is an implicit orthogonal matrix defined via its Householder reflectors stored in A.

Parameters
AA matrix holding the Householder reflectors in the lower triangular part. Typically obtained from calling inplace_qr() on the original matrix
betasThe scalars beta_i for each Householder reflector (I - beta_i v_i v_i^T)
bThe vector b to which the result Q^T b is directly written to
Examples:
least-squares.cpp.

Definition at line 608 of file qr.hpp.

template<typename T , typename F , unsigned int ALIGNMENT, typename VectorType1 , unsigned int A2>
void viennacl::linalg::inplace_qr_apply_trans_Q ( viennacl::matrix< T, F, ALIGNMENT > const &  A,
VectorType1 const &  betas,
viennacl::vector< T, A2 > &  b 
)

Definition at line 628 of file qr.hpp.

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

Direct inplace solver for triangular systems with multiple right hand sides, i.e. A \ B (MATLAB notation)

Parameters
AThe system matrix
BThe matrix of row vectors, where the solution is directly written to
Examples:
blas2.cpp, and least-squares.cpp.

Definition at line 217 of file direct_solve.hpp.

template<typename NumericT , typename SolverTagT >
void viennacl::linalg::inplace_solve ( const matrix_base< NumericT > &  A,
matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans proxy_B,
SolverTagT   
)

Direct inplace solver for triangular systems with multiple transposed right hand sides, i.e. A \ B^T (MATLAB notation)

Parameters
AThe system matrix
proxy_BThe proxy for the transposed matrix of row vectors, where the solution is directly written to

Definition at line 230 of file direct_solve.hpp.

template<typename NumericT , typename SolverTagT >
void viennacl::linalg::inplace_solve ( const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  proxy_A,
matrix_base< NumericT > &  B,
SolverTagT   
)

Direct inplace solver for transposed triangular systems with multiple right hand sides, i.e. A^T \ B (MATLAB notation)

Parameters
proxy_AThe transposed system matrix proxy
BThe matrix holding the load vectors, where the solution is directly written to

Definition at line 251 of file direct_solve.hpp.

template<typename SparseMatrixType , class ScalarType , typename SOLVERTAG >
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value>::type viennacl::linalg::inplace_solve ( const SparseMatrixType &  mat,
viennacl::vector_base< ScalarType > &  vec,
SOLVERTAG  tag 
)

Carries out triangular inplace solves.

Parameters
matThe matrix
vecThe vector
tagThe solver tag (lower_tag, unit_lower_tag, unit_upper_tag, or upper_tag)

Definition at line 256 of file sparse_matrix_operations.hpp.

template<typename NumericT , typename SolverTagT >
void viennacl::linalg::inplace_solve ( matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > const &  proxy_A,
matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans proxy_B,
SolverTagT   
)

Direct inplace solver for transposed triangular systems with multiple transposed right hand sides, i.e. A^T \ B^T (MATLAB notation)

Parameters
proxy_AThe transposed system matrix proxy
proxy_BThe transposed matrix holding the load vectors, where the solution is directly written to

Definition at line 271 of file direct_solve.hpp.

template<typename SparseMatrixType , class ScalarType , typename SOLVERTAG >
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value>::type viennacl::linalg::inplace_solve ( const matrix_expression< const SparseMatrixType, const SparseMatrixType, op_trans > &  mat,
viennacl::vector_base< ScalarType > &  vec,
SOLVERTAG  tag 
)

Carries out transposed triangular inplace solves.

Parameters
matThe matrix
vecThe vector
tagThe solver tag (lower_tag, unit_lower_tag, unit_upper_tag, or upper_tag)

Definition at line 294 of file sparse_matrix_operations.hpp.

template<typename NumericT , typename SolverTagT >
void viennacl::linalg::inplace_solve ( const matrix_base< NumericT > &  mat,
vector_base< NumericT > &  vec,
SolverTagT const &  tag 
)

Inplace solution of a triangular system. Matlab notation A \ b.

Parameters
matThe system matrix (a dense matrix for which only the respective triangular form is used)
vecThe right hand side vector
tagThe tag (either lower_tag, unit_lower_tag, upper_tag, or unit_upper_tag)

Definition at line 453 of file direct_solve.hpp.

template<typename NumericT , typename SolverTagT >
void viennacl::linalg::inplace_solve ( matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > const &  proxy,
vector_base< NumericT > &  vec,
SolverTagT const &  tag 
)

Inplace solution of a triangular system with transposed system matrix.. Matlab notation A' \ b.

Parameters
proxyThe transposed system matrix (a dense matrix for which only the respective triangular form is used)
vecThe right hand side vector
tagThe tag (either lower_tag, unit_lower_tag, upper_tag, or unit_upper_tag)

Definition at line 468 of file direct_solve.hpp.

template<typename NumericT >
void viennacl::linalg::lu_factorize ( matrix< NumericT, viennacl::row_major > &  A)

LU factorization of a row-major dense matrix.

Parameters
AThe system matrix, where the LU matrices are directly written to. The implicit unit diagonal of L is not written.
Examples:
blas2.cpp.

Definition at line 42 of file lu.hpp.

template<typename NumericT >
void viennacl::linalg::lu_factorize ( matrix< NumericT, viennacl::column_major > &  A)

LU factorization of a column-major dense matrix.

Parameters
AThe system matrix, where the LU matrices are directly written to. The implicit unit diagonal of L is not written.

Definition at line 118 of file lu.hpp.

template<typename NumericT , typename F1 , typename F2 , unsigned int AlignmentV1, unsigned int AlignmentV2>
void viennacl::linalg::lu_substitute ( matrix< NumericT, F1, AlignmentV1 > const &  A,
matrix< NumericT, F2, AlignmentV2 > &  B 
)

LU substitution for the system LU = rhs.

Parameters
AThe system matrix, where the LU matrices are directly written to. The implicit unit diagonal of L is not written.
BThe matrix of load vectors, where the solution is directly written to
Examples:
blas2.cpp.

Definition at line 201 of file lu.hpp.

template<typename NumericT , typename F , unsigned int MatAlignmentV, unsigned int VecAlignmentV>
void viennacl::linalg::lu_substitute ( matrix< NumericT, F, MatAlignmentV > const &  A,
vector< NumericT, VecAlignmentV > &  vec 
)

LU substitution for the system LU = rhs.

Parameters
AThe system matrix, where the LU matrices are directly written to. The implicit unit diagonal of L is not written.
vecThe load vector, where the solution is directly written to

Definition at line 216 of file lu.hpp.

template<typename NumericT >
void viennacl::linalg::matrix_assign ( matrix_base< NumericT > &  mat,
NumericT  s,
bool  clear = false 
)

Definition at line 208 of file matrix_operations.hpp.

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

Definition at line 337 of file matrix_operations.hpp.

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

Dispatcher interface for A = diag(v, k)

Definition at line 261 of file matrix_operations.hpp.

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

Dispatcher interface for v = diag(A, k)

Definition at line 287 of file matrix_operations.hpp.

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

Definition at line 234 of file matrix_operations.hpp.

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

Definition at line 312 of file matrix_operations.hpp.

template<typename NumericT >
NumericT viennacl::linalg::max ( std::vector< NumericT > const &  v1)

Definition at line 47 of file maxmin.hpp.

template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base<ScalarType>, const viennacl::vector_base<ScalarType>, viennacl::op_max > viennacl::linalg::max ( viennacl::vector_base< ScalarType > const &  v1)

Definition at line 67 of file maxmin.hpp.

template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression<const viennacl::vector_expression<const LHS, const RHS, OP>, const viennacl::vector_expression<const LHS, const RHS, OP>, viennacl::op_max> viennacl::linalg::max ( viennacl::vector_expression< const LHS, const RHS, OP > const &  vector)

Definition at line 80 of file maxmin.hpp.

template<typename T >
void viennacl::linalg::max_cpu ( vector_base< T > const &  vec,
T &  result 
)

Computes the maximum of a vector with final reduction on the CPU.

Parameters
vecThe vector
resultThe result scalar

Definition at line 928 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename S2 >
void viennacl::linalg::max_cpu ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
S2 &  result 
)

Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 958 of file vector_operations.hpp.

template<typename T >
void viennacl::linalg::max_impl ( vector_base< T > const &  vec,
scalar< T > &  result 
)
template<typename LHS , typename RHS , typename OP , typename T >
void viennacl::linalg::max_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
scalar< T > &  result 
)
template<typename NumericT >
void viennacl::linalg::max_impl ( vector_base< NumericT > const &  vec,
viennacl::scalar< NumericT > &  result 
)

Computes the maximum of a vector with final reduction on the CPU.

Parameters
vecThe vector
resultThe result scalar

Definition at line 885 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename NumericT >
void viennacl::linalg::max_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
viennacl::scalar< NumericT > &  result 
)

Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 915 of file vector_operations.hpp.

template<typename NumericT >
NumericT viennacl::linalg::min ( std::vector< NumericT > const &  v1)

Definition at line 91 of file maxmin.hpp.

template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base<ScalarType>, const viennacl::vector_base<ScalarType>, viennacl::op_min > viennacl::linalg::min ( viennacl::vector_base< ScalarType > const &  v1)

Definition at line 111 of file maxmin.hpp.

template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base<ScalarType>, const viennacl::vector_base<ScalarType>, viennacl::op_min > viennacl::linalg::min ( viennacl::vector< ScalarType > const &  v1)

Definition at line 123 of file maxmin.hpp.

template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression<const viennacl::vector_expression<const LHS, const RHS, OP>, const viennacl::vector_expression<const LHS, const RHS, OP>, viennacl::op_min> viennacl::linalg::min ( viennacl::vector_expression< const LHS, const RHS, OP > const &  vector)

Definition at line 136 of file maxmin.hpp.

template<typename T >
void viennacl::linalg::min_cpu ( vector_base< T > const &  vec,
T &  result 
)

Computes the minimum of a vector with final reduction on the CPU.

Parameters
vecThe vector
resultThe result scalar

Definition at line 1015 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename S2 >
void viennacl::linalg::min_cpu ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
S2 &  result 
)

Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 1045 of file vector_operations.hpp.

template<typename T >
void viennacl::linalg::min_impl ( vector_base< T > const &  vec,
scalar< T > &  result 
)
template<typename LHS , typename RHS , typename OP , typename T >
void viennacl::linalg::min_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
scalar< T > &  result 
)
template<typename NumericT >
void viennacl::linalg::min_impl ( vector_base< NumericT > const &  vec,
viennacl::scalar< NumericT > &  result 
)

Computes the minimum of a vector with final reduction on the CPU.

Parameters
vecThe vector
resultThe result scalar

Definition at line 972 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename NumericT >
void viennacl::linalg::min_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
viennacl::scalar< NumericT > &  result 
)

Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 1002 of file vector_operations.hpp.

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

Mutiply two complex vectors and store result in output.

Examples:
fft.cpp.

Definition at line 267 of file fft_operations.hpp.

template<typename ScalarType >
void viennacl::linalg::nmf ( viennacl::matrix_base< ScalarType > const &  V,
viennacl::matrix_base< ScalarType > &  W,
viennacl::matrix_base< ScalarType > &  H,
viennacl::linalg::nmf_config const &  conf 
)

The nonnegative matrix factorization (approximation) algorithm as suggested by Lee and Seung. Factorizes a matrix V with nonnegative entries into matrices W and H such that ||V - W*H|| is minimized.

Parameters
VInput matrix
WFirst factor
HSecond factor
confA configuration object holding tolerances and the like
Examples:
nmf.cpp.

Definition at line 57 of file nmf.hpp.

template<typename T , typename A >
T viennacl::linalg::norm_1 ( std::vector< T, A > const &  v1)
Examples:
blas1.cpp.

Definition at line 61 of file norm_1.hpp.

template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base<ScalarType>, const viennacl::vector_base<ScalarType>, viennacl::op_norm_1 > viennacl::linalg::norm_1 ( viennacl::vector_base< ScalarType > const &  vector)

Definition at line 78 of file norm_1.hpp.

template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression<const viennacl::vector_expression<const LHS, const RHS, OP>, const viennacl::vector_expression<const LHS, const RHS, OP>, viennacl::op_norm_1> viennacl::linalg::norm_1 ( viennacl::vector_expression< const LHS, const RHS, OP > const &  vector)

Definition at line 90 of file norm_1.hpp.

template<typename T >
void viennacl::linalg::norm_1_cpu ( vector_base< T > const &  vec,
T &  result 
)

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

Parameters
vecThe vector
resultThe result scalar

Definition at line 613 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename S2 >
void viennacl::linalg::norm_1_cpu ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
S2 &  result 
)

Computes the l^1-norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 644 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename S2 >
void viennacl::linalg::norm_1_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
S2 &  result 
)

Computes the l^1-norm of a vector - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 598 of file vector_operations.hpp.

template<typename T >
void viennacl::linalg::norm_1_impl ( vector_base< T > const &  vec,
scalar< T > &  result 
)

Computes the l^1-norm of a vector - dispatcher interface.

Parameters
vecThe vector
resultThe result scalar

Definition at line 566 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename T >
void viennacl::linalg::norm_1_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
scalar< T > &  result 
)
template<typename T , typename A >
T viennacl::linalg::norm_2 ( std::vector< T, A > const &  v1)
template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base<ScalarType>, const viennacl::vector_base<ScalarType>, viennacl::op_norm_2 > viennacl::linalg::norm_2 ( viennacl::vector_base< ScalarType > const &  v)

Definition at line 112 of file norm_2.hpp.

template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression<const viennacl::vector_expression<const LHS, const RHS, OP>, const viennacl::vector_expression<const LHS, const RHS, OP>, viennacl::op_norm_2> viennacl::linalg::norm_2 ( viennacl::vector_expression< const LHS, const RHS, OP > const &  vector)

Definition at line 125 of file norm_2.hpp.

template<typename T >
void viennacl::linalg::norm_2_cpu ( vector_base< T > const &  vec,
T &  result 
)

Computes the l^2-norm of a vector with final reduction on the CPU - dispatcher interface.

Parameters
vecThe vector
resultThe result scalar

Definition at line 705 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename S2 >
void viennacl::linalg::norm_2_cpu ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
S2 &  result 
)

Computes the l^2-norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 736 of file vector_operations.hpp.

template<typename T >
void viennacl::linalg::norm_2_impl ( vector_base< T > const &  vec,
scalar< T > &  result 
)

Computes the l^2-norm of a vector - dispatcher interface.

Parameters
vecThe vector
resultThe result scalar

Definition at line 660 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename T >
void viennacl::linalg::norm_2_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
scalar< T > &  result 
)

Computes the l^2-norm of a vector - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 691 of file vector_operations.hpp.

template<typename NumericT >
scalar_expression< const matrix_base<NumericT>, const matrix_base<NumericT>, op_norm_frobenius> viennacl::linalg::norm_frobenius ( const matrix_base< NumericT > &  A)

Definition at line 61 of file norm_frobenius.hpp.

template<typename T >
void viennacl::linalg::norm_frobenius_cpu ( matrix_base< T > const &  A,
T &  result 
)

Computes the Frobenius norm of a vector with final reduction on the CPU.

Parameters
AThe matrix
resultThe result scalar

Note that if A is strided or off-set, then a copy will be created.

Definition at line 399 of file matrix_operations.hpp.

template<typename T >
void viennacl::linalg::norm_frobenius_impl ( matrix_base< T > const &  A,
scalar< T > &  result 
)

Computes the Frobenius norm of a matrix - dispatcher interface.

Parameters
AThe matrix
resultThe result scalar

Note that if A is strided or off-set, then a copy will be created.

Definition at line 369 of file matrix_operations.hpp.

template<typename T , typename A >
T viennacl::linalg::norm_inf ( std::vector< T, A > const &  v1)
Examples:
blas1.cpp.

Definition at line 60 of file norm_inf.hpp.

template<typename ScalarType >
viennacl::scalar_expression< const viennacl::vector_base<ScalarType>, const viennacl::vector_base<ScalarType>, viennacl::op_norm_inf > viennacl::linalg::norm_inf ( viennacl::vector_base< ScalarType > const &  v1)

Definition at line 80 of file norm_inf.hpp.

template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression<const viennacl::vector_expression<const LHS, const RHS, OP>, const viennacl::vector_expression<const LHS, const RHS, OP>, viennacl::op_norm_inf> viennacl::linalg::norm_inf ( viennacl::vector_expression< const LHS, const RHS, OP > const &  vector)

Definition at line 93 of file norm_inf.hpp.

template<typename T >
void viennacl::linalg::norm_inf_cpu ( vector_base< T > const &  vec,
T &  result 
)

Computes the supremum-norm of a vector with final reduction on the CPU.

Parameters
vecThe vector
resultThe result scalar

Definition at line 797 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename S2 >
void viennacl::linalg::norm_inf_cpu ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
S2 &  result 
)

Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 828 of file vector_operations.hpp.

template<typename T >
void viennacl::linalg::norm_inf_impl ( vector_base< T > const &  vec,
scalar< T > &  result 
)

Computes the supremum-norm of a vector.

Parameters
vecThe vector
resultThe result scalar

Definition at line 752 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename T >
void viennacl::linalg::norm_inf_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
scalar< T > &  result 
)

Computes the supremum norm of a vector - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 783 of file vector_operations.hpp.

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

Normalize vector on with his own size.

Definition at line 299 of file fft_operations.hpp.

template<typename NumericT >
viennacl::matrix_expression<const vector_base<NumericT>, const vector_base<NumericT>, op_prod> viennacl::linalg::outer_prod ( const vector_base< NumericT > &  vec1,
const vector_base< NumericT > &  vec2 
)

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

Parameters
vec1The first vector
vec2The second vector
Examples:
multithreaded.cpp.

Definition at line 840 of file matrix_operations.hpp.

template<typename MatrixT , typename NumericT >
void viennacl::linalg::pipelined_bicgstab_prod ( MatrixT const &  A,
vector_base< NumericT > const &  p,
vector_base< NumericT > &  Ap,
vector_base< NumericT > const &  r0star,
vector_base< NumericT > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size,
vcl_size_t  buffer_chunk_offset 
)

Performs a joint vector update operation needed for an efficient pipelined CG algorithm.

This routines computes for a matrix A and vectors 'p' and 'Ap': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap)

Definition at line 208 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::pipelined_bicgstab_update_s ( vector_base< NumericT > &  s,
vector_base< NumericT > &  r,
vector_base< NumericT > const &  Ap,
vector_base< NumericT > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size,
vcl_size_t  buffer_chunk_offset 
)

Performs a joint vector update operation needed for an efficient pipelined CG algorithm.

This routines computes for vectors 's', 'r', 'Ap': s = r - alpha * Ap with alpha obtained from a reduction step on the 0th and the 3rd out of 6 chunks in inner_prod_buffer and runs the parallel reduction stage for computing inner_prod(s,s)

Definition at line 134 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::pipelined_bicgstab_vector_update ( vector_base< NumericT > &  result,
NumericT  alpha,
vector_base< NumericT > &  p,
NumericT  omega,
vector_base< NumericT > const &  s,
vector_base< NumericT > &  residual,
vector_base< NumericT > const &  As,
NumericT  beta,
vector_base< NumericT > const &  Ap,
vector_base< NumericT > const &  r0star,
vector_base< NumericT > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size 
)

Performs a joint vector update operation needed for an efficient pipelined BiCGStab algorithm.

x_{j+1} = x_j + alpha * p_j + omega * s_j r_{j+1} = s_j - omega * t_j p_{j+1} = r_{j+1} + beta * (p_j - omega * q_j) and compute first stage of r_dot_r0 = <r_{j+1}, r_o^*> for use in next iteration

Definition at line 171 of file iterative_operations.hpp.

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

Performs a joint vector update operation needed for an efficient pipelined CG algorithm.

This routines computes for a matrix A and vectors 'p' and 'Ap': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap)

Definition at line 97 of file iterative_operations.hpp.

template<typename NumericT >
void viennacl::linalg::pipelined_cg_vector_update ( vector_base< NumericT > &  result,
NumericT  alpha,
vector_base< NumericT > &  p,
vector_base< NumericT > &  r,
vector_base< NumericT > const &  Ap,
NumericT  beta,
vector_base< NumericT > &  inner_prod_buffer 
)

Performs a joint vector update operation needed for an efficient pipelined CG algorithm.

This routines computes for vectors 'result', 'p', 'r', 'Ap': result += alpha * p; r -= alpha * Ap; p = r + beta * p; and runs the parallel reduction stage for computing inner_prod(r,r)

Definition at line 59 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::pipelined_gmres_gram_schmidt_stage1 ( vector_base< T > const &  device_krylov_basis,
vcl_size_t  v_k_size,
vcl_size_t  v_k_internal_size,
vcl_size_t  k,
vector_base< T > &  vi_in_vk_buffer,
vcl_size_t  buffer_chunk_size 
)

Computes the first reduction stage for multiple inner products <v_i, v_k>, i=0..k-1.

All vectors v_i are stored column-major in the array 'device_krylov_basis', where each vector has an actual length 'v_k_size', but might be padded to have 'v_k_internal_size'

Definition at line 286 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::pipelined_gmres_gram_schmidt_stage2 ( vector_base< T > &  device_krylov_basis,
vcl_size_t  v_k_size,
vcl_size_t  v_k_internal_size,
vcl_size_t  k,
vector_base< T > const &  vi_in_vk_buffer,
vector_base< T > &  R_buffer,
vcl_size_t  krylov_dim,
vector_base< T > &  inner_prod_buffer,
vcl_size_t  buffer_chunk_size 
)

Computes the second reduction stage for multiple inner products <v_i, v_k>, i=0..k-1, then updates v_k -= <v_i, v_k> v_i and computes the first reduction stage for ||v_k||.

All vectors v_i are stored column-major in the array 'device_krylov_basis', where each vector has an actual length 'v_k_size', but might be padded to have 'v_k_internal_size'

Definition at line 321 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::pipelined_gmres_normalize_vk ( vector_base< T > &  v_k,
vector_base< T > const &  residual,
vector_base< T > &  R_buffer,
vcl_size_t  offset_in_R,
vector_base< T > const &  inner_prod_buffer,
vector_base< T > &  r_dot_vk_buffer,
vcl_size_t  buffer_chunk_size,
vcl_size_t  buffer_chunk_offset 
)

Performs a vector normalization needed for an efficient pipelined GMRES algorithm.

This routines computes for vectors 'r', 'v_k': Second reduction step for ||v_k|| v_k /= ||v_k|| First reduction step for <r, v_k>

Definition at line 248 of file iterative_operations.hpp.

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

Performs a joint vector update operation needed for an efficient pipelined GMRES algorithm.

This routines computes for a matrix A and vectors 'p' and 'Ap': Ap = prod(A, p); and computes the two reduction stages for computing inner_prod(p,Ap), inner_prod(Ap,Ap)

Definition at line 393 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::pipelined_gmres_update_result ( vector_base< T > &  result,
vector_base< T > const &  residual,
vector_base< T > const &  krylov_basis,
vcl_size_t  v_k_size,
vcl_size_t  v_k_internal_size,
vector_base< T > const &  coefficients,
vcl_size_t  k 
)

Computes x += eta_0 r + sum_{i=1}^{k-1} eta_i v_{i-1}.

Definition at line 356 of file iterative_operations.hpp.

template<typename T >
void viennacl::linalg::plane_rotation ( vector_base< T > &  vec1,
vector_base< T > &  vec2,
alpha,
beta 
)

Computes a plane rotation of two vectors.

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

Parameters
vec1The first vector
vec2The second vector
alphaThe first transformation coefficient (CPU scalar)
betaThe second transformation coefficient (CPU scalar)
Examples:
blas1.cpp.

Definition at line 1152 of file vector_operations.hpp.

template<typename NumericT >
void viennacl::linalg::precondition ( viennacl::compressed_matrix< NumericT > &  A,
ichol0_tag const &   
)

Implementation of a ILU-preconditioner with static pattern. Optimized version for CSR matrices.

Refer to Chih-Jen Lin and Jorge J. Moré, Incomplete Cholesky Factorizations with Limited Memory, SIAM J. Sci. Comput., 21(1), 24–45 for one of many descriptions of incomplete Cholesky Factorizations

Parameters
AThe input matrix in CSR format // param tag An ichol0_tag in order to dispatch among several other preconditioners.

Definition at line 55 of file ichol.hpp.

template<typename NumericT >
void viennacl::linalg::precondition ( viennacl::compressed_matrix< NumericT > &  A,
ilu0_tag const &   
)

Implementation of a ILU-preconditioner with static pattern. Optimized version for CSR matrices.

refer to the Algorithm in Saad's book (1996 edition)

Parameters
AThe sparse matrix matrix. The result is directly written to A.

Definition at line 78 of file ilu0.hpp.

template<typename NumericT >
void viennacl::linalg::precondition ( viennacl::compressed_matrix< NumericT > const &  A,
viennacl::compressed_matrix< NumericT > &  L,
viennacl::compressed_matrix< NumericT > &  U,
ilut_tag const &  tag 
)

Implementation of a ILU-preconditioner with threshold. Optimized implementation for compressed_matrix.

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

Parameters
AThe input matrix. Either a compressed_matrix or of type std::vector< std::map<T, U> >
LThe output matrix for L.
UThe output matrix for U.
tagAn ilut_tag in order to dispatch among several other preconditioners.

Definition at line 193 of file ilut.hpp.

template<typename T , typename A1 , typename A2 , typename VectorT >
VectorT viennacl::linalg::prod ( 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 viennacl::linalg::prod ( std::vector< std::map< KEY, DATA, COMPARE, AMAP >, AVEC > const &  matrix,
VectorT const &  vector 
)

Definition at line 117 of file prod.hpp.

template<typename NumericT >
viennacl::matrix_expression< const viennacl::matrix_base<NumericT>, const viennacl::matrix_base<NumericT>, viennacl::op_mat_mat_prod > viennacl::linalg::prod ( viennacl::matrix_base< NumericT > const &  A,
viennacl::matrix_base< NumericT > const &  B 
)

Definition at line 153 of file prod.hpp.

template<typename NumericT , typename LhsT , typename RhsT , typename OpT >
viennacl::matrix_expression< const viennacl::matrix_base<NumericT>, const viennacl::matrix_expression<const LhsT, const RhsT, OpT>, viennacl::op_mat_mat_prod > viennacl::linalg::prod ( viennacl::matrix_base< NumericT > const &  A,
viennacl::matrix_expression< const LhsT, const RhsT, OpT > const &  B 
)

Definition at line 166 of file prod.hpp.

template<typename LhsT , typename RhsT , typename OpT , typename NumericT >
viennacl::matrix_expression< const viennacl::matrix_expression<const LhsT, const RhsT, OpT>, const viennacl::matrix_base<NumericT>, viennacl::op_mat_mat_prod > viennacl::linalg::prod ( viennacl::matrix_expression< const LhsT, const RhsT, OpT > const &  A,
viennacl::matrix_base< NumericT > const &  B 
)

Definition at line 179 of file prod.hpp.

template<typename LhsT1 , typename RhsT1 , typename OpT1 , typename LhsT2 , typename RhsT2 , typename OpT2 >
viennacl::matrix_expression< const viennacl::matrix_expression<const LhsT1, const RhsT1, OpT1>, const viennacl::matrix_expression<const LhsT2, const RhsT2, OpT2>, viennacl::op_mat_mat_prod > viennacl::linalg::prod ( viennacl::matrix_expression< const LhsT1, const RhsT1, OpT1 > const &  A,
viennacl::matrix_expression< const LhsT2, const RhsT2, OpT2 > const &  B 
)

Definition at line 194 of file prod.hpp.

template<typename NumericT >
viennacl::vector_expression< const viennacl::matrix_base<NumericT>, const viennacl::vector_base<NumericT>, viennacl::op_prod > viennacl::linalg::prod ( viennacl::matrix_base< NumericT > const &  A,
viennacl::vector_base< NumericT > const &  x 
)

Definition at line 209 of file prod.hpp.

template<typename NumericT , typename F >
viennacl::vector_expression< const viennacl::matrix_base<NumericT>, const viennacl::vector_base<NumericT>, viennacl::op_prod > viennacl::linalg::prod ( viennacl::matrix< NumericT, F > const &  A,
viennacl::vector_base< NumericT > const &  x 
)

Definition at line 222 of file prod.hpp.

template<typename MatrixT , typename NumericT >
viennacl::vector_expression< const viennacl::matrix_base<NumericT>, const viennacl::vector_base<NumericT>, viennacl::op_prod > viennacl::linalg::prod ( viennacl::matrix_range< MatrixT > const &  A,
viennacl::vector_base< NumericT > const &  x 
)

Definition at line 235 of file prod.hpp.

template<typename MatrixT , typename NumericT >
viennacl::vector_expression< const viennacl::matrix_base<NumericT>, const viennacl::vector_base<NumericT>, viennacl::op_prod > viennacl::linalg::prod ( viennacl::matrix_slice< MatrixT > const &  A,
viennacl::vector_base< NumericT > const &  x 
)

Definition at line 248 of file prod.hpp.

template<typename NumericT , typename LhsT , typename RhsT , typename OpT >
viennacl::vector_expression< const viennacl::matrix_expression<const LhsT, const RhsT, OpT>, const viennacl::vector_base<NumericT>, viennacl::op_prod > viennacl::linalg::prod ( viennacl::matrix_expression< const LhsT, const RhsT, OpT > const &  A,
viennacl::vector_base< NumericT > const &  x 
)

Definition at line 261 of file prod.hpp.

template<typename NumericT , typename LhsT , typename RhsT , typename OpT >
viennacl::vector_expression< const viennacl::matrix_base<NumericT>, const viennacl::vector_expression<const LhsT, const RhsT, OpT>, viennacl::op_prod > viennacl::linalg::prod ( viennacl::matrix_base< NumericT > const &  A,
viennacl::vector_expression< const LhsT, const RhsT, OpT > const &  x 
)

Definition at line 275 of file prod.hpp.

template<typename LhsT1 , typename RhsT1 , typename OpT1 , typename LhsT2 , typename RhsT2 , typename OpT2 >
viennacl::vector_expression< const viennacl::matrix_expression<const LhsT1, const RhsT1, OpT1>, const viennacl::vector_expression<const LhsT2, const RhsT2, OpT2>, viennacl::op_prod > viennacl::linalg::prod ( viennacl::matrix_expression< const LhsT1, const RhsT1, OpT1 > const &  A,
viennacl::vector_expression< const LhsT2, const RhsT2, OpT2 > const &  x 
)

Definition at line 290 of file prod.hpp.

template<typename SparseMatrixType , typename SCALARTYPE >
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value, viennacl::matrix_expression<const SparseMatrixType, const matrix_base <SCALARTYPE>, op_prod > >::type viennacl::linalg::prod ( const SparseMatrixType &  sp_mat,
const viennacl::matrix_base< SCALARTYPE > &  d_mat 
)

Definition at line 307 of file prod.hpp.

template<typename SparseMatrixType , typename SCALARTYPE >
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value, viennacl::matrix_expression< const SparseMatrixType, const viennacl::matrix_expression<const viennacl::matrix_base<SCALARTYPE>, const viennacl::matrix_base<SCALARTYPE>, op_trans>, viennacl::op_prod > >::type viennacl::linalg::prod ( const SparseMatrixType &  A,
viennacl::matrix_expression< const viennacl::matrix_base< SCALARTYPE >, const viennacl::matrix_base< SCALARTYPE >, op_trans > const &  B 
)

Definition at line 324 of file prod.hpp.

template<typename NumericT >
viennacl::matrix_expression<const compressed_matrix<NumericT>, const compressed_matrix<NumericT>, op_prod > viennacl::linalg::prod ( compressed_matrix< NumericT > const &  A,
compressed_matrix< NumericT > const &  B 
)

Sparse matrix-matrix product with compressed_matrix objects.

Definition at line 342 of file prod.hpp.

template<typename SparseMatrixType , typename NumericT >
vector_expression<const SparseMatrixType, const vector_base<NumericT>, op_prod > viennacl::linalg::prod ( const SparseMatrixType &  A,
const vector_base< NumericT > &  x 
)

Generic matrix-vector product with user-provided sparse matrix type.

Definition at line 355 of file prod.hpp.

template<class SCALARTYPE , unsigned int ALIGNMENT>
void viennacl::linalg::prod_impl ( const viennacl::vandermonde_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector_base< SCALARTYPE > &  vec,
viennacl::vector_base< SCALARTYPE > &  result 
)

Carries out matrix-vector multiplication with a vandermonde_matrix.

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

Parameters
matThe matrix
vecThe vector
resultThe result vector

Definition at line 48 of file vandermonde_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::prod_impl ( viennacl::hankel_matrix< NumericT, AlignmentV > const &  A,
viennacl::vector_base< NumericT > const &  vec,
viennacl::vector_base< NumericT > &  result 
)

Carries out matrix-vector multiplication with a hankel_matrix.

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

Parameters
AThe matrix
vecThe vector
resultThe result vector

Definition at line 49 of file hankel_matrix_operations.hpp.

template<class SCALARTYPE , unsigned int ALIGNMENT>
void viennacl::linalg::prod_impl ( const viennacl::toeplitz_matrix< SCALARTYPE, ALIGNMENT > &  mat,
const viennacl::vector_base< SCALARTYPE > &  vec,
viennacl::vector_base< SCALARTYPE > &  result 
)

Carries out matrix-vector multiplication with a toeplitz_matrix.

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

Parameters
matThe matrix
vecThe vector
resultThe result vector

Definition at line 49 of file toeplitz_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::prod_impl ( viennacl::circulant_matrix< NumericT, AlignmentV > const &  mat,
viennacl::vector_base< NumericT > const &  vec,
viennacl::vector_base< NumericT > &  result 
)

Carries out matrix-vector multiplication with a circulant_matrix.

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

Parameters
matThe matrix
vecThe vector
resultThe result vector

Definition at line 49 of file circulant_matrix_operations.hpp.

template<typename SparseMatrixType , class ScalarType >
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value>::type viennacl::linalg::prod_impl ( const SparseMatrixType &  mat,
const viennacl::vector_base< ScalarType > &  vec,
viennacl::vector_base< ScalarType > &  result 
)

Carries out matrix-vector multiplication involving a sparse matrix type.

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

Parameters
matThe matrix
vecThe vector
resultThe result vector

Definition at line 92 of file sparse_matrix_operations.hpp.

template<typename SparseMatrixType , class ScalarType >
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value>::type viennacl::linalg::prod_impl ( const SparseMatrixType &  sp_mat,
const viennacl::matrix_base< ScalarType > &  d_mat,
viennacl::matrix_base< ScalarType > &  result 
)

Carries out matrix-matrix multiplication first matrix being sparse.

Implementation of the convenience expression result = prod(sp_mat, d_mat);

Parameters
sp_matThe sparse matrix
d_matThe dense matrix
resultThe result matrix (dense)

Definition at line 133 of file sparse_matrix_operations.hpp.

template<typename SparseMatrixType , class ScalarType >
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value>::type viennacl::linalg::prod_impl ( const SparseMatrixType &  sp_mat,
const viennacl::matrix_expression< const viennacl::matrix_base< ScalarType >, const viennacl::matrix_base< ScalarType >, viennacl::op_trans > &  d_mat,
viennacl::matrix_base< ScalarType > &  result 
)

Carries out matrix-matrix multiplication first matrix being sparse, and the second transposed.

Implementation of the convenience expression result = prod(sp_mat, d_mat);

Parameters
sp_matThe sparse matrix
d_matThe dense matrix (transposed)
resultThe result matrix (dense)

Definition at line 173 of file sparse_matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::prod_impl ( const viennacl::compressed_matrix< NumericT > &  A,
const viennacl::compressed_matrix< NumericT > &  B,
viennacl::compressed_matrix< NumericT > &  C 
)

Carries out sparse_matrix-sparse_matrix multiplication for CSR matrices.

Implementation of the convenience expression C = prod(A, B); Based on computing C(i, :) = A(i, :) * B via merging the respective rows of B

Parameters
ALeft factor
BRight factor
CResult matrix

Definition at line 217 of file sparse_matrix_operations.hpp.

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

Carries out matrix-matrix multiplication.

Implementation of C = prod(A, B);

Definition at line 519 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarType >
void viennacl::linalg::prod_impl ( const viennacl::matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  A,
const matrix_base< NumericT > &  B,
matrix_base< NumericT > &  C,
ScalarType  alpha,
ScalarType  beta 
)

Carries out matrix-matrix multiplication.

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

Definition at line 560 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarType >
void viennacl::linalg::prod_impl ( const matrix_base< NumericT > &  A,
const viennacl::matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  B,
matrix_base< NumericT > &  C,
ScalarType  alpha,
ScalarType  beta 
)

Carries out matrix-matrix multiplication.

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

Definition at line 603 of file matrix_operations.hpp.

template<typename NumericT , typename ScalarType >
void viennacl::linalg::prod_impl ( const viennacl::matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  A,
const viennacl::matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  B,
matrix_base< NumericT > &  C,
ScalarType  alpha,
ScalarType  beta 
)

Carries out matrix-matrix multiplication.

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

Definition at line 643 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::prod_impl ( const matrix_base< NumericT > &  mat,
const vector_base< NumericT > &  vec,
vector_base< NumericT > &  result 
)

Carries out matrix-vector multiplication.

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

Parameters
matThe matrix
vecThe vector
resultThe result vector

Definition at line 438 of file matrix_operations.hpp.

template<typename NumericT >
void viennacl::linalg::prod_impl ( const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  mat_trans,
const vector_base< NumericT > &  vec,
vector_base< NumericT > &  result 
)

Carries out matrix-vector multiplication with a transposed matrix.

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

Parameters
mat_transThe transposed matrix proxy
vecThe vector
resultThe result vector

Definition at line 479 of file matrix_operations.hpp.

template<typename SparseMatrixType , class SCALARTYPE , unsigned int ALIGNMENT>
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value, vector_expression<const SparseMatrixType, const vector<SCALARTYPE, ALIGNMENT>, op_prod > >::type viennacl::linalg::prod_impl ( const SparseMatrixType &  mat,
const vector< SCALARTYPE, ALIGNMENT > &  vec 
)
template<typename SCALARTYPE >
void viennacl::linalg::qr_method_nsm ( viennacl::matrix< SCALARTYPE > &  A,
viennacl::matrix< SCALARTYPE > &  Q,
std::vector< SCALARTYPE > &  D,
std::vector< SCALARTYPE > &  E 
)

Definition at line 796 of file qr-method.hpp.

template<typename SCALARTYPE >
void viennacl::linalg::qr_method_sym ( viennacl::matrix< SCALARTYPE > &  A,
viennacl::matrix< SCALARTYPE > &  Q,
std::vector< SCALARTYPE > &  D 
)
Examples:
qr_method.cpp.

Definition at line 806 of file qr-method.hpp.

template<typename SCALARTYPE >
void viennacl::linalg::qr_method_sym ( viennacl::matrix< SCALARTYPE > &  A,
viennacl::matrix< SCALARTYPE > &  Q,
viennacl::vector_base< SCALARTYPE > &  D 
)

Definition at line 817 of file qr-method.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::radix2 ( viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > &  in,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  batch_num,
NumericT  sign = NumericT(-1),
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Radix-2 1D algorithm for computing Fourier transformation.

Works only on power-of-two sizes of data. Serial implementation has o(n * lg n) complexity. This is a Cooley-Tukey algorithm

Definition at line 162 of file fft_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::radix2 ( viennacl::vector< NumericT, AlignmentV > &  in,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  batch_num,
NumericT  sign = NumericT(-1),
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Radix-2 2D algorithm for computing Fourier transformation.

Works only on power-of-two sizes of data. Serial implementation has o(n * lg n) complexity. This is a Cooley-Tukey algorithm

Definition at line 198 of file fft_operations.hpp.

template<typename NumericT >
void viennacl::linalg::real_to_complex ( viennacl::vector_base< NumericT > const &  in,
viennacl::vector_base< NumericT > &  out,
vcl_size_t  size 
)

Create complex vector from real vector (even elements(2*k) = real part, odd elements(2*k+1) = imaginary part)

Examples:
fft.cpp.

Definition at line 390 of file fft_operations.hpp.

template<typename MatrixType , typename VectorType >
void viennacl::linalg::recoverQ ( MatrixType const &  A,
VectorType const &  betas,
MatrixType &  Q,
MatrixType &  R 
)
Examples:
qr.cpp.

Definition at line 564 of file qr.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::reorder ( viennacl::vector< NumericT, AlignmentV > &  in,
vcl_size_t  size,
vcl_size_t  stride,
vcl_size_t  bits_datasize,
vcl_size_t  batch_num,
viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::DATA_ORDER  data_order = viennacl::linalg::host_based::detail::fft::FFT_DATA_ORDER::ROW_MAJOR 
)

Definition at line 125 of file fft_operations.hpp.

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

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

Definition at line 452 of file fft_operations.hpp.

template<typename NumericT >
viennacl::vector_expression< const viennacl::matrix_base<NumericT>, const viennacl::matrix_base<NumericT>, viennacl::op_row_sum > viennacl::linalg::row_sum ( viennacl::matrix_base< NumericT > const &  A)

User interface function for computing the sum of all elements of each row of a matrix.

Definition at line 77 of file sum.hpp.

template<typename LHS , typename RHS , typename OP >
viennacl::vector_expression<const viennacl::matrix_expression<const LHS, const RHS, OP>, const viennacl::matrix_expression<const LHS, const RHS, OP>, viennacl::op_row_sum> viennacl::linalg::row_sum ( viennacl::matrix_expression< const LHS, const RHS, OP > const &  A)

User interface function for computing the sum of all elements of each row of a matrix specified by a matrix operation.

Typical use case: vector<double> my_sums = viennacl::linalg::row_sum(A + B);

Definition at line 92 of file sum.hpp.

template<typename NumericT >
void viennacl::linalg::row_sum_impl ( const matrix_base< NumericT > &  A,
vector_base< NumericT > &  result 
)

Definition at line 679 of file matrix_operations.hpp.

template<typename NumericT , typename S1 >
void viennacl::linalg::scaled_rank_1_update ( matrix_base< NumericT > &  mat1,
S1 const &  alpha,
vcl_size_t  len_alpha,
bool  reciprocal_alpha,
bool  flip_sign_alpha,
const vector_base< NumericT > &  vec1,
const vector_base< NumericT > &  vec2 
)

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

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

Parameters
mat1The matrix to be updated
alphaThe scaling factor (either a viennacl::scalar<>, float, or double)
len_alphaLength of the buffer for an eventual final reduction step (currently always '1')
reciprocal_alphaUse 1/alpha instead of alpha
flip_sign_alphaUse -alpha instead of alpha
vec1The first vector
vec2The second vector

Definition at line 859 of file matrix_operations.hpp.

template<typename MatrixType , typename VectorType >
VectorType viennacl::linalg::solve ( const MatrixType &  matrix,
VectorType const &  rhs,
mixed_precision_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
matrixThe system matrix
rhsThe load vector
tagSolver configuration tag
Returns
The result vector

Definition at line 96 of file mixed_precision_cg.hpp.

template<typename MatrixType , typename VectorType >
VectorType viennacl::linalg::solve ( const MatrixType &  matrix,
VectorType const &  rhs,
mixed_precision_cg_tag const &  tag,
viennacl::linalg::no_precond   
)

Definition at line 190 of file mixed_precision_cg.hpp.

template<typename NumericT , typename SolverTagT >
matrix_base<NumericT> viennacl::linalg::solve ( const matrix_base< NumericT > &  A,
const matrix_base< NumericT > &  B,
SolverTagT  tag 
)

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

Parameters
AThe system matrix
BThe matrix of load vectors
tagDispatch tag

Definition at line 301 of file direct_solve.hpp.

template<typename NumericT , typename SolverTagT >
matrix_base<NumericT> viennacl::linalg::solve ( const matrix_base< NumericT > &  A,
const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  proxy,
SolverTagT  tag 
)

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

Parameters
AThe system matrix
proxyThe transposed load vector
tagDispatch tag

Definition at line 318 of file direct_solve.hpp.

template<typename NumericT , typename SolverTagT >
matrix_base<NumericT> viennacl::linalg::solve ( const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  proxy,
const matrix_base< NumericT > &  B,
SolverTagT  tag 
)

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

Parameters
proxyThe transposed system matrix proxy
BThe matrix of load vectors
tagDispatch tag

Definition at line 335 of file direct_solve.hpp.

template<typename MatrixT , typename VectorT , typename PreconditionerT >
VectorT viennacl::linalg::solve ( MatrixT const &  matrix,
VectorT const &  rhs,
cg_tag const &  tag,
PreconditionerT const &  precond 
)

Implementation of the preconditioned conjugate gradient solver, generic implementation for non-ViennaCL types.

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

Parameters
matrixThe system matrix
rhsThe load vector
tagSolver configuration tag
precondA preconditioner. Precondition operation is done via member function apply()
Returns
The result vector

Definition at line 339 of file cg.hpp.

template<typename IndexT , typename NumericT , typename PreconditionerT >
std::vector<NumericT> viennacl::linalg::solve ( std::vector< std::map< IndexT, NumericT > > const &  A,
std::vector< NumericT > const &  rhs,
cg_tag const &  tag,
PreconditionerT const &  precond 
)

Convenience overload for calling the CG solver using types from the C++ STL.

A std::vector<std::map<T, U> > matrix is convenient for e.g. finite element assembly. It is not the fastest option for setting up a system, but often it is fast enough - particularly for just trying things out.

Definition at line 350 of file cg.hpp.

template<typename NumericT , typename SolverTagT >
matrix_base<NumericT> viennacl::linalg::solve ( const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  proxy_A,
const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  proxy_B,
SolverTagT  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_AThe transposed system matrix proxy
proxy_BThe transposed matrix of load vectors, where the solution is directly written to
tagDispatch tag

Definition at line 352 of file direct_solve.hpp.

template<typename MatrixT , typename VectorT >
VectorT viennacl::linalg::solve ( MatrixT const &  matrix,
VectorT const &  rhs,
cg_tag const &  tag 
)

Entry point for the unpreconditioned CG method.

Parameters
matrixThe system matrix
rhsRight hand side vector (load vector)
tagA BiCGStab tag providing relative tolerances, etc.

Definition at line 372 of file cg.hpp.

template<typename NumericT >
vector<NumericT> viennacl::linalg::solve ( const matrix_base< NumericT > &  mat,
const vector_base< NumericT > &  vec,
viennacl::linalg::upper_tag const &  tag 
)

Convenience function for result = solve(mat, vec, upper_tag()); for an upper triangular solve.

Creates a temporary result vector and forwards the request to inplace_solve()

Parameters
matThe system matrix
vecThe load vector
tagDispatch tag

Definition at line 492 of file direct_solve.hpp.

template<typename MatrixT , typename VectorT , typename PreconditionerT >
VectorT viennacl::linalg::solve ( MatrixT const &  matrix,
VectorT const &  rhs,
bicgstab_tag const &  tag,
PreconditionerT const &  precond 
)
template<typename IndexT , typename NumericT , typename PreconditionerT >
std::vector<NumericT> viennacl::linalg::solve ( std::vector< std::map< IndexT, NumericT > > const &  A,
std::vector< NumericT > const &  rhs,
bicgstab_tag const &  tag,
PreconditionerT const &  precond 
)

Convenience overload for calling the preconditioned BiCGStab solver using types from the C++ STL.

A std::vector<std::map<T, U> > matrix is convenient for e.g. finite element assembly. It is not the fastest option for setting up a system, but often it is fast enough - particularly for just trying things out.

Definition at line 508 of file bicgstab.hpp.

template<typename NumericT >
vector<NumericT> viennacl::linalg::solve ( const matrix_base< NumericT > &  mat,
const vector_base< NumericT > &  vec,
viennacl::linalg::unit_upper_tag const &  tag 
)

Convenience function for result = solve(mat, vec, upper_tag()); for an upper triangular solve with unit diagonal.

Creates a temporary result vector and forwards the request to inplace_solve()

Parameters
matThe system matrix
vecThe load vector
tagDispatch tag

Definition at line 511 of file direct_solve.hpp.

template<typename MatrixT , typename VectorT >
VectorT viennacl::linalg::solve ( MatrixT const &  matrix,
VectorT const &  rhs,
bicgstab_tag const &  tag 
)

Entry point for the unpreconditioned BiCGStab method.

Parameters
matrixThe system matrix
rhsRight hand side vector (load vector)
tagA BiCGStab tag providing relative tolerances, etc.

Definition at line 530 of file bicgstab.hpp.

template<typename NumericT >
vector<NumericT> viennacl::linalg::solve ( const matrix_base< NumericT > &  mat,
const vector_base< NumericT > &  vec,
viennacl::linalg::lower_tag const &  tag 
)

Convenience function for result = solve(mat, vec, upper_tag()); for a lower triangular solve.

Creates a temporary result vector and forwards the request to inplace_solve()

Parameters
matThe system matrix
vecThe load vector
tagDispatch tag

Definition at line 530 of file direct_solve.hpp.

template<typename NumericT >
vector<NumericT> viennacl::linalg::solve ( const matrix_base< NumericT > &  mat,
const vector_base< NumericT > &  vec,
viennacl::linalg::unit_lower_tag const &  tag 
)

Convenience function for result = solve(mat, vec, upper_tag()); for a lower triangular solve with unit diagonal.

Creates a temporary result vector and forwards the request to inplace_solve()

Parameters
matThe system matrix
vecThe load vector
tagDispatch tag

Definition at line 549 of file direct_solve.hpp.

template<typename NumericT , typename SolverTagT >
vector<NumericT> viennacl::linalg::solve ( const matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &  proxy,
const vector_base< NumericT > &  vec,
SolverTagT 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
proxyThe transposed system matrix proxy
vecThe load vector, where the solution is directly written to
tagDispatch tag

Definition at line 566 of file direct_solve.hpp.

template<typename MatrixT , typename VectorT , typename PreconditionerT >
VectorT viennacl::linalg::solve ( MatrixT const &  matrix,
VectorT const &  rhs,
gmres_tag const &  tag,
PreconditionerT const &  precond 
)

Definition at line 636 of file gmres.hpp.

template<typename IndexT , typename NumericT , typename PreconditionerT >
std::vector<NumericT> viennacl::linalg::solve ( std::vector< std::map< IndexT, NumericT > > const &  A,
std::vector< NumericT > const &  rhs,
gmres_tag const &  tag,
PreconditionerT const &  precond 
)

Convenience overload for calling the preconditioned BiCGStab solver using types from the C++ STL.

A std::vector<std::map<T, U> > matrix is convenient for e.g. finite element assembly. It is not the fastest option for setting up a system, but often it is fast enough - particularly for just trying things out.

Definition at line 647 of file gmres.hpp.

template<typename MatrixT , typename VectorT >
VectorT viennacl::linalg::solve ( MatrixT const &  A,
VectorT const &  rhs,
gmres_tag const &  tag 
)

Entry point for the unpreconditioned GMRES method.

Parameters
AThe system matrix
rhsRight hand side vector (load vector)
tagA BiCGStab tag providing relative tolerances, etc.

Definition at line 670 of file gmres.hpp.

template<typename NumericT >
viennacl::scalar_expression< const viennacl::vector_base<NumericT>, const viennacl::vector_base<NumericT>, viennacl::op_sum > viennacl::linalg::sum ( viennacl::vector_base< NumericT > const &  x)

User interface function for computing the sum of all elements of a vector.

Definition at line 45 of file sum.hpp.

template<typename LHS , typename RHS , typename OP >
viennacl::scalar_expression<const viennacl::vector_expression<const LHS, const RHS, OP>, const viennacl::vector_expression<const LHS, const RHS, OP>, viennacl::op_sum> viennacl::linalg::sum ( viennacl::vector_expression< const LHS, const RHS, OP > const &  x)

User interface function for computing the sum of all elements of a vector specified by a vector operation.

Typical use case: double my_sum = viennacl::linalg::sum(x + y);

Definition at line 60 of file sum.hpp.

template<typename T >
void viennacl::linalg::sum_cpu ( vector_base< T > const &  vec,
T &  result 
)

Computes the sum of a vector with final reduction on the CPU.

Parameters
vecThe vector
resultThe result scalar

Definition at line 1102 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename S2 >
void viennacl::linalg::sum_cpu ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
S2 &  result 
)

Computes the sum of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 1132 of file vector_operations.hpp.

template<typename T >
void viennacl::linalg::sum_impl ( vector_base< T > const &  vec,
scalar< T > &  result 
)
template<typename LHS , typename RHS , typename OP , typename T >
void viennacl::linalg::sum_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
scalar< T > &  result 
)
template<typename NumericT >
void viennacl::linalg::sum_impl ( vector_base< NumericT > const &  vec,
viennacl::scalar< NumericT > &  result 
)

Computes the sum of a vector with final reduction on the device (GPU, etc.)

Parameters
vecThe vector
resultThe result scalar

Definition at line 1059 of file vector_operations.hpp.

template<typename LHS , typename RHS , typename OP , typename NumericT >
void viennacl::linalg::sum_impl ( viennacl::vector_expression< LHS, RHS, OP > const &  vec,
viennacl::scalar< NumericT > &  result 
)

Computes the sum of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.

Parameters
vecThe vector expression
resultThe result scalar

Definition at line 1089 of file vector_operations.hpp.

template<typename SCALARTYPE , unsigned int ALIGNMENT>
void viennacl::linalg::svd ( viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &  A,
viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &  QL,
viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &  QR 
)

Computes the singular value decomposition of a matrix A. Experimental in 1.3.x.

Parameters
AThe input matrix. Will be overwritten with a diagonal matrix containing the singular values on return
QLThe left orthogonal matrix
QRThe right orthogonal matrix

Definition at line 492 of file svd.hpp.

template<typename S1 , typename S2 >
viennacl::enable_if< viennacl::is_scalar<S1>::value && viennacl::is_scalar<S2>::value >::type viennacl::linalg::swap ( S1 &  s1,
S2 &  s2 
)

Swaps the contents of two scalars.

Parameters
s1The first scalar
s2The second scalar

Definition at line 213 of file scalar_operations.hpp.

template<typename SCALARTYPE , typename VectorType >
void viennacl::linalg::tql1 ( vcl_size_t  n,
VectorType &  d,
VectorType &  e 
)

Definition at line 41 of file tql2.hpp.

template<typename SCALARTYPE , typename VectorType , typename F >
void viennacl::linalg::tql2 ( matrix_base< SCALARTYPE, F > &  Q,
VectorType &  d,
VectorType &  e 
)
Examples:
tql2.cpp.

Definition at line 131 of file tql2.hpp.

template<typename NumericT , typename SizeT , typename DistanceT >
void viennacl::linalg::trans ( const matrix_expression< const matrix_base< NumericT, SizeT, DistanceT >, const matrix_base< NumericT, SizeT, DistanceT >, op_trans > &  proxy,
matrix_base< NumericT > &  temp_trans 
)

Definition at line 83 of file matrix_operations.hpp.

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

Inplace_transpose matrix.

Examples:
fft.cpp.

Definition at line 329 of file fft_operations.hpp.

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

Transpose matrix.

Definition at line 359 of file fft_operations.hpp.

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

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

Parameters
vec1The vector to which the value should be assigned
alphaThe value to be assigned
up_to_internal_sizeWhether 'alpha' should be written to padded memory as well. This is used for setting all entries to zero, including padded memory.

Definition at line 187 of file vector_operations.hpp.

template<typename T >
void viennacl::linalg::vector_swap ( vector_base< T > &  vec1,
vector_base< T > &  vec2 
)

Swaps the contents of two vectors, data is copied.

Parameters
vec1The first vector (or -range, or -slice)
vec2The second vector (or -range, or -slice)

Definition at line 218 of file vector_operations.hpp.

Variable Documentation

const std::string viennacl::linalg::SVD_FINAL_ITER_UPDATE_KERNEL = "final_iter_update"

Definition at line 53 of file qr-method-common.hpp.

const std::string viennacl::linalg::SVD_GIVENS_PREV_KERNEL = "givens_prev"

Definition at line 52 of file qr-method-common.hpp.

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

Definition at line 55 of file qr-method-common.hpp.

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

Definition at line 56 of file qr-method-common.hpp.

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

Definition at line 57 of file qr-method-common.hpp.

const std::string viennacl::linalg::SVD_HOUSEHOLDER_UPDATE_QR_KERNEL = "house_update_QR"

Definition at line 49 of file qr-method-common.hpp.

const std::string viennacl::linalg::SVD_INVERSE_SIGNS_KERNEL = "inverse_signs"

Definition at line 51 of file qr-method-common.hpp.

const std::string viennacl::linalg::SVD_MATRIX_TRANSPOSE_KERNEL = "transpose_inplace"

Definition at line 50 of file qr-method-common.hpp.

const std::string viennacl::linalg::SVD_UPDATE_QR_COLUMN_KERNEL = "update_qr_column"

Definition at line 54 of file qr-method-common.hpp.