numerics 0.1.0
Loading...
Searching...
No Matches
eig.cpp
Go to the documentation of this file.
1/// @file eigen/eig.cpp
2/// @brief Full symmetric eigendecomposition dispatcher.
3
4#include "backends/lapack/impl.hpp"
5#include "backends/omp/impl.hpp"
6#include "backends/seq/impl.hpp"
8
9namespace num {
10
11EigenResult eig_sym(const Matrix& A, real tol, idx max_sweeps, Backend backend) {
12 switch (backend) {
13 case Backend::lapack:
15 case Backend::omp:
16 return backends::omp::eig_sym(A, tol, max_sweeps);
17 default:
18 return backends::seq::eig_sym(A, tol, max_sweeps);
19 }
20}
21
22} // namespace num
Full symmetric eigendecomposition via cyclic Jacobi sweeps.
EigenResult eig_sym(const Matrix &A)
EigenResult eig_sym(const Matrix &A, real tol, idx max_sweeps)
EigenResult eig_sym(const Matrix &A, real tol, idx max_sweeps)
double real
Definition types.hpp:10
Backend
Definition policy.hpp:7
std::size_t idx
Definition types.hpp:11
EigenResult eig_sym(const Matrix &A, real tol=1e-12, idx max_sweeps=100, Backend backend=lapack_backend)
Definition eig.cpp:11
Symmetric eigendecomposition .