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_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 | 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_tag |
A tag for the conjugate gradient Used for supplying solver parameters and for dispatching the solve() function. 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_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 detail::amg::amg_tag | amg_tag |
typedef viennacl::linalg::detail::spai::spai_tag | spai_tag |
typedef viennacl::linalg::detail::spai::fspai_tag | fspai_tag |
Functions | |
template<class SCALARTYPE , unsigned int ALIGNMENT> | |
void | convolve_i (viennacl::vector< SCALARTYPE, ALIGNMENT > &input1, viennacl::vector< SCALARTYPE, ALIGNMENT > &input2, viennacl::vector< SCALARTYPE, ALIGNMENT > &output) |
template<typename 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 | 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 InternalT1 , typename InternalT2 > | |
void | amg_setup (InternalT1 &A, InternalT1 &P, InternalT2 &pointvector, amg_tag &tag) |
Setup AMG preconditioner. More... | |
template<typename MatrixT , typename InternalT1 , typename InternalT2 > | |
void | amg_init (MatrixT const &mat, InternalT1 &A, InternalT1 &P, InternalT2 &pointvector, amg_tag &tag) |
Initialize AMG preconditioner. More... | |
template<typename InternalT1 , typename InternalT2 > | |
void | amg_transform_cpu (InternalT1 &A, InternalT1 &P, InternalT1 &R, InternalT2 &A_setup, InternalT2 &P_setup, amg_tag &tag) |
Save operators after setup phase for CPU computation. More... | |
template<typename InternalT1 , typename InternalT2 > | |
void | amg_transform_gpu (InternalT1 &A, InternalT1 &P, InternalT1 &R, InternalT2 &A_setup, InternalT2 &P_setup, amg_tag &tag, viennacl::context ctx) |
Save operators after setup phase for GPU computation. More... | |
template<typename InternalVectorT , typename SparseMatrixT > | |
void | amg_setup_apply (InternalVectorT &result, InternalVectorT &rhs, InternalVectorT &residual, SparseMatrixT const &A, amg_tag const &tag) |
Setup data structures for precondition phase. More... | |
template<typename InternalVectorT , typename SparseMatrixT > | |
void | amg_setup_apply (InternalVectorT &result, InternalVectorT &rhs, InternalVectorT &residual, SparseMatrixT const &A, amg_tag const &tag, viennacl::context ctx) |
Setup data structures for precondition phase for later use on the GPU. More... | |
template<typename NumericT , typename SparseMatrixT > | |
void | amg_lu (boost::numeric::ublas::compressed_matrix< NumericT > &op, boost::numeric::ublas::permutation_matrix<> &permutation, SparseMatrixT const &A) |
Pre-compute LU factorization for direct solve (ublas library). More... | |
template<typename MatrixT , typename NumericT > | |
viennacl::vector< NumericT > | solve (MatrixT const &A, viennacl::vector_base< NumericT > const &rhs, bicgstab_tag const &tag, viennacl::linalg::no_precond) |
Implementation of a pipelined stabilized Bi-conjugate gradient solver. More... | |
template<typename MatrixT , typename VectorT > | |
VectorT | solve (MatrixT const &matrix, VectorT const &rhs, bicgstab_tag const &tag) |
Implementation of the stabilized Bi-conjugate gradient solver. More... | |
template<typename MatrixT , typename VectorT > | |
VectorT | solve (MatrixT const &matrix, VectorT const &rhs, bicgstab_tag const &tag, viennacl::linalg::no_precond) |
template<typename MatrixT , typename VectorT , typename PreconditionerT > | |
VectorT | solve (MatrixT const &matrix, VectorT const &rhs, bicgstab_tag const &tag, PreconditionerT const &precond) |
Implementation of the preconditioned stabilized Bi-conjugate gradient solver. 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 (std::vector< NumericT > const &diagonal, std::vector< NumericT > const &superdiagonal, std::vector< NumericT > &eigenvalues) |
bisect The bisection algorithm computes the eigevalues of a symmetric tridiagonal matrix. More... | |
template<typename NumericT > | |
bool | bisect (viennacl::vector< NumericT > const &diagonal, viennacl::vector< NumericT > const &superdiagonal, viennacl::vector< NumericT > &eigenvalues) |
bisect The bisection algorithm computes the eigevalues of a symmetric tridiagonal matrix. More... | |
template<typename MatrixT , typename NumericT > | |
viennacl::vector< NumericT > | solve (MatrixT const &A, viennacl::vector< NumericT > const &rhs, cg_tag const &tag, viennacl::linalg::no_precond) |
Implementation of the standard conjugate gradient algorithm (no preconditioner), specialized for ViennaCL types. 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 MatrixT , typename VectorT > | |
VectorT | solve (MatrixT const &matrix, VectorT const &rhs, cg_tag const &tag) |
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 , typename SizeT , typename SparseVectorT > | |
NumericT | setup_w (viennacl::compressed_matrix< NumericT > const &A, SizeT row, SparseVectorT &w) |
Dispatcher overload for extracting the row of nonzeros of a compressed matrix. More... | |
template<typename NumericT , typename SizeT , typename SparseVectorT > | |
NumericT | setup_w (std::vector< std::map< SizeT, NumericT > > const &A, SizeT row, SparseVectorT &w) |
Dispatcher overload for extracting the row of nonzeros of a STL-grown sparse matrix. More... | |
template<typename SparseMatrixTypeT , typename NumericT , typename SizeT > | |
void | precondition (SparseMatrixTypeT const &A, std::vector< std::map< SizeT, NumericT > > &output, 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< NumericT > | 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() More... | |
template<typename NumericT , typename SolverTagT > | |
matrix_base< NumericT > | 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() More... | |
template<typename NumericT , typename SolverTagT > | |
matrix_base< NumericT > | 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() More... | |
template<typename NumericT , typename SolverTagT > | |
matrix_base< NumericT > | 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() 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< NumericT > | 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. More... | |
template<typename NumericT > | |
vector< NumericT > | 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. More... | |
template<typename NumericT > | |
vector< NumericT > | 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. More... | |
template<typename NumericT > | |
vector< NumericT > | 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. More... | |
template<typename NumericT , typename SolverTagT > | |
vector< NumericT > | 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() 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 MatrixType , typename ScalarType > | |
viennacl::vector< ScalarType > | solve (MatrixType const &A, viennacl::vector< ScalarType > const &rhs, gmres_tag const &tag, viennacl::linalg::no_precond) |
Implementation of a GMRES solver without preconditioner. More... | |
template<typename MatrixT , typename VectorT , typename PreconditionerT > | |
VectorT | solve (MatrixT const &matrix, VectorT const &rhs, gmres_tag const &tag, PreconditionerT const &precond) |
Implementation of the GMRES solver. More... | |
template<typename MatrixT , typename VectorT > | |
VectorT | solve (MatrixT const &A, VectorT const &rhs, gmres_tag const &tag) |
Convenience overload of the solve() function using GMRES. Per default, no preconditioner is used. 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 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_prod > | inner_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_prod > | inner_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_prod > | inner_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_prod > | inner_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_prod > | inner_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 > | |
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. 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 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_prod > | 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. 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 > | |
void | inclusive_scan (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2) |
This function implements an inclusive scan. 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 > | |
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_max > | max (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_max > | max (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_min > | min (viennacl::vector_base< ScalarType > const &v1) |
template<typename ScalarType > | |
viennacl::scalar_expression< const viennacl::vector_base< ScalarType >, const viennacl::vector_base< ScalarType >, viennacl::op_min > | min (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_min > | min (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 > | |
T | 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_1 > | norm_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_1 > | norm_1 (viennacl::vector_expression< const LHS, const RHS, OP > const &vector) |
template<typename T , typename A > | |
T | 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 > | norm_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_2 > | norm_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_frobenius > | norm_frobenius (const matrix_base< NumericT > &A) |
template<typename T , typename A > | |
T | 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_inf > | norm_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_inf > | norm_inf (viennacl::vector_expression< const LHS, const RHS, OP > const &vector) |
template<typename MatrixT > | |
viennacl::result_of::cpu_value_type< typename MatrixT::value_type >::type | eig (MatrixT const &matrix, power_iter_tag const &tag) |
Implementation of the calculation of eigenvalues using poweriteration. 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_prod > | prod (viennacl::matrix_base< NumericT > const &A, viennacl::matrix_base< NumericT > const &B) |
template<typename NumericT > | |
viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans >, viennacl::op_mat_mat_prod > | prod (viennacl::matrix_base< NumericT > const &A, viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans > const &B) |
template<typename NumericT > | |
viennacl::matrix_expression< const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans >, const viennacl::matrix_base< NumericT >, viennacl::op_mat_mat_prod > | prod (viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans > const &A, viennacl::matrix_base< NumericT > const &B) |
template<typename NumericT > | |
viennacl::matrix_expression< const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans >, const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans >, viennacl::op_mat_mat_prod > | prod (viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans > const &A, viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans > const &B) |
template<typename NumericT > | |
viennacl::vector_expression< const viennacl::matrix_base< NumericT >, const viennacl::vector_base< NumericT >, viennacl::op_prod > | prod (viennacl::matrix_base< NumericT > const &matrix, viennacl::vector_base< NumericT > const &vector) |
template<typename NumericT > | |
viennacl::vector_expression< const viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans >, const viennacl::vector_base< NumericT >, viennacl::op_prod > | prod (viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans > const &matrix, viennacl::vector_base< NumericT > const &vector) |
template<typename SparseMatrixType , class SCALARTYPE > | |
viennacl::enable_if< viennacl::is_any_sparse_matrix< SparseMatrixType >::value, vector_expression< const SparseMatrixType, const vector_base< SCALARTYPE >, op_prod > >::type | prod (const SparseMatrixType &mat, const vector_base< SCALARTYPE > &vec) |
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 StructuredMatrixType , class SCALARTYPE > | |
viennacl::enable_if< viennacl::is_any_dense_structured_matrix< StructuredMatrixType >::value, vector_expression< const StructuredMatrixType, const vector_base< SCALARTYPE >, op_prod > >::type | prod (const StructuredMatrixType &mat, const vector_base< SCALARTYPE > &vec) |
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 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 OP , typename NumericT > | |
viennacl::scalar_expression< const vector_base< NumericT >, const vector_base< NumericT >, viennacl::op_reduce_vector< OP > > | reduce (vector_base< NumericT > const &vector) |
template<typename ROP , typename LHS , typename RHS , typename OP > | |
viennacl::scalar_expression< const viennacl::vector_expression< LHS, RHS, OP >, const viennacl::vector_expression< LHS, RHS, OP >, viennacl::op_reduce_vector< ROP > > | reduce (viennacl::vector_expression< LHS, RHS, OP > const &vector) |
template<typename ROP , typename NumericT > | |
viennacl::vector_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, viennacl::op_reduce_rows< ROP > > | reduce_rows (matrix_base< NumericT > const &mat) |
template<typename ROP , typename NumericT > | |
viennacl::vector_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, viennacl::op_reduce_columns< ROP > > | reduce_columns (matrix_base< NumericT > const &mat) |
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 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 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 , typename F > | |
void | tql2 (matrix_base< SCALARTYPE, F > &Q, VectorType &d, VectorType &e) |
template<typename ScalarType > | |
void | inplace_tred2 (boost::numeric::ublas::matrix< ScalarType > const &A, vcl_size_t block_size=1) |
Inplace reduction of a hermitian (or real symmetric) to tridiagonal form using householder similarity transforms (preserving eigenvalues) More... | |
template<class SCALARTYPE , unsigned int ALIGNMENT> | |
void | prod_impl (const viennacl::vandermonde_matrix< SCALARTYPE, ALIGNMENT > &mat, const viennacl::vector_base< SCALARTYPE > &vec, viennacl::vector_base< SCALARTYPE > &result) |
Carries out matrix-vector multiplication with a vandermonde_matrix. More... | |
template<typename T , typename ScalarType1 > | |
void | av (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha) |
template<typename T , typename ScalarType1 , typename ScalarType2 > | |
void | avbv (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta) |
template<typename T , typename ScalarType1 , typename ScalarType2 > | |
void | avbv_v (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta) |
template<typename T > | |
void | vector_assign (vector_base< T > &vec1, const T &alpha, bool up_to_internal_size=false) |
Assign a constant value to a vector (-range/-slice) More... | |
template<typename T > | |
void | vector_swap (vector_base< T > &vec1, vector_base< T > &vec2) |
Swaps the contents of two vectors, data is copied. More... | |
template<typename T , typename OP > | |
void | element_op (vector_base< T > &vec1, vector_expression< const vector_base< T >, const vector_base< T >, OP > 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 T > | |
void | plane_rotation (vector_base< T > &vec1, vector_base< T > &vec2, T alpha, T beta) |
Computes a plane rotation of two vectors. 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" |
Provides all linear algebra operations which are not covered by operator overloads.
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 84 of file matrix_operations.hpp.
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 112 of file matrix_operations.hpp.
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 147 of file matrix_operations.hpp.
void viennacl::linalg::amg_init | ( | MatrixT const & | mat, |
InternalT1 & | A, | ||
InternalT1 & | P, | ||
InternalT2 & | pointvector, | ||
amg_tag & | tag | ||
) |
void viennacl::linalg::amg_lu | ( | boost::numeric::ublas::compressed_matrix< NumericT > & | op, |
boost::numeric::ublas::permutation_matrix<> & | permutation, | ||
SparseMatrixT const & | A | ||
) |
Pre-compute LU factorization for direct solve (ublas library).
Speeds up precondition phase as this is computed only once overall instead of once per iteration.
op | Operator matrix for direct solve |
permutation | Permutation matrix which saves the factorization result |
A | Operator matrix on coarsest level |
void viennacl::linalg::amg_setup | ( | InternalT1 & | A, |
InternalT1 & | P, | ||
InternalT2 & | pointvector, | ||
amg_tag & | tag | ||
) |
void viennacl::linalg::amg_setup_apply | ( | InternalVectorT & | result, |
InternalVectorT & | rhs, | ||
InternalVectorT & | residual, | ||
SparseMatrixT const & | A, | ||
amg_tag const & | tag | ||
) |
void viennacl::linalg::amg_setup_apply | ( | InternalVectorT & | result, |
InternalVectorT & | rhs, | ||
InternalVectorT & | residual, | ||
SparseMatrixT const & | A, | ||
amg_tag const & | tag, | ||
viennacl::context | ctx | ||
) |
Setup data structures for precondition phase for later use on the GPU.
result | Result vector on all levels |
rhs | RHS vector on all levels |
residual | Residual vector on all levels |
A | Operators matrices on all levels from setup phase |
tag | AMG preconditioner tag |
ctx | Optional context in which the auxiliary objects are created (one out of multiple OpenCL contexts, CUDA, host) |
void viennacl::linalg::amg_transform_cpu | ( | InternalT1 & | A, |
InternalT1 & | P, | ||
InternalT1 & | R, | ||
InternalT2 & | A_setup, | ||
InternalT2 & | P_setup, | ||
amg_tag & | tag | ||
) |
Save operators after setup phase for CPU computation.
A | Operator matrices on all levels on the CPU |
P | Prolongation/Interpolation operators on all levels on the CPU |
R | Restriction operators on all levels on the CPU |
A_setup | Operators matrices on all levels from setup phase |
P_setup | Prolongation/Interpolation operators on all levels from setup phase |
tag | AMG preconditioner tag |
void viennacl::linalg::amg_transform_gpu | ( | InternalT1 & | A, |
InternalT1 & | P, | ||
InternalT1 & | R, | ||
InternalT2 & | A_setup, | ||
InternalT2 & | P_setup, | ||
amg_tag & | tag, | ||
viennacl::context | ctx | ||
) |
Save operators after setup phase for GPU computation.
A | Operator matrices on all levels on the GPU |
P | Prolongation/Interpolation operators on all levels on the GPU |
R | Restriction operators on all levels on the GPU |
A_setup | Operators matrices on all levels from setup phase |
P_setup | Prolongation/Interpolation operators on all levels from setup phase |
tag | AMG preconditioner tag |
ctx | Optional context in which the auxiliary objects are created (one out of multiple OpenCL contexts, CUDA, host) |
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.
s1 | The first (GPU) scalar |
s2 | The second (GPU) scalar |
alpha | The scalar alpha in the operation |
len_alpha | If 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_alpha | If true, then s2 / alpha instead of s2 * alpha is computed |
flip_sign_alpha | If true, then (-alpha) is used instead of alpha |
Definition at line 65 of file scalar_operations.hpp.
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.
s1 | The first (GPU) scalar |
s2 | The second (GPU) scalar |
alpha | The scalar alpha in the operation |
len_alpha | If 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_alpha | If true, then s2 / alpha instead of s2 * alpha is computed |
flip_sign_alpha | If true, then (-alpha) is used instead of alpha |
s3 | The third (GPU) scalar |
beta | The scalar beta in the operation |
len_beta | If 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_beta | If true, then s2 / beta instead of s2 * beta is computed |
flip_sign_beta | If true, then (-beta) is used instead of beta |
Definition at line 114 of file scalar_operations.hpp.
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.
s1 | The first (GPU) scalar |
s2 | The second (GPU) scalar |
alpha | The scalar alpha in the operation |
len_alpha | If 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_alpha | If true, then s2 / alpha instead of s2 * alpha is computed |
flip_sign_alpha | If true, then (-alpha) is used instead of alpha |
s3 | The third (GPU) scalar |
beta | The scalar beta in the operation |
len_beta | If 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_beta | If true, then s2 / beta instead of s2 * beta is computed |
flip_sign_beta | If true, then (-beta) is used instead of beta |
Definition at line 170 of file scalar_operations.hpp.
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 50 of file vector_operations.hpp.
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 79 of file vector_operations.hpp.
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 116 of file vector_operations.hpp.
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.
A | The matrix from which the vectors will be extracted of. |
dh | The vector in which the diagonal of the matrix will be stored in. |
sh | The vector in which the superdiagonal of the matrix will be stored in. |
Definition at line 858 of file matrix_operations.hpp.
bool viennacl::linalg::bisect | ( | std::vector< NumericT > const & | diagonal, |
std::vector< NumericT > const & | superdiagonal, | ||
std::vector< NumericT > & | eigenvalues | ||
) |
bisect The bisection algorithm computes the eigevalues of a symmetric tridiagonal matrix.
diagonal | diagonal elements of the matrix |
superdiagonal | superdiagonal elements of the matrix |
eigenvalues | Vectors with the eigenvalues in ascending order |
overloaded function template: std::vectors as parameters
Definition at line 59 of file bisect_gpu.hpp.
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.
alphas | Elements of the main diagonal |
betas | Elements of the secondary diagonal |
Definition at line 75 of file bisect.hpp.
bool viennacl::linalg::bisect | ( | viennacl::vector< NumericT > const & | diagonal, |
viennacl::vector< NumericT > const & | superdiagonal, | ||
viennacl::vector< NumericT > & | eigenvalues | ||
) |
bisect The bisection algorithm computes the eigevalues of a symmetric tridiagonal matrix.
diagonal | diagonal elements of the matrix |
superdiagonal | superdiagonal elements of the matrix |
eigenvalues | Vectors with the eigenvalues in ascending order |
overloaded function template: viennacl::vectors as parameters
Definition at line 121 of file bisect_gpu.hpp.
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
Definition at line 235 of file fft_operations.hpp.
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)
Definition at line 421 of file fft_operations.hpp.
void viennacl::linalg::convolve_i | ( | viennacl::vector< SCALARTYPE, ALIGNMENT > & | input1, |
viennacl::vector< SCALARTYPE, ALIGNMENT > & | input2, | ||
viennacl::vector< SCALARTYPE, ALIGNMENT > & | output | ||
) |
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.
A | The matrix where to copy from. |
V | The vector to fill with data. |
row_start | The number of the first row to copy. |
col_start | The number of the first column to copy. |
copy_col | Set to TRUE to copy a column, FALSE to copy a row. |
Definition at line 899 of file matrix_operations.hpp.
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.
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.
viennacl::result_of::cpu_value_type<typename MatrixT::value_type>::type viennacl::linalg::eig | ( | MatrixT const & | matrix, |
power_iter_tag const & | tag | ||
) |
Implementation of the calculation of eigenvalues using poweriteration.
matrix | The system matrix |
tag | Tag with termination factor |
Definition at line 73 of file power_iter.hpp.
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.
matrix | The system matrix |
tag | Tag with several options for the lanczos algorithm |
Definition at line 430 of file lanczos.hpp.
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 | ||
) |
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)
vec1 | The result vector (or -range, or -slice) |
proxy | The proxy object holding v2, v3 and the operation |
Definition at line 227 of file vector_operations.hpp.
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().
A | The result matrix (or -range, or -slice) |
proxy | The proxy object holding B, C, and the operation |
Definition at line 659 of file matrix_operations.hpp.
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 | ||
) |
void viennacl::linalg::exclusive_scan | ( | vector_base< NumericT > & | vec1, |
vector_base< NumericT > & | vec2 | ||
) |
This function implements an exclusive scan.
vec1 | Input vector: Gets overwritten by the routine. |
vec2 | The output vector. |
Definition at line 1123 of file matrix_operations.hpp.
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.
Q | The matrix to be updated. |
tmp1 | Vector with data from the tql2 algorithm. |
tmp2 | Vector with data from the tql2 algorithm. |
l | Data from the tql2 algorithm. |
m | Data from the tql2 algorithm. |
Definition at line 1049 of file matrix_operations.hpp.
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.
A | The matrix to be updated. |
D | The normalized householder vector. |
start | The repetition counter. |
Definition at line 938 of file matrix_operations.hpp.
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.
A | The matrix to be updated. |
D | The normalized householder vector. |
Definition at line 975 of file matrix_operations.hpp.
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.
Q | The matrix to be updated. |
D | The householder vector. |
A_size1 | size1 of matrix A |
Definition at line 1010 of file matrix_operations.hpp.
void viennacl::linalg::inclusive_scan | ( | vector_base< NumericT > & | vec1, |
vector_base< NumericT > & | vec2 | ||
) |
This function implements an inclusive scan.
vec1 | Input vector: Gets overwritten by the routine. |
vec2 | The output vector. |
Definition at line 1087 of file matrix_operations.hpp.
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.
vec | The vector |
Definition at line 817 of file vector_operations.hpp.
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.
vec | The vector expression |
Definition at line 843 of file vector_operations.hpp.
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 | ||
) |
Definition at line 89 of file inner_prod.hpp.
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 105 of file inner_prod.hpp.
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 120 of file inner_prod.hpp.
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 134 of file inner_prod.hpp.
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 149 of file inner_prod.hpp.
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 162 of file inner_prod.hpp.
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.
vec1 | The first vector |
vec2 | The second vector |
result | The result scalar (on the gpu) |
Definition at line 431 of file vector_operations.hpp.
void viennacl::linalg::inner_prod_cpu | ( | viennacl::vector_expression< LHS, RHS, OP > const & | vec1, |
vector_base< T > const & | vec2, | ||
T & | result | ||
) |
Definition at line 461 of file vector_operations.hpp.
void viennacl::linalg::inner_prod_cpu | ( | vector_base< T > const & | vec1, |
viennacl::vector_expression< LHS, RHS, OP > const & | vec2, | ||
T & | result | ||
) |
Definition at line 472 of file vector_operations.hpp.
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 484 of file vector_operations.hpp.
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.
x | The common vector |
y_tuple | A collection of vector, all of the same size. |
result | The result scalar (on the gpu). Needs to match the number of elements in y_tuple |
Definition at line 502 of file vector_operations.hpp.
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.
vec1 | The first vector |
vec2 | The second vector |
result | The result scalar (on the gpu) |
Definition at line 359 of file vector_operations.hpp.
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 389 of file vector_operations.hpp.
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 400 of file vector_operations.hpp.
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 412 of file vector_operations.hpp.
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.
A | A dense ViennaCL matrix to be factored |
block_size | The block size to be used. |
std::vector<typename MatrixType::value_type> viennacl::linalg::inplace_qr | ( | MatrixType & | A, |
vcl_size_t | block_size = 16 |
||
) |
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.
A | A matrix holding the Householder reflectors in the lower triangular part. Typically obtained from calling inplace_qr() on the original matrix |
betas | The scalars beta_i for each Householder reflector (I - beta_i v_i v_i^T) |
b | The vector b to which the result Q^T b is directly written to |
void viennacl::linalg::inplace_qr_apply_trans_Q | ( | viennacl::matrix< T, F, ALIGNMENT > const & | A, |
VectorType1 const & | betas, | ||
viennacl::vector< T, A2 > & | b | ||
) |
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.
mat | The matrix |
vec | The vector |
tag | The solver tag (lower_tag, unit_lower_tag, unit_upper_tag, or upper_tag) |
Definition at line 212 of file sparse_matrix_operations.hpp.
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)
A | The system matrix |
B | The matrix of row vectors, where the solution is directly written to |
Definition at line 217 of file direct_solve.hpp.
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)
A | The system matrix |
proxy_B | The proxy for the transposed matrix of row vectors, where the solution is directly written to |
Definition at line 230 of file direct_solve.hpp.
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.
mat | The matrix |
vec | The vector |
tag | The solver tag (lower_tag, unit_lower_tag, unit_upper_tag, or upper_tag) |
Definition at line 250 of file sparse_matrix_operations.hpp.
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)
proxy_A | The transposed system matrix proxy |
B | The matrix holding the load vectors, where the solution is directly written to |
Definition at line 251 of file direct_solve.hpp.
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)
proxy_A | The transposed system matrix proxy |
proxy_B | The transposed matrix holding the load vectors, where the solution is directly written to |
Definition at line 271 of file direct_solve.hpp.
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.
mat | The system matrix (a dense matrix for which only the respective triangular form is used) |
vec | The right hand side vector |
tag | The tag (either lower_tag, unit_lower_tag, upper_tag, or unit_upper_tag) |
Definition at line 453 of file direct_solve.hpp.
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.
proxy | The transposed system matrix (a dense matrix for which only the respective triangular form is used) |
vec | The right hand side vector |
tag | The tag (either lower_tag, unit_lower_tag, upper_tag, or unit_upper_tag) |
Definition at line 468 of file direct_solve.hpp.
void viennacl::linalg::inplace_tred2 | ( | boost::numeric::ublas::matrix< ScalarType > const & | A, |
vcl_size_t | block_size = 1 |
||
) |
void viennacl::linalg::lu_factorize | ( | matrix< NumericT, viennacl::row_major > & | A | ) |
void viennacl::linalg::lu_factorize | ( | matrix< NumericT, viennacl::column_major > & | A | ) |
void viennacl::linalg::lu_substitute | ( | matrix< NumericT, F1, AlignmentV1 > const & | A, |
matrix< NumericT, F2, AlignmentV2 > & | B | ||
) |
void viennacl::linalg::lu_substitute | ( | matrix< NumericT, F, MatAlignmentV > const & | A, |
vector< NumericT, VecAlignmentV > & | vec | ||
) |
void viennacl::linalg::matrix_assign | ( | matrix_base< NumericT > & | mat, |
NumericT | s, | ||
bool | clear = false |
||
) |
Definition at line 181 of file matrix_operations.hpp.
void viennacl::linalg::matrix_column | ( | const matrix_base< NumericT > & | A, |
unsigned int | j, | ||
vector_base< NumericT > & | v | ||
) |
Definition at line 310 of file matrix_operations.hpp.
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 234 of file matrix_operations.hpp.
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 260 of file matrix_operations.hpp.
void viennacl::linalg::matrix_diagonal_assign | ( | matrix_base< NumericT > & | mat, |
NumericT | s | ||
) |
Definition at line 207 of file matrix_operations.hpp.
void viennacl::linalg::matrix_row | ( | const matrix_base< NumericT > & | A, |
unsigned int | i, | ||
vector_base< NumericT > & | v | ||
) |
Definition at line 285 of file matrix_operations.hpp.
NumericT viennacl::linalg::max | ( | std::vector< NumericT > const & | v1 | ) |
Definition at line 47 of file maxmin.hpp.
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.
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.
void viennacl::linalg::max_cpu | ( | vector_base< T > const & | vec, |
T & | result | ||
) |
Computes the maximum of a vector with final reduction on the CPU.
vec | The vector |
result | The result scalar |
Definition at line 899 of file vector_operations.hpp.
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.
vec | The vector expression |
result | The result scalar |
Definition at line 929 of file vector_operations.hpp.
void viennacl::linalg::max_impl | ( | vector_base< T > const & | vec, |
scalar< T > & | result | ||
) |
void viennacl::linalg::max_impl | ( | viennacl::vector_expression< LHS, RHS, OP > const & | vec, |
scalar< T > & | result | ||
) |
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.
vec | The vector |
result | The result scalar |
Definition at line 856 of file vector_operations.hpp.
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.
vec | The vector expression |
result | The result scalar |
Definition at line 886 of file vector_operations.hpp.
NumericT viennacl::linalg::min | ( | std::vector< NumericT > const & | v1 | ) |
Definition at line 91 of file maxmin.hpp.
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.
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.
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.
void viennacl::linalg::min_cpu | ( | vector_base< T > const & | vec, |
T & | result | ||
) |
Computes the minimum of a vector with final reduction on the CPU.
vec | The vector |
result | The result scalar |
Definition at line 985 of file vector_operations.hpp.
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.
vec | The vector expression |
result | The result scalar |
Definition at line 1015 of file vector_operations.hpp.
void viennacl::linalg::min_impl | ( | vector_base< T > const & | vec, |
scalar< T > & | result | ||
) |
void viennacl::linalg::min_impl | ( | viennacl::vector_expression< LHS, RHS, OP > const & | vec, |
scalar< T > & | result | ||
) |
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.
vec | The vector |
result | The result scalar |
Definition at line 942 of file vector_operations.hpp.
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.
vec | The vector expression |
result | The result scalar |
Definition at line 972 of file vector_operations.hpp.
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.
Definition at line 267 of file fft_operations.hpp.
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.
V | Input matrix |
W | First factor |
H | Second factor |
conf | A configuration object holding tolerances and the like |
T viennacl::linalg::norm_1 | ( | std::vector< T, A > const & | v1 | ) |
Definition at line 61 of file norm_1.hpp.
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.
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.
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.
vec | The vector |
result | The result scalar |
Definition at line 585 of file vector_operations.hpp.
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.
vec | The vector expression |
result | The result scalar |
Definition at line 616 of file vector_operations.hpp.
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.
vec | The vector expression |
result | The result scalar |
Definition at line 570 of file vector_operations.hpp.
void viennacl::linalg::norm_1_impl | ( | vector_base< T > const & | vec, |
scalar< T > & | result | ||
) |
Computes the l^1-norm of a vector - dispatcher interface.
vec | The vector |
result | The result scalar |
Definition at line 538 of file vector_operations.hpp.
void viennacl::linalg::norm_1_impl | ( | viennacl::vector_expression< LHS, RHS, OP > const & | vec, |
scalar< T > & | result | ||
) |
T viennacl::linalg::norm_2 | ( | std::vector< T, A > const & | v1 | ) |
Definition at line 86 of file norm_2.hpp.
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 102 of file norm_2.hpp.
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 115 of file norm_2.hpp.
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.
vec | The vector |
result | The result scalar |
Definition at line 677 of file vector_operations.hpp.
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.
vec | The vector expression |
result | The result scalar |
Definition at line 708 of file vector_operations.hpp.
void viennacl::linalg::norm_2_impl | ( | vector_base< T > const & | vec, |
scalar< T > & | result | ||
) |
Computes the l^2-norm of a vector - dispatcher interface.
vec | The vector |
result | The result scalar |
Definition at line 632 of file vector_operations.hpp.
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.
vec | The vector expression |
result | The result scalar |
Definition at line 663 of file vector_operations.hpp.
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.
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.
A | The matrix |
result | The result scalar |
Note that if A is strided or off-set, then a copy will be created.
Definition at line 372 of file matrix_operations.hpp.
void viennacl::linalg::norm_frobenius_impl | ( | matrix_base< T > const & | A, |
scalar< T > & | result | ||
) |
Computes the Frobenius norm of a matrix - dispatcher interface.
A | The matrix |
result | The result scalar |
Note that if A is strided or off-set, then a copy will be created.
Definition at line 342 of file matrix_operations.hpp.
T viennacl::linalg::norm_inf | ( | std::vector< T, A > const & | v1 | ) |
Definition at line 60 of file norm_inf.hpp.
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.
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.
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.
vec | The vector |
result | The result scalar |
Definition at line 769 of file vector_operations.hpp.
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.
vec | The vector expression |
result | The result scalar |
Definition at line 800 of file vector_operations.hpp.
void viennacl::linalg::norm_inf_impl | ( | vector_base< T > const & | vec, |
scalar< T > & | result | ||
) |
Computes the supremum-norm of a vector.
vec | The vector |
result | The result scalar |
Definition at line 724 of file vector_operations.hpp.
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.
vec | The vector expression |
result | The result scalar |
Definition at line 755 of file vector_operations.hpp.
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.
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.
vec1 | The first vector |
vec2 | The second vector |
Definition at line 797 of file matrix_operations.hpp.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
void viennacl::linalg::plane_rotation | ( | vector_base< T > & | vec1, |
vector_base< T > & | vec2, | ||
T | alpha, | ||
T | beta | ||
) |
Computes a plane rotation of two vectors.
Computes (x,y) <- (alpha * x + beta * y, -beta * x + alpha * y)
vec1 | The first vector |
vec2 | The second vector |
alpha | The first transformation coefficient (CPU scalar) |
beta | The second transformation coefficient (CPU scalar) |
Definition at line 1033 of file vector_operations.hpp.
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
A | The input matrix in CSR format // param tag An ichol0_tag in order to dispatch among several other preconditioners. |
void viennacl::linalg::precondition | ( | viennacl::compressed_matrix< NumericT > & | A, |
ilu0_tag const & | |||
) |
void viennacl::linalg::precondition | ( | SparseMatrixTypeT const & | A, |
std::vector< std::map< SizeT, NumericT > > & | output, | ||
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)
A | The input matrix. Either a compressed_matrix or of type std::vector< std::map<T, U> > |
output | The output matrix. Type requirements: const_iterator1 for iteration along rows, const_iterator2 for iteration along columns and write access via operator() |
tag | An ilut_tag in order to dispatch among several other preconditioners. |
VectorT viennacl::linalg::prod | ( | std::vector< std::vector< T, A1 >, A2 > const & | matrix, |
VectorT const & | vector | ||
) |
VectorT viennacl::linalg::prod | ( | std::vector< std::map< KEY, DATA, COMPARE, AMAP >, AVEC > const & | matrix, |
VectorT const & | vector | ||
) |
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 | ||
) |
viennacl::matrix_expression< const viennacl::matrix_base<NumericT>, const viennacl::matrix_expression<const viennacl::matrix_base<NumericT>, const viennacl::matrix_base<NumericT>, op_trans>, viennacl::op_mat_mat_prod > viennacl::linalg::prod | ( | viennacl::matrix_base< NumericT > const & | A, |
viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans > const & | B | ||
) |
viennacl::matrix_expression< const viennacl::matrix_expression<const viennacl::matrix_base<NumericT>, const viennacl::matrix_base<NumericT>, op_trans>, const viennacl::matrix_base<NumericT>, viennacl::op_mat_mat_prod > viennacl::linalg::prod | ( | viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans > const & | A, |
viennacl::matrix_base< NumericT > const & | B | ||
) |
viennacl::matrix_expression< const viennacl::matrix_expression<const viennacl::matrix_base<NumericT>, const viennacl::matrix_base<NumericT>, op_trans>, const viennacl::matrix_expression<const viennacl::matrix_base<NumericT>, const viennacl::matrix_base<NumericT>, op_trans>, viennacl::op_mat_mat_prod > viennacl::linalg::prod | ( | viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans > const & | A, |
viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans > const & | B | ||
) |
viennacl::vector_expression< const viennacl::matrix_base<NumericT>, const viennacl::vector_base<NumericT>, viennacl::op_prod > viennacl::linalg::prod | ( | viennacl::matrix_base< NumericT > const & | matrix, |
viennacl::vector_base< NumericT > const & | vector | ||
) |
viennacl::vector_expression< const viennacl::matrix_expression<const viennacl::matrix_base<NumericT>, const viennacl::matrix_base<NumericT>, op_trans>, const viennacl::vector_base<NumericT>, viennacl::op_prod > viennacl::linalg::prod | ( | viennacl::matrix_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, op_trans > const & | matrix, |
viennacl::vector_base< NumericT > const & | vector | ||
) |
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value, vector_expression<const SparseMatrixType, const vector_base<SCALARTYPE>, op_prod > >::type viennacl::linalg::prod | ( | const SparseMatrixType & | mat, |
const vector_base< SCALARTYPE > & | vec | ||
) |
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 | ||
) |
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 | ||
) |
viennacl::enable_if< viennacl::is_any_dense_structured_matrix<StructuredMatrixType>::value, vector_expression<const StructuredMatrixType, const vector_base<SCALARTYPE>, op_prod > >::type viennacl::linalg::prod | ( | const StructuredMatrixType & | mat, |
const vector_base< SCALARTYPE > & | vec | ||
) |
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);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 48 of file vandermonde_matrix_operations.hpp.
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);
A | The matrix |
vec | The vector |
result | The result vector |
Definition at line 49 of file hankel_matrix_operations.hpp.
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);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 49 of file toeplitz_matrix_operations.hpp.
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);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 49 of file circulant_matrix_operations.hpp.
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);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 92 of file sparse_matrix_operations.hpp.
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);
sp_mat | The sparse matrix |
d_mat | The dense matrix |
result | The result matrix (dense) |
Definition at line 133 of file sparse_matrix_operations.hpp.
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);
sp_mat | The sparse matrix |
d_mat | The dense matrix (transposed) |
result | The result matrix (dense) |
Definition at line 173 of file sparse_matrix_operations.hpp.
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 492 of file matrix_operations.hpp.
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 533 of file matrix_operations.hpp.
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 576 of file matrix_operations.hpp.
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 616 of file matrix_operations.hpp.
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);
mat | The matrix |
vec | The vector |
result | The result vector |
Definition at line 411 of file matrix_operations.hpp.
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;
mat_trans | The transposed matrix proxy |
vec | The vector |
result | The result vector |
Definition at line 452 of file matrix_operations.hpp.
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 | ||
) |
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.
void viennacl::linalg::qr_method_sym | ( | viennacl::matrix< SCALARTYPE > & | A, |
viennacl::matrix< SCALARTYPE > & | Q, | ||
std::vector< SCALARTYPE > & | D | ||
) |
Definition at line 806 of file qr-method.hpp.
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.
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.
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)
Definition at line 390 of file fft_operations.hpp.
void viennacl::linalg::recoverQ | ( | MatrixType const & | A, |
VectorType const & | betas, | ||
MatrixType & | Q, | ||
MatrixType & | R | ||
) |
viennacl::scalar_expression< const vector_base<NumericT>, const vector_base<NumericT>, viennacl::op_reduce_vector<OP> > viennacl::linalg::reduce | ( | vector_base< NumericT > const & | vector | ) |
Definition at line 39 of file reduce.hpp.
viennacl::scalar_expression< const viennacl::vector_expression<LHS, RHS, OP>, const viennacl::vector_expression<LHS, RHS, OP>, viennacl::op_reduce_vector<ROP> > viennacl::linalg::reduce | ( | viennacl::vector_expression< LHS, RHS, OP > const & | vector | ) |
Definition at line 50 of file reduce.hpp.
viennacl::vector_expression<const matrix_base<NumericT>, const matrix_base<NumericT>, viennacl::op_reduce_columns<ROP> > viennacl::linalg::reduce_columns | ( | matrix_base< NumericT > const & | mat | ) |
Definition at line 68 of file reduce.hpp.
viennacl::vector_expression<const matrix_base<NumericT>, const matrix_base<NumericT>, viennacl::op_reduce_rows<ROP> > viennacl::linalg::reduce_rows | ( | matrix_base< NumericT > const & | mat | ) |
Definition at line 60 of file reduce.hpp.
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.
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.
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);
mat1 | The matrix to be updated |
alpha | The scaling factor (either a viennacl::scalar<>, float, or double) |
len_alpha | Length of the buffer for an eventual final reduction step (currently always '1') |
reciprocal_alpha | Use 1/alpha instead of alpha |
flip_sign_alpha | Use -alpha instead of alpha |
vec1 | The first vector |
vec2 | The second vector |
Definition at line 816 of file matrix_operations.hpp.
NumericT viennacl::linalg::setup_w | ( | viennacl::compressed_matrix< NumericT > const & | A, |
SizeT | row, | ||
SparseVectorT & | w | ||
) |
NumericT viennacl::linalg::setup_w | ( | std::vector< std::map< SizeT, NumericT > > const & | A, |
SizeT | row, | ||
SparseVectorT & | w | ||
) |
viennacl::vector<NumericT> viennacl::linalg::solve | ( | MatrixT const & | A, |
viennacl::vector_base< NumericT > const & | rhs, | ||
bicgstab_tag const & | tag, | ||
viennacl::linalg::no_precond | |||
) |
Implementation of a pipelined stabilized Bi-conjugate gradient solver.
Definition at line 88 of file bicgstab.hpp.
viennacl::vector<NumericT> viennacl::linalg::solve | ( | MatrixT const & | A, |
viennacl::vector< NumericT > const & | rhs, | ||
cg_tag const & | tag, | ||
viennacl::linalg::no_precond | |||
) |
Implementation of the standard conjugate gradient algorithm (no preconditioner), specialized for ViennaCL types.
Pipelined version from A. T. Chronopoulos and C. W. Gear, J. Comput. Appl. Math. 25(2), 153–168 (1989)
A | The system matrix |
rhs | The load vector |
tag | Solver configuration tag |
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"
matrix | The system matrix |
rhs | The load vector |
tag | Solver configuration tag |
Definition at line 122 of file mixed_precision_cg.hpp.
viennacl::vector<ScalarType> viennacl::linalg::solve | ( | MatrixType const & | A, |
viennacl::vector< ScalarType > const & | rhs, | ||
gmres_tag const & | tag, | ||
viennacl::linalg::no_precond | |||
) |
Implementation of a GMRES solver without preconditioner.
Following algorithm 2.1 proposed by Walker in "A Simpler GMRES", but uses classical Gram-Schmidt instead of modified Gram-Schmidt for better parallelization.
A | The system matrix |
rhs | The load vector |
tag | Solver configuration tag |
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
matrix | The system matrix |
rhs | The load vector |
tag | Solver configuration tag |
precond | A preconditioner. Precondition operation is done via member function apply() |
VectorT viennacl::linalg::solve | ( | MatrixT const & | matrix, |
VectorT const & | rhs, | ||
bicgstab_tag const & | tag | ||
) |
Implementation of the stabilized Bi-conjugate gradient solver.
Following the description in "Iterative Methods for Sparse Linear Systems" by Y. Saad
matrix | The system matrix |
rhs | The load vector |
tag | Solver configuration tag |
Definition at line 212 of file bicgstab.hpp.
VectorT viennacl::linalg::solve | ( | MatrixT const & | matrix, |
VectorT const & | rhs, | ||
cg_tag const & | tag | ||
) |
VectorType viennacl::linalg::solve | ( | const MatrixType & | matrix, |
VectorType const & | rhs, | ||
mixed_precision_cg_tag const & | tag, | ||
viennacl::linalg::no_precond | |||
) |
Definition at line 245 of file mixed_precision_cg.hpp.
VectorT viennacl::linalg::solve | ( | MatrixT const & | matrix, |
VectorT const & | rhs, | ||
bicgstab_tag const & | tag, | ||
viennacl::linalg::no_precond | |||
) |
Definition at line 295 of file bicgstab.hpp.
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()
A | The system matrix |
B | The matrix of load vectors |
tag | Dispatch tag |
Definition at line 301 of file direct_solve.hpp.
VectorT viennacl::linalg::solve | ( | MatrixT const & | matrix, |
VectorT const & | rhs, | ||
bicgstab_tag const & | tag, | ||
PreconditionerT const & | precond | ||
) |
Implementation of the preconditioned stabilized Bi-conjugate gradient solver.
Following the description of the unpreconditioned case in "Iterative Methods for Sparse Linear Systems" by Y. Saad
matrix | The system matrix |
rhs | The load vector |
tag | Solver configuration tag |
precond | A preconditioner. Precondition operation is done via member function apply() |
Definition at line 311 of file bicgstab.hpp.
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()
A | The system matrix |
proxy | The transposed load vector |
tag | Dispatch tag |
Definition at line 318 of file direct_solve.hpp.
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()
proxy | The transposed system matrix proxy |
B | The matrix of load vectors |
tag | Dispatch tag |
Definition at line 335 of file direct_solve.hpp.
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()
proxy_A | The transposed system matrix proxy |
proxy_B | The transposed matrix of load vectors, where the solution is directly written to |
tag | Dispatch tag |
Definition at line 352 of file direct_solve.hpp.
VectorT viennacl::linalg::solve | ( | MatrixT const & | matrix, |
VectorT const & | rhs, | ||
gmres_tag const & | tag, | ||
PreconditionerT const & | precond | ||
) |
Implementation of the GMRES solver.
Following the algorithm proposed by Walker in "A Simpler GMRES"
matrix | The system matrix |
rhs | The load vector |
tag | Solver configuration tag |
precond | A preconditioner. Precondition operation is done via member function apply() |
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()
mat | The system matrix |
vec | The load vector |
tag | Dispatch tag |
Definition at line 492 of file direct_solve.hpp.
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()
mat | The system matrix |
vec | The load vector |
tag | Dispatch tag |
Definition at line 511 of file direct_solve.hpp.
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()
mat | The system matrix |
vec | The load vector |
tag | Dispatch tag |
Definition at line 530 of file direct_solve.hpp.
VectorT viennacl::linalg::solve | ( | MatrixT const & | A, |
VectorT const & | rhs, | ||
gmres_tag const & | tag | ||
) |
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()
mat | The system matrix |
vec | The load vector |
tag | Dispatch tag |
Definition at line 549 of file direct_solve.hpp.
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()
proxy | The transposed system matrix proxy |
vec | The load vector, where the solution is directly written to |
tag | Dispatch tag |
Definition at line 566 of file direct_solve.hpp.
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 | ||
) |
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.
s1 | The first scalar |
s2 | The second scalar |
Definition at line 213 of file scalar_operations.hpp.
void viennacl::linalg::tql2 | ( | matrix_base< SCALARTYPE, F > & | Q, |
VectorType & | d, | ||
VectorType & | e | ||
) |
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 56 of file matrix_operations.hpp.
void viennacl::linalg::transpose | ( | viennacl::matrix< NumericT, viennacl::row_major, AlignmentV > & | input | ) |
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.
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)
vec1 | The vector to which the value should be assigned |
alpha | The value to be assigned |
up_to_internal_size | Whether 'alpha' should be written to padded memory as well. This is used for setting all entries to zero, including padded memory. |
Definition at line 159 of file vector_operations.hpp.
void viennacl::linalg::vector_swap | ( | vector_base< T > & | vec1, |
vector_base< T > & | vec2 | ||
) |
Swaps the contents of two vectors, data is copied.
vec1 | The first vector (or -range, or -slice) |
vec2 | The second vector (or -range, or -slice) |
Definition at line 190 of file vector_operations.hpp.
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.