numerics 0.1.0
Loading...
Searching...
No Matches
thomas.cpp File Reference

Thomas tridiagonal solver dispatcher. More...

#include "linalg/factorization/thomas.hpp"
#include "core/parallel/cuda_ops.hpp"
#include "backends/seq/impl.hpp"
#include "backends/lapack/impl.hpp"
#include <stdexcept>

Go to the source code of this file.

Namespaces

namespace  num
 

Functions

void num::thomas (const Vector &a, const Vector &b, const Vector &c, const Vector &d, Vector &x, Backend backend=lapack_backend)
 Thomas algorithm (LU for tridiagonal systems), O(n).
 

Detailed Description

Thomas tridiagonal solver dispatcher.

Backend routing: Backend::lapack -> backends::lapack::thomas (LAPACKE_dgtsv with pivoting) Backend::gpu -> CUDA batched Thomas kernel everything else -> backends::seq::thomas (forward elimination + back sub)

Definition in file thomas.cpp.