21#ifndef NDA_HAVE_DEVICE
28namespace nda::lapack {
56 template <MemoryMatrix A, MemoryVector IPIV>
63 auto const [m, n] = a.shape();
67 EXPECTS(a.indexmap().min_stride() == 1);
68 EXPECTS(ipiv.indexmap().min_stride() == 1);
70#if defined(__has_feature)
71#if __has_feature(memory_sanitizer)
79#if defined(NDA_HAVE_DEVICE)
80 device::getrf(m, n, a.data(),
get_ld(a), ipiv.data(), info);
85 f77::getrf(m, n, a.data(),
get_ld(a), ipiv.data(), info);
Provides definitions and type traits involving the different memory address spaces supported by nda.
Provides basic functions to create and manipulate arrays and views.
Provides concepts for the nda library.
Provides GPU and non-GPU specific functionality.
void resize_or_check_if_view(A &a, std::array< long, A::rank > const &sha)
Resize a given regular array to the given shape or check if a given view as the correct shape.
auto transpose(A &&a)
Transpose the memory layout of an nda::MemoryArray or an nda::expr_call.
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.
static constexpr bool has_C_layout
Constexpr variable that is true if the given nda::Array type has nda::C_layout.
int get_ld(A const &a)
Get the leading dimension of an nda::MemoryArray with rank 1 or 2 for BLAS/LAPACK calls.
Macros used in the nda library.
Provides type traits for the nda library.