5#include "backends/lapack/impl.hpp"
6#include "backends/seq/impl.hpp"
19 if (a.
size() != n - 1 || c.
size() != n - 1 || d.
size() != n || x.
size() != n)
20 throw std::invalid_argument(
"Dimension mismatch in Thomas solver");
27#ifdef NUMERICS_HAS_CUDA
constexpr idx size() const noexcept
void thomas(const Vector &a, const Vector &b, const Vector &c, const Vector &d, Vector &x)
void thomas(const Vector &a, const Vector &b, const Vector &c, const Vector &d, Vector &x)
void thomas_batched(const real *a, const real *b, const real *c, const real *d, real *x, idx n, idx batch_size)
Batched Thomas algorithm for tridiagonal systems.
void thomas(const Vector &a, const Vector &b, const Vector &c, const Vector &d, Vector &x, Backend backend=lapack_backend)
BasicVector< real > Vector
Real-valued dense vector with full backend dispatch (CPU + GPU)
SolverResult cg(const Matrix &A, const Vector &b, Vector &x, real tol=1e-10, idx max_iter=1000, Backend backend=default_backend)
Thomas algorithm for tridiagonal systems.