constexpr idx size() const noexcept
void diffusion_step_2d_dirichlet(Vector &u, int N, double coeff, Backend b=best_backend)
void diffusion_step_2d(Vector &u, int N, double coeff, Backend b=best_backend)
void laplacian_stencil_2d(const BasicVector< T > &x, BasicVector< T > &y, int N)
Backend
Selects which backend handles a linalg operation.
constexpr Backend best_backend
Best backend for memory-bound vector ops: blas > omp > blocked.
constexpr T ipow(T x) noexcept
Compute x^N at compile time via repeated squaring.
void laplacian_stencil_2d_periodic(const BasicVector< T > &x, BasicVector< T > &y, int N)
void axpy(real alpha, const Vector &x, Vector &y, Backend b=default_backend)
y += alpha * x
Higher-order stencil and grid-sweep utilities.
Backend enum for linear algebra operations.