Namespace holding implementation details for linear algebra routines. Usually not of interest for a library user. More...
Namespaces | |
amg | |
Implementation namespace for algebraic multigrid preconditioner. | |
fft | |
spai | |
Implementation namespace for sparse approximate inverse preconditioner. | |
Classes | |
class | FastMatrix |
Internal helper class representing a row-major dense matrix used for the QR method for the purpose of computing eigenvalues. More... | |
class | ilu_vector_range |
Helper range class for representing a subvector of a larger buffer. More... | |
struct | InputData |
In this class the input matrix is stored. More... | |
struct | op_applier |
Worker class for decomposing expression templates. More... | |
struct | op_executor |
Worker class for decomposing expression templates. More... | |
struct | ResultDataLarge |
In this class the data of the result for large matrices is stored. More... | |
struct | ResultDataSmall |
In this class the data of the result for small matrices is stored. More... | |
class | z_handler |
handles the no_precond case at minimal overhead More... | |
class | z_handler< VectorT, viennacl::linalg::no_precond > |
Enumerations | |
enum | row_info_types { SPARSE_ROW_NORM_INF = 0, SPARSE_ROW_NORM_1, SPARSE_ROW_NORM_2, SPARSE_ROW_DIAGONAL } |
Functions | |
template<typename NumericT , typename OtherVectorT > | |
void | copy_vec_to_vec (viennacl::vector< NumericT > const &src, OtherVectorT &dest) |
overloaded function for copying vectors More... | |
template<typename OtherVectorT , typename NumericT > | |
void | copy_vec_to_vec (OtherVectorT const &src, viennacl::vector< NumericT > &dest) |
template<typename VectorT1 , typename VectorT2 > | |
void | copy_vec_to_vec (VectorT1 const &src, VectorT2 &dest) |
template<typename NumericT > | |
void | bisectSmall (const InputData< NumericT > &input, ResultDataSmall< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision) |
template<typename NumericT > | |
void | bisectLarge (const InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision) |
template<typename NumericT > | |
void | bisectLarge_OneIntervals (const InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision) |
template<typename NumericT > | |
void | bisectLarge_MultIntervals (const InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT precision) |
template<typename NumericT > | |
void | computeEigenvaluesLargeMatrix (InputData< NumericT > &input, ResultDataLarge< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision) |
template<typename NumericT > | |
bool | processResultDataLargeMatrix (ResultDataLarge< NumericT > &result, const unsigned int mat_size) |
template<typename NumericT > | |
void | computeEigenvaluesSmallMatrix (const InputData< NumericT > &input, ResultDataSmall< NumericT > &result, const unsigned int mat_size, const NumericT lg, const NumericT ug, const NumericT precision) |
template<typename NumericT > | |
void | processResultSmallMatrix (ResultDataSmall< NumericT > &result, const unsigned int mat_size) |
template<typename NumericT > | |
void | computeGerschgorin (std::vector< NumericT > &d, std::vector< NumericT > &s, unsigned int n, NumericT &lg, NumericT &ug) |
template<class T > | |
T | min (const T &lhs, const T &rhs) |
Minimum. More... | |
template<class T > | |
T | max (const T &lhs, const T &rhs) |
Maximum. More... | |
float | sign_f (const float &val) |
Sign of number (float) More... | |
double | sign_d (const double &val) |
Sign of number (double) More... | |
unsigned int | getNumBlocksLinear (const unsigned int num_threads, const unsigned int num_threads_block) |
template<typename NumericT > | |
void | extract_block_matrix (viennacl::compressed_matrix< NumericT > const &A, viennacl::compressed_matrix< NumericT > &diagonal_block_A, vcl_size_t start_index, vcl_size_t stop_index) |
Extracts a diagonal block from a larger system matrix. More... | |
template<typename NumericT , unsigned int AlignmentV> | |
void | level_scheduling_setup_impl (viennacl::compressed_matrix< NumericT, AlignmentV > const &LU, viennacl::vector< NumericT > const &diagonal_LU, std::list< viennacl::backend::mem_handle > &row_index_arrays, std::list< viennacl::backend::mem_handle > &row_buffers, std::list< viennacl::backend::mem_handle > &col_buffers, std::list< viennacl::backend::mem_handle > &element_buffers, std::list< vcl_size_t > &row_elimination_num_list, bool setup_U) |
template<typename NumericT , unsigned int AlignmentV> | |
void | level_scheduling_setup_L (viennacl::compressed_matrix< NumericT, AlignmentV > const &LU, viennacl::vector< NumericT > const &diagonal_LU, std::list< viennacl::backend::mem_handle > &row_index_arrays, std::list< viennacl::backend::mem_handle > &row_buffers, std::list< viennacl::backend::mem_handle > &col_buffers, std::list< viennacl::backend::mem_handle > &element_buffers, std::list< vcl_size_t > &row_elimination_num_list) |
template<typename NumericT , unsigned int AlignmentV> | |
void | level_scheduling_setup_U (viennacl::compressed_matrix< NumericT, AlignmentV > const &LU, viennacl::vector< NumericT > const &diagonal_LU, std::list< viennacl::backend::mem_handle > &row_index_arrays, std::list< viennacl::backend::mem_handle > &row_buffers, std::list< viennacl::backend::mem_handle > &col_buffers, std::list< viennacl::backend::mem_handle > &element_buffers, std::list< vcl_size_t > &row_elimination_num_list) |
template<typename NumericT > | |
void | level_scheduling_substitute (viennacl::vector< NumericT > &vec, std::list< viennacl::backend::mem_handle > const &row_index_arrays, std::list< viennacl::backend::mem_handle > const &row_buffers, std::list< viennacl::backend::mem_handle > const &col_buffers, std::list< viennacl::backend::mem_handle > const &element_buffers, std::list< vcl_size_t > const &row_elimination_num_list) |
template<typename NumericT , typename B > | |
bool | op_aliasing (vector_base< NumericT > const &, B const &) |
template<typename NumericT > | |
bool | op_aliasing (vector_base< NumericT > const &lhs, vector_base< NumericT > const &b) |
template<typename NumericT , typename LhsT , typename RhsT , typename OpT > | |
bool | op_aliasing (vector_base< NumericT > const &lhs, vector_expression< const LhsT, const RhsT, OpT > const &rhs) |
template<typename NumericT , typename B > | |
bool | op_aliasing (matrix_base< NumericT > const &, B const &) |
template<typename NumericT > | |
bool | op_aliasing (matrix_base< NumericT > const &lhs, matrix_base< NumericT > const &b) |
template<typename NumericT , typename LhsT , typename RhsT , typename OpT > | |
bool | op_aliasing (matrix_base< NumericT > const &lhs, matrix_expression< const LhsT, const RhsT, OpT > const &rhs) |
template<typename NumericT , typename SolverTagT > | |
void | inplace_solve_kernel (const matrix_base< NumericT > &A, const matrix_base< NumericT > &B, SolverTagT) |
Direct inplace solver for dense triangular systems using a single kernel launch. Matlab notation: A \ B. More... | |
template<typename NumericT , typename SolverTagT > | |
void | inplace_solve_kernel (matrix_base< NumericT > const &A, matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > &proxy_B, SolverTagT) |
Direct inplace solver for dense triangular systems with transposed right hand side using a single kernel launch. More... | |
template<typename NumericT , typename SolverTagT > | |
void | inplace_solve_kernel (matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > const &proxy_A, matrix_base< NumericT > &B, SolverTagT) |
Direct inplace solver for dense triangular systems that stem from transposed triangular systems. Uses a single kernel launch. More... | |
template<typename NumericT , typename SolverTagT > | |
void | inplace_solve_kernel (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 dense transposed triangular systems with transposed right hand side using a single kernel launch. Matlab notation: A' \ B'. More... | |
template<typename NumericT , typename SolverTagT > | |
void | inplace_solve_vec_kernel (const matrix_base< NumericT > &mat, const vector_base< NumericT > &vec, SolverTagT) |
template<typename NumericT , typename SolverTagT > | |
void | inplace_solve_vec_kernel (matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > const &proxy, const vector_base< NumericT > &vec, SolverTagT) |
Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems. Uses a single kernel launch. More... | |
template<typename MatrixT1 , typename MatrixT2 , typename SolverTagT > | |
void | inplace_solve_lower_impl (MatrixT1 const &A, MatrixT2 &B, SolverTagT) |
template<typename MatrixT1 , typename MatrixT2 > | |
void | inplace_solve_impl (MatrixT1 const &A, MatrixT2 &B, viennacl::linalg::lower_tag) |
template<typename MatrixT1 , typename MatrixT2 > | |
void | inplace_solve_impl (MatrixT1 const &A, MatrixT2 &B, viennacl::linalg::unit_lower_tag) |
template<typename MatrixT1 , typename MatrixT2 , typename SolverTagT > | |
void | inplace_solve_upper_impl (MatrixT1 const &A, MatrixT2 &B, SolverTagT) |
template<typename MatrixT1 , typename MatrixT2 > | |
void | inplace_solve_impl (MatrixT1 const &A, MatrixT2 &B, viennacl::linalg::upper_tag) |
template<typename MatrixT1 , typename MatrixT2 > | |
void | inplace_solve_impl (MatrixT1 const &A, MatrixT2 &B, viennacl::linalg::unit_upper_tag) |
template<typename MatrixT1 , typename VectorT , typename SolverTagT > | |
void | inplace_solve_lower_vec_impl (MatrixT1 const &A, VectorT &B, SolverTagT) |
template<typename MatrixT1 , typename VectorT > | |
void | inplace_solve_vec_impl (MatrixT1 const &A, VectorT &B, viennacl::linalg::lower_tag) |
template<typename MatrixT1 , typename VectorT > | |
void | inplace_solve_vec_impl (MatrixT1 const &A, VectorT &B, viennacl::linalg::unit_lower_tag) |
template<typename MatrixT1 , typename VectorT , typename SolverTagT > | |
void | inplace_solve_upper_vec_impl (MatrixT1 const &A, VectorT &B, SolverTagT) |
template<typename MatrixT1 , typename VectorT > | |
void | inplace_solve_vec_impl (MatrixT1 const &A, VectorT &B, viennacl::linalg::upper_tag) |
template<typename MatrixT1 , typename VectorT > | |
void | inplace_solve_vec_impl (MatrixT1 const &A, VectorT &B, viennacl::linalg::unit_upper_tag) |
template<typename SrcVectorT , typename DestVectorT > | |
void | gmres_copy_helper (SrcVectorT const &src, DestVectorT &dest, vcl_size_t len, vcl_size_t start=0) |
template<typename NumericT , typename DestVectorT > | |
void | gmres_copy_helper (viennacl::vector< NumericT > const &src, DestVectorT &dest, vcl_size_t len, vcl_size_t start=0) |
template<typename VectorT , typename NumericT > | |
void | gmres_setup_householder_vector (VectorT const &input_vec, VectorT &hh_vec, NumericT &beta, NumericT &mu, vcl_size_t j) |
Computes the householder vector 'hh_vec' which rotates 'input_vec' such that all entries below the j-th entry of 'v' become zero. More... | |
template<typename VectorT , typename NumericT > | |
void | gmres_householder_reflect (VectorT &x, VectorT const &h, NumericT beta) |
template<typename MatrixT , typename VectorT > | |
std::vector< typename viennacl::result_of::cpu_value_type < typename MatrixT::value_type > ::type > | lanczosPRO (MatrixT const &A, VectorT &r, vcl_size_t size, lanczos_tag const &tag) |
Implementation of the Lanczos PRO algorithm. More... | |
template<typename MatrixT , typename VectorT > | |
std::vector< typename viennacl::result_of::cpu_value_type < typename MatrixT::value_type > ::type > | lanczos (MatrixT const &A, VectorT &r, vcl_size_t size, lanczos_tag) |
Implementation of the lanczos algorithm without reorthogonalization. More... | |
template<typename MatrixT , typename VectorT > | |
std::vector< typename viennacl::result_of::cpu_value_type < typename MatrixT::value_type > ::type > | lanczosFRO (MatrixT const &A, VectorT &r, vcl_size_t size, lanczos_tag) |
Implementation of the Lanczos FRO algorithm. More... | |
template<typename ScalarType > | |
void | level_scheduling_substitute (vector< ScalarType > &vec, viennacl::backend::mem_handle const &row_index_array, viennacl::backend::mem_handle const &row_buffer, viennacl::backend::mem_handle const &col_buffer, viennacl::backend::mem_handle const &element_buffer, vcl_size_t num_rows) |
template<typename SCALARTYPE > | |
SCALARTYPE | pythag (SCALARTYPE a, SCALARTYPE b) |
template<typename SCALARTYPE > | |
SCALARTYPE | sign (SCALARTYPE val) |
template<typename VectorType > | |
VectorType::value_type | norm_lcl (VectorType const &x, vcl_size_t size) |
template<typename VectorType > | |
void | normalize (VectorType &x, vcl_size_t size) |
template<typename VectorType > | |
void | householder_vector (VectorType &v, vcl_size_t start) |
template<typename SCALARTYPE > | |
void | transpose (matrix_base< SCALARTYPE > &A) |
template<typename T > | |
void | cdiv (T xr, T xi, T yr, T yi, T &cdivr, T &cdivi) |
template<typename SCALARTYPE > | |
void | prepare_householder_vector (matrix_base< SCALARTYPE > &A, vector_base< SCALARTYPE > &D, vcl_size_t size, vcl_size_t row_start, vcl_size_t col_start, vcl_size_t start, bool is_column) |
template<typename SCALARTYPE > | |
void | final_iter_update_gpu (matrix_base< SCALARTYPE > &A, int n, int last_n, SCALARTYPE q, SCALARTYPE p) |
template<typename SCALARTYPE , typename VectorType > | |
void | update_float_QR_column_gpu (matrix_base< SCALARTYPE > &A, const VectorType &buf, viennacl::vector< SCALARTYPE > &buf_vcl, int m, int n, int last_n, bool) |
template<typename SCALARTYPE , typename MatrixT > | |
void | final_iter_update (MatrixT &A, int n, int last_n, SCALARTYPE q, SCALARTYPE p) |
template<typename SCALARTYPE , typename MatrixT > | |
void | update_float_QR_column (MatrixT &A, const std::vector< SCALARTYPE > &buf, int m, int n, int last_i, bool is_triangular) |
template<typename SCALARTYPE , typename VectorType > | |
void | hqr2 (viennacl::matrix< SCALARTYPE > &vcl_H, viennacl::matrix< SCALARTYPE > &V, VectorType &d, VectorType &e) |
template<typename SCALARTYPE > | |
bool | householder_twoside (matrix_base< SCALARTYPE > &A, matrix_base< SCALARTYPE > &Q, vector_base< SCALARTYPE > &D, vcl_size_t start) |
template<typename SCALARTYPE > | |
void | tridiagonal_reduction (matrix_base< SCALARTYPE > &A, matrix_base< SCALARTYPE > &Q) |
template<typename SCALARTYPE > | |
void | qr_method (viennacl::matrix< SCALARTYPE > &A, viennacl::matrix< SCALARTYPE > &Q, std::vector< SCALARTYPE > &D, std::vector< SCALARTYPE > &E, bool is_symmetric=true) |
template<typename MatrixType , typename VectorType > | |
MatrixType::value_type | setup_householder_vector_ublas (MatrixType const &A, VectorType &v, MatrixType &matrix_1x1, vcl_size_t j) |
template<typename MatrixType , typename VectorType > | |
viennacl::result_of::cpu_value_type < typename MatrixType::value_type >::type | setup_householder_vector_viennacl (MatrixType const &A, VectorType &v, MatrixType &matrix_1x1, vcl_size_t j) |
template<typename MatrixType , typename VectorType , typename ScalarType > | |
void | householder_reflect (MatrixType &A, VectorType &v, ScalarType beta, vcl_size_t j, vcl_size_t k) |
template<typename MatrixType , typename VectorType , typename ScalarType > | |
void | householder_reflect_ublas (MatrixType &A, VectorType &v, MatrixType &matrix_1x1, ScalarType beta, vcl_size_t j, vcl_size_t k) |
template<typename MatrixType , typename VectorType , typename ScalarType > | |
void | householder_reflect_viennacl (MatrixType &A, VectorType &v, MatrixType &matrix_1x1, ScalarType beta, vcl_size_t j, vcl_size_t k) |
template<typename MatrixType , typename VectorType , typename ScalarType > | |
void | householder_reflect (MatrixType &A, VectorType &v, ScalarType beta, vcl_size_t j) |
template<typename MatrixType , typename VectorType > | |
void | write_householder_to_A (MatrixType &A, VectorType const &v, vcl_size_t j) |
template<typename MatrixType , typename VectorType > | |
void | write_householder_to_A_ublas (MatrixType &A, VectorType const &v, vcl_size_t j) |
template<typename MatrixType , typename VectorType > | |
void | write_householder_to_A_viennacl (MatrixType &A, VectorType const &v, vcl_size_t j) |
template<typename MatrixType > | |
std::vector< typename MatrixType::value_type > | inplace_qr_ublas (MatrixType &A, vcl_size_t block_size=32) |
Implementation of inplace-QR factorization for a general Boost.uBLAS compatible matrix A. More... | |
template<typename MatrixType > | |
std::vector< typename viennacl::result_of::cpu_value_type < typename MatrixType::value_type >::type > | inplace_qr_viennacl (MatrixType &A, vcl_size_t block_size=16) |
Implementation of a OpenCL-only QR factorization for GPUs (or multi-core CPU). DEPRECATED! Use only if you're curious and interested in playing a bit with a GPU-only implementation. More... | |
template<typename MatrixType > | |
std::vector< typename viennacl::result_of::cpu_value_type < typename MatrixType::value_type >::type > | inplace_qr_hybrid (MatrixType &A, vcl_size_t block_size=16) |
Implementation of a hybrid QR factorization using uBLAS on the CPU and ViennaCL for GPUs (or multi-core CPU) More... | |
template<typename SparseMatrixType , typename SCALARTYPE , unsigned int VEC_ALIGNMENT> | |
viennacl::enable_if < viennacl::is_any_sparse_matrix < SparseMatrixType >::value > ::type | row_info (SparseMatrixType const &mat, vector< SCALARTYPE, VEC_ALIGNMENT > &vec, row_info_types info_selector) |
template<typename SparseMatrixType , class ScalarType , typename SOLVERTAG > | |
viennacl::enable_if < viennacl::is_any_sparse_matrix < SparseMatrixType >::value > ::type | block_inplace_solve (const matrix_expression< const SparseMatrixType, const SparseMatrixType, op_trans > &mat, viennacl::backend::mem_handle const &block_index_array, vcl_size_t num_blocks, viennacl::vector_base< ScalarType > const &mat_diagonal, viennacl::vector_base< ScalarType > &vec, SOLVERTAG tag) |
template<typename MatrixType , typename VectorType > | |
void | givens_prev (MatrixType &matrix, VectorType &tmp1, VectorType &tmp2, int n, int l, int k) |
template<typename MatrixType , typename VectorType > | |
void | change_signs (MatrixType &matrix, VectorType &signs, int n) |
template<typename MatrixType , typename CPU_VectorType > | |
void | svd_qr_shift (MatrixType &vcl_u, MatrixType &vcl_v, CPU_VectorType &q, CPU_VectorType &e) |
template<typename SCALARTYPE , unsigned int ALIGNMENT> | |
bool | householder_c (viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &A, viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &Q, viennacl::vector< SCALARTYPE, ALIGNMENT > &D, vcl_size_t row_start, vcl_size_t col_start) |
template<typename SCALARTYPE , unsigned int ALIGNMENT> | |
bool | householder_r (viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &A, viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &Q, viennacl::vector< SCALARTYPE, ALIGNMENT > &D, vcl_size_t row_start, vcl_size_t col_start) |
template<typename SCALARTYPE , unsigned int ALIGNMENT> | |
void | bidiag (viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &Ai, viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &QL, viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > &QR) |
Namespace holding implementation details for linear algebra routines. Usually not of interest for a library user.
Enumerator | |
---|---|
SPARSE_ROW_NORM_INF | |
SPARSE_ROW_NORM_1 | |
SPARSE_ROW_NORM_2 | |
SPARSE_ROW_DIAGONAL |
Definition at line 797 of file forwards.h.
void viennacl::linalg::detail::bidiag | ( | viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > & | Ai, |
viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > & | QL, | ||
viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > & | QR | ||
) |
void viennacl::linalg::detail::bisectLarge | ( | const InputData< NumericT > & | input, |
ResultDataLarge< NumericT > & | result, | ||
const unsigned int | mat_size, | ||
const NumericT | lg, | ||
const NumericT | ug, | ||
const NumericT | precision | ||
) |
Definition at line 93 of file bisect_kernel_calls.hpp.
void viennacl::linalg::detail::bisectLarge_MultIntervals | ( | const InputData< NumericT > & | input, |
ResultDataLarge< NumericT > & | result, | ||
const unsigned int | mat_size, | ||
const NumericT | precision | ||
) |
Definition at line 160 of file bisect_kernel_calls.hpp.
void viennacl::linalg::detail::bisectLarge_OneIntervals | ( | const InputData< NumericT > & | input, |
ResultDataLarge< NumericT > & | result, | ||
const unsigned int | mat_size, | ||
const NumericT | precision | ||
) |
Definition at line 128 of file bisect_kernel_calls.hpp.
void viennacl::linalg::detail::bisectSmall | ( | const InputData< NumericT > & | input, |
ResultDataSmall< NumericT > & | result, | ||
const unsigned int | mat_size, | ||
const NumericT | lg, | ||
const NumericT | ug, | ||
const NumericT | precision | ||
) |
Definition at line 59 of file bisect_kernel_calls.hpp.
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value>::type viennacl::linalg::detail::block_inplace_solve | ( | const matrix_expression< const SparseMatrixType, const SparseMatrixType, op_trans > & | mat, |
viennacl::backend::mem_handle const & | block_index_array, | ||
vcl_size_t | num_blocks, | ||
viennacl::vector_base< ScalarType > const & | mat_diagonal, | ||
viennacl::vector_base< ScalarType > & | vec, | ||
SOLVERTAG | tag | ||
) |
Definition at line 286 of file sparse_matrix_operations.hpp.
void viennacl::linalg::detail::cdiv | ( | T | xr, |
T | xi, | ||
T | yr, | ||
T | yi, | ||
T & | cdivr, | ||
T & | cdivi | ||
) |
Definition at line 142 of file qr-method-common.hpp.
void viennacl::linalg::detail::change_signs | ( | MatrixType & | matrix, |
VectorType & | signs, | ||
int | n | ||
) |
void viennacl::linalg::detail::computeEigenvaluesLargeMatrix | ( | InputData< NumericT > & | input, |
ResultDataLarge< NumericT > & | result, | ||
const unsigned int | mat_size, | ||
const NumericT | lg, | ||
const NumericT | ug, | ||
const NumericT | precision | ||
) |
Run the kernels to compute the eigenvalues for large matrices
input | handles to input data |
result | handles to result data |
mat_size | matrix size |
precision | desired precision of eigenvalues |
lg | lower limit of Gerschgorin interval |
ug | upper limit of Gerschgorin interval |
Definition at line 60 of file bisect_large.hpp.
void viennacl::linalg::detail::computeEigenvaluesSmallMatrix | ( | const InputData< NumericT > & | input, |
ResultDataSmall< NumericT > & | result, | ||
const unsigned int | mat_size, | ||
const NumericT | lg, | ||
const NumericT | ug, | ||
const NumericT | precision | ||
) |
Determine eigenvalues for matrices smaller than MAX_SMALL_MATRIX
input | handles to input data of kernel |
result | handles to result of kernel |
mat_size | matrix size |
lg | lower limit of Gerschgorin interval |
ug | upper limit of Gerschgorin interval |
precision | desired precision of eigenvalues |
Definition at line 61 of file bisect_small.hpp.
void viennacl::linalg::detail::computeGerschgorin | ( | std::vector< NumericT > & | d, |
std::vector< NumericT > & | s, | ||
unsigned int | n, | ||
NumericT & | lg, | ||
NumericT & | ug | ||
) |
Compute Gerschgorin interval for symmetric, tridiagonal matrix
d | diagonal elements |
s | superdiagonal elements |
n | size of matrix |
lg | lower limit of Gerschgorin interval |
ug | upper limit of Gerschgorin interval |
Definition at line 55 of file gerschgorin.hpp.
void viennacl::linalg::detail::copy_vec_to_vec | ( | viennacl::vector< NumericT > const & | src, |
OtherVectorT & | dest | ||
) |
overloaded function for copying vectors
Definition at line 44 of file bisect.hpp.
void viennacl::linalg::detail::copy_vec_to_vec | ( | OtherVectorT const & | src, |
viennacl::vector< NumericT > & | dest | ||
) |
Definition at line 50 of file bisect.hpp.
void viennacl::linalg::detail::copy_vec_to_vec | ( | VectorT1 const & | src, |
VectorT2 & | dest | ||
) |
Definition at line 56 of file bisect.hpp.
void viennacl::linalg::detail::extract_block_matrix | ( | viennacl::compressed_matrix< NumericT > const & | A, |
viennacl::compressed_matrix< NumericT > & | diagonal_block_A, | ||
vcl_size_t | start_index, | ||
vcl_size_t | stop_index | ||
) |
Extracts a diagonal block from a larger system matrix.
A | The full matrix |
diagonal_block_A | The output matrix, to which the extracted block is written to |
start_index | First row- and column-index of the block |
stop_index | First row- and column-index beyond the block |
Definition at line 79 of file block_ilu.hpp.
void viennacl::linalg::detail::final_iter_update | ( | MatrixT & | A, |
int | n, | ||
int | last_n, | ||
SCALARTYPE | q, | ||
SCALARTYPE | p | ||
) |
Definition at line 128 of file qr-method.hpp.
void viennacl::linalg::detail::final_iter_update_gpu | ( | matrix_base< SCALARTYPE > & | A, |
int | n, | ||
int | last_n, | ||
SCALARTYPE | q, | ||
SCALARTYPE | p | ||
) |
Definition at line 42 of file qr-method.hpp.
|
inline |
void viennacl::linalg::detail::givens_prev | ( | MatrixType & | matrix, |
VectorType & | tmp1, | ||
VectorType & | tmp2, | ||
int | n, | ||
int | l, | ||
int | k | ||
) |
void viennacl::linalg::detail::gmres_copy_helper | ( | SrcVectorT const & | src, |
DestVectorT & | dest, | ||
vcl_size_t | len, | ||
vcl_size_t | start = 0 |
||
) |
void viennacl::linalg::detail::gmres_copy_helper | ( | viennacl::vector< NumericT > const & | src, |
DestVectorT & | dest, | ||
vcl_size_t | len, | ||
vcl_size_t | start = 0 |
||
) |
void viennacl::linalg::detail::gmres_householder_reflect | ( | VectorT & | x, |
VectorT const & | h, | ||
NumericT | beta | ||
) |
void viennacl::linalg::detail::gmres_setup_householder_vector | ( | VectorT const & | input_vec, |
VectorT & | hh_vec, | ||
NumericT & | beta, | ||
NumericT & | mu, | ||
vcl_size_t | j | ||
) |
Computes the householder vector 'hh_vec' which rotates 'input_vec' such that all entries below the j-th entry of 'v' become zero.
input_vec | The input vector |
hh_vec | The householder vector defining the relection (I - beta * hh_vec * hh_vec^T) |
beta | The coefficient beta in (I - beta * hh_vec * hh_vec^T) |
mu | The norm of the input vector part relevant for the reflection: norm_2(input_vec[j:size]) |
j | Index of the last nonzero index in 'input_vec' after applying the reflection |
bool viennacl::linalg::detail::householder_c | ( | viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > & | A, |
viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > & | Q, | ||
viennacl::vector< SCALARTYPE, ALIGNMENT > & | D, | ||
vcl_size_t | row_start, | ||
vcl_size_t | col_start | ||
) |
bool viennacl::linalg::detail::householder_r | ( | viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > & | A, |
viennacl::matrix< SCALARTYPE, row_major, ALIGNMENT > & | Q, | ||
viennacl::vector< SCALARTYPE, ALIGNMENT > & | D, | ||
vcl_size_t | row_start, | ||
vcl_size_t | col_start | ||
) |
void viennacl::linalg::detail::householder_reflect | ( | MatrixType & | A, |
VectorType & | v, | ||
ScalarType | beta, | ||
vcl_size_t | j, | ||
vcl_size_t | k | ||
) |
void viennacl::linalg::detail::householder_reflect | ( | MatrixType & | A, |
VectorType & | v, | ||
ScalarType | beta, | ||
vcl_size_t | j | ||
) |
void viennacl::linalg::detail::householder_reflect_ublas | ( | MatrixType & | A, |
VectorType & | v, | ||
MatrixType & | matrix_1x1, | ||
ScalarType | beta, | ||
vcl_size_t | j, | ||
vcl_size_t | k | ||
) |
void viennacl::linalg::detail::householder_reflect_viennacl | ( | MatrixType & | A, |
VectorType & | v, | ||
MatrixType & | matrix_1x1, | ||
ScalarType | beta, | ||
vcl_size_t | j, | ||
vcl_size_t | k | ||
) |
bool viennacl::linalg::detail::householder_twoside | ( | matrix_base< SCALARTYPE > & | A, |
matrix_base< SCALARTYPE > & | Q, | ||
vector_base< SCALARTYPE > & | D, | ||
vcl_size_t | start | ||
) |
Definition at line 694 of file qr-method.hpp.
void viennacl::linalg::detail::householder_vector | ( | VectorType & | v, |
vcl_size_t | start | ||
) |
Definition at line 97 of file qr-method-common.hpp.
void viennacl::linalg::detail::hqr2 | ( | viennacl::matrix< SCALARTYPE > & | vcl_H, |
viennacl::matrix< SCALARTYPE > & | V, | ||
VectorType & | d, | ||
VectorType & | e | ||
) |
Definition at line 236 of file qr-method.hpp.
std::vector< typename viennacl::result_of::cpu_value_type< typename MatrixType::value_type >::type > viennacl::linalg::detail::inplace_qr_hybrid | ( | MatrixType & | A, |
vcl_size_t | block_size = 16 |
||
) |
Implementation of a hybrid QR factorization using uBLAS on the CPU and ViennaCL for GPUs (or multi-core CPU)
Prefer the use of the convenience interface inplace_qr()
A | A dense ViennaCL matrix to be factored |
block_size | The block size to be used. The number of columns of A must be a multiple of block_size |
std::vector<typename MatrixType::value_type> viennacl::linalg::detail::inplace_qr_ublas | ( | MatrixType & | A, |
vcl_size_t | block_size = 32 |
||
) |
std::vector< typename viennacl::result_of::cpu_value_type< typename MatrixType::value_type >::type > viennacl::linalg::detail::inplace_qr_viennacl | ( | MatrixType & | A, |
vcl_size_t | block_size = 16 |
||
) |
Implementation of a OpenCL-only QR factorization for GPUs (or multi-core CPU). DEPRECATED! Use only if you're curious and interested in playing a bit with a GPU-only implementation.
Performance is rather poor at small matrix sizes. Prefer the use of the hybrid version, which is automatically chosen using the interface function inplace_qr()
A | A dense ViennaCL matrix to be factored |
block_size | The block size to be used. The number of columns of A must be a multiple of block_size |
void viennacl::linalg::detail::inplace_solve_impl | ( | MatrixT1 const & | A, |
MatrixT2 & | B, | ||
viennacl::linalg::lower_tag | |||
) |
Definition at line 302 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_impl | ( | MatrixT1 const & | A, |
MatrixT2 & | B, | ||
viennacl::linalg::unit_lower_tag | |||
) |
Definition at line 308 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_impl | ( | MatrixT1 const & | A, |
MatrixT2 & | B, | ||
viennacl::linalg::upper_tag | |||
) |
Definition at line 347 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_impl | ( | MatrixT1 const & | A, |
MatrixT2 & | B, | ||
viennacl::linalg::unit_upper_tag | |||
) |
Definition at line 353 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_kernel | ( | const matrix_base< NumericT > & | A, |
const matrix_base< NumericT > & | B, | ||
SolverTagT | |||
) |
Direct inplace solver for dense triangular systems using a single kernel launch. Matlab notation: A \ B.
A | The system matrix |
B | The matrix of row vectors, where the solution is directly written to |
Definition at line 62 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_kernel | ( | matrix_base< NumericT > const & | A, |
matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > & | proxy_B, | ||
SolverTagT | |||
) |
Direct inplace solver for dense triangular systems with transposed right hand side using a single kernel launch.
A | The system matrix |
proxy_B | The transposed matrix of row vectors, where the solution is directly written to |
Definition at line 94 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_kernel | ( | matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > const & | proxy_A, |
matrix_base< NumericT > & | B, | ||
SolverTagT | |||
) |
Direct inplace solver for dense triangular systems that stem from transposed triangular systems. Uses a single kernel launch.
proxy_A | The system matrix proxy |
B | The matrix holding the load vectors, where the solution is directly written to |
Definition at line 130 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_kernel | ( | 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 dense transposed triangular systems with transposed right hand side using a single kernel launch. Matlab notation: A' \ B'.
proxy_A | The system matrix proxy |
proxy_B | The matrix holding the load vectors, where the solution is directly written to |
Definition at line 165 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_lower_impl | ( | MatrixT1 const & | A, |
MatrixT2 & | B, | ||
SolverTagT | |||
) |
Definition at line 269 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_lower_vec_impl | ( | MatrixT1 const & | A, |
VectorT & | B, | ||
SolverTagT | |||
) |
Definition at line 500 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_upper_impl | ( | MatrixT1 const & | A, |
MatrixT2 & | B, | ||
SolverTagT | |||
) |
Definition at line 314 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_upper_vec_impl | ( | MatrixT1 const & | A, |
VectorT & | B, | ||
SolverTagT | |||
) |
Definition at line 544 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_vec_impl | ( | MatrixT1 const & | A, |
VectorT & | B, | ||
viennacl::linalg::lower_tag | |||
) |
Definition at line 532 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_vec_impl | ( | MatrixT1 const & | A, |
VectorT & | B, | ||
viennacl::linalg::unit_lower_tag | |||
) |
Definition at line 538 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_vec_impl | ( | MatrixT1 const & | A, |
VectorT & | B, | ||
viennacl::linalg::upper_tag | |||
) |
Definition at line 576 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_vec_impl | ( | MatrixT1 const & | A, |
VectorT & | B, | ||
viennacl::linalg::unit_upper_tag | |||
) |
Definition at line 582 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_vec_kernel | ( | const matrix_base< NumericT > & | mat, |
const vector_base< NumericT > & | vec, | ||
SolverTagT | |||
) |
Definition at line 203 of file direct_solve.hpp.
void viennacl::linalg::detail::inplace_solve_vec_kernel | ( | matrix_expression< const matrix_base< NumericT >, const matrix_base< NumericT >, op_trans > const & | proxy, |
const vector_base< NumericT > & | vec, | ||
SolverTagT | |||
) |
Direct inplace solver for dense upper triangular systems that stem from transposed lower triangular systems. Uses a single kernel launch.
proxy | The system matrix proxy |
vec | The load vector, where the solution is directly written to |
Definition at line 238 of file direct_solve.hpp.
std::vector< typename viennacl::result_of::cpu_value_type<typename MatrixT::value_type>::type > viennacl::linalg::detail::lanczos | ( | MatrixT const & | A, |
VectorT & | r, | ||
vcl_size_t | size, | ||
lanczos_tag | |||
) |
Implementation of the lanczos algorithm without reorthogonalization.
A | The system matrix |
r | Random start vector |
size | Size of krylov-space |
Definition at line 312 of file lanczos.hpp.
std::vector< typename viennacl::result_of::cpu_value_type<typename MatrixT::value_type>::type > viennacl::linalg::detail::lanczosFRO | ( | MatrixT const & | A, |
VectorT & | r, | ||
vcl_size_t | size, | ||
lanczos_tag | |||
) |
Implementation of the Lanczos FRO algorithm.
A | The system matrix |
r | Random start vector |
size | Size of krylov-space |
Definition at line 367 of file lanczos.hpp.
std::vector< typename viennacl::result_of::cpu_value_type<typename MatrixT::value_type>::type > viennacl::linalg::detail::lanczosPRO | ( | MatrixT const & | A, |
VectorT & | r, | ||
vcl_size_t | size, | ||
lanczos_tag const & | tag | ||
) |
Implementation of the Lanczos PRO algorithm.
A | The system matrix |
r | Random start vector |
size | Size of krylov-space |
tag | Lanczos_tag with several options for the algorithm |
Definition at line 127 of file lanczos.hpp.
void viennacl::linalg::detail::level_scheduling_setup_impl | ( | viennacl::compressed_matrix< NumericT, AlignmentV > const & | LU, |
viennacl::vector< NumericT > const & | diagonal_LU, | ||
std::list< viennacl::backend::mem_handle > & | row_index_arrays, | ||
std::list< viennacl::backend::mem_handle > & | row_buffers, | ||
std::list< viennacl::backend::mem_handle > & | col_buffers, | ||
std::list< viennacl::backend::mem_handle > & | element_buffers, | ||
std::list< vcl_size_t > & | row_elimination_num_list, | ||
bool | setup_U | ||
) |
Definition at line 51 of file common.hpp.
void viennacl::linalg::detail::level_scheduling_setup_L | ( | viennacl::compressed_matrix< NumericT, AlignmentV > const & | LU, |
viennacl::vector< NumericT > const & | diagonal_LU, | ||
std::list< viennacl::backend::mem_handle > & | row_index_arrays, | ||
std::list< viennacl::backend::mem_handle > & | row_buffers, | ||
std::list< viennacl::backend::mem_handle > & | col_buffers, | ||
std::list< viennacl::backend::mem_handle > & | element_buffers, | ||
std::list< vcl_size_t > & | row_elimination_num_list | ||
) |
Definition at line 191 of file common.hpp.
void viennacl::linalg::detail::level_scheduling_setup_U | ( | viennacl::compressed_matrix< NumericT, AlignmentV > const & | LU, |
viennacl::vector< NumericT > const & | diagonal_LU, | ||
std::list< viennacl::backend::mem_handle > & | row_index_arrays, | ||
std::list< viennacl::backend::mem_handle > & | row_buffers, | ||
std::list< viennacl::backend::mem_handle > & | col_buffers, | ||
std::list< viennacl::backend::mem_handle > & | element_buffers, | ||
std::list< vcl_size_t > & | row_elimination_num_list | ||
) |
Definition at line 208 of file common.hpp.
void viennacl::linalg::detail::level_scheduling_substitute | ( | vector< ScalarType > & | vec, |
viennacl::backend::mem_handle const & | row_index_array, | ||
viennacl::backend::mem_handle const & | row_buffer, | ||
viennacl::backend::mem_handle const & | col_buffer, | ||
viennacl::backend::mem_handle const & | element_buffer, | ||
vcl_size_t | num_rows | ||
) |
Definition at line 49 of file misc_operations.hpp.
void viennacl::linalg::detail::level_scheduling_substitute | ( | viennacl::vector< NumericT > & | vec, |
std::list< viennacl::backend::mem_handle > const & | row_index_arrays, | ||
std::list< viennacl::backend::mem_handle > const & | row_buffers, | ||
std::list< viennacl::backend::mem_handle > const & | col_buffers, | ||
std::list< viennacl::backend::mem_handle > const & | element_buffers, | ||
std::list< vcl_size_t > const & | row_elimination_num_list | ||
) |
Definition at line 224 of file common.hpp.
T viennacl::linalg::detail::max | ( | const T & | lhs, |
const T & | rhs | ||
) |
T viennacl::linalg::detail::min | ( | const T & | lhs, |
const T & | rhs | ||
) |
VectorType::value_type viennacl::linalg::detail::norm_lcl | ( | VectorType const & | x, |
vcl_size_t | size | ||
) |
Definition at line 78 of file qr-method-common.hpp.
void viennacl::linalg::detail::normalize | ( | VectorType & | x, |
vcl_size_t | size | ||
) |
Definition at line 87 of file qr-method-common.hpp.
bool viennacl::linalg::detail::op_aliasing | ( | vector_base< NumericT > const & | , |
B const & | |||
) |
Definition at line 36 of file op_executor.hpp.
bool viennacl::linalg::detail::op_aliasing | ( | vector_base< NumericT > const & | lhs, |
vector_base< NumericT > const & | b | ||
) |
Definition at line 42 of file op_executor.hpp.
bool viennacl::linalg::detail::op_aliasing | ( | vector_base< NumericT > const & | lhs, |
vector_expression< const LhsT, const RhsT, OpT > const & | rhs | ||
) |
Definition at line 48 of file op_executor.hpp.
bool viennacl::linalg::detail::op_aliasing | ( | matrix_base< NumericT > const & | , |
B const & | |||
) |
Definition at line 55 of file op_executor.hpp.
bool viennacl::linalg::detail::op_aliasing | ( | matrix_base< NumericT > const & | lhs, |
matrix_base< NumericT > const & | b | ||
) |
Definition at line 61 of file op_executor.hpp.
bool viennacl::linalg::detail::op_aliasing | ( | matrix_base< NumericT > const & | lhs, |
matrix_expression< const LhsT, const RhsT, OpT > const & | rhs | ||
) |
Definition at line 67 of file op_executor.hpp.
void viennacl::linalg::detail::prepare_householder_vector | ( | matrix_base< SCALARTYPE > & | A, |
vector_base< SCALARTYPE > & | D, | ||
vcl_size_t | size, | ||
vcl_size_t | row_start, | ||
vcl_size_t | col_start, | ||
vcl_size_t | start, | ||
bool | is_column | ||
) |
Definition at line 165 of file qr-method-common.hpp.
bool viennacl::linalg::detail::processResultDataLargeMatrix | ( | ResultDataLarge< NumericT > & | result, |
const unsigned int | mat_size | ||
) |
Process the result, that is obtain result from device and do simple sanity checking
result | handles to result data |
mat_size | matrix size |
Definition at line 86 of file bisect_large.hpp.
void viennacl::linalg::detail::processResultSmallMatrix | ( | ResultDataSmall< NumericT > & | result, |
const unsigned int | mat_size | ||
) |
Process the result obtained on the device, that is transfer to host and perform basic sanity checking
result | handles to result data |
mat_size | matrix size |
Definition at line 78 of file bisect_small.hpp.
SCALARTYPE viennacl::linalg::detail::pythag | ( | SCALARTYPE | a, |
SCALARTYPE | b | ||
) |
Definition at line 65 of file qr-method-common.hpp.
void viennacl::linalg::detail::qr_method | ( | viennacl::matrix< SCALARTYPE > & | A, |
viennacl::matrix< SCALARTYPE > & | Q, | ||
std::vector< SCALARTYPE > & | D, | ||
std::vector< SCALARTYPE > & | E, | ||
bool | is_symmetric = true |
||
) |
Definition at line 728 of file qr-method.hpp.
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value >::type viennacl::linalg::detail::row_info | ( | SparseMatrixType const & | mat, |
vector< SCALARTYPE, VEC_ALIGNMENT > & | vec, | ||
row_info_types | info_selector | ||
) |
Definition at line 50 of file sparse_matrix_operations.hpp.
MatrixType::value_type viennacl::linalg::detail::setup_householder_vector_ublas | ( | MatrixType const & | A, |
VectorType & | v, | ||
MatrixType & | matrix_1x1, | ||
vcl_size_t | j | ||
) |
viennacl::result_of::cpu_value_type< typename MatrixType::value_type >::type viennacl::linalg::detail::setup_householder_vector_viennacl | ( | MatrixType const & | A, |
VectorType & | v, | ||
MatrixType & | matrix_1x1, | ||
vcl_size_t | j | ||
) |
SCALARTYPE viennacl::linalg::detail::sign | ( | SCALARTYPE | val | ) |
Definition at line 71 of file qr-method-common.hpp.
|
inline |
|
inline |
void viennacl::linalg::detail::svd_qr_shift | ( | MatrixType & | vcl_u, |
MatrixType & | vcl_v, | ||
CPU_VectorType & | q, | ||
CPU_VectorType & | e | ||
) |
void viennacl::linalg::detail::transpose | ( | matrix_base< SCALARTYPE > & | A | ) |
Definition at line 107 of file qr-method-common.hpp.
void viennacl::linalg::detail::tridiagonal_reduction | ( | matrix_base< SCALARTYPE > & | A, |
matrix_base< SCALARTYPE > & | Q | ||
) |
Definition at line 713 of file qr-method.hpp.
void viennacl::linalg::detail::update_float_QR_column | ( | MatrixT & | A, |
const std::vector< SCALARTYPE > & | buf, | ||
int | m, | ||
int | n, | ||
int | last_i, | ||
bool | is_triangular | ||
) |
Definition at line 145 of file qr-method.hpp.
void viennacl::linalg::detail::update_float_QR_column_gpu | ( | matrix_base< SCALARTYPE > & | A, |
const VectorType & | buf, | ||
viennacl::vector< SCALARTYPE > & | buf_vcl, | ||
int | m, | ||
int | n, | ||
int | last_n, | ||
bool | |||
) |
Definition at line 82 of file qr-method.hpp.
void viennacl::linalg::detail::write_householder_to_A | ( | MatrixType & | A, |
VectorType const & | v, | ||
vcl_size_t | j | ||
) |
void viennacl::linalg::detail::write_householder_to_A_ublas | ( | MatrixType & | A, |
VectorType const & | v, | ||
vcl_size_t | j | ||
) |