22namespace nda::lapack {
49 template <MemoryMatrix A, MemoryVector IPIV>
52 static_assert(std::is_same_v<get_value_t<IPIV>,
int>,
"Error in nda::lapack::getri: Pivoting array must have elements of type int");
54 auto dm = std::min(a.extent(0), a.extent(1));
55 if (ipiv.size() < dm) ipiv.resize(dm);
58 EXPECTS(a.indexmap().min_stride() == 1);
59 EXPECTS(ipiv.indexmap().min_stride() == 1);
61#if defined(__has_feature)
62#if __has_feature(memory_sanitizer)
69#if defined(NDA_HAVE_DEVICE)
70 device::getrf(a.extent(0), a.extent(1), a.data(),
get_ld(a), ipiv.data(), info);
75 f77::getrf(a.extent(0), a.extent(1), a.data(),
get_ld(a), ipiv.data(), info);
Provides definitions and type traits involving the different memory address spaces supported by nda.
Provides concepts for the nda library.
int getrf(A &&a, IPIV &&ipiv)
Interface to the LAPACK getrf routine.
static constexpr bool have_compatible_addr_space
Constexpr variable that is true if all given types have compatible address spaces.
static constexpr bool have_device_compatible_addr_space
Constexpr variable that is true if all given types have an address space compatible with Device.
void compile_error_no_gpu()
Trigger a compilation error in case GPU specific functionality is used without configuring the projec...
constexpr bool is_blas_lapack_v
Alias for nda::is_double_or_complex_v.
Provides a C++ interface for various LAPACK routines.
int get_ld(A const &a)
Get the leading dimension in LAPACK jargon of an nda::MemoryMatrix.
Macros used in the nda library.
Provides type traits for the nda library.