33namespace nda::lapack {
60 template <MemoryMatrix A, MemoryVector IPIV>
63 static_assert(std::is_same_v<get_value_t<IPIV>,
int>,
"Error in nda::lapack::getri: Pivoting array must have elements of type int");
65 auto dm = std::min(a.extent(0), a.extent(1));
66 if (ipiv.size() < dm) ipiv.resize(dm);
69 EXPECTS(a.indexmap().min_stride() == 1);
70 EXPECTS(ipiv.indexmap().min_stride() == 1);
72#if defined(__has_feature)
73#if __has_feature(memory_sanitizer)
80#if defined(NDA_HAVE_DEVICE)
81 device::getrf(a.extent(0), a.extent(1), a.data(), get_ld(a), ipiv.data(), info);
86 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.
Macros used in the nda library.
Provides type traits for the nda library.