61 requires(mem::have_compatible_addr_space<A, IPIV>
and is_blas_lapack_v<get_value_t<A>>)
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)
79 if constexpr (mem::have_device_compatible_addr_space<A, IPIV>) {
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);