6#include "../seq/impl.hpp"
12#if defined(NUMERICS_HAS_LAPACK)
19#if defined(NUMERICS_HAS_LAPACK)
26 std::vector<lapack_int> ipiv(n);
27 int info = LAPACKE_dgetrf(LAPACK_ROW_MAJOR,
static_cast<lapack_int
>(n),
28 static_cast<lapack_int
>(n), f.
LU.
data(),
29 static_cast<lapack_int
>(n), ipiv.data());
31 throw std::runtime_error(
"lu (lapack): dgetrf argument error, info=" +
32 std::to_string(info));
37 for (
idx k = 0; k < n; ++k)
38 f.
piv[k] =
static_cast<idx>(ipiv[k] - 1);
Dense row-major matrix with optional GPU storage.
constexpr idx rows() const noexcept
LUResult lu(const Matrix &A)
LUResult lu(const Matrix &A)
std::experimental::simd butterfly for FFT.
Result of an LU factorization with partial pivoting (PA = LU)