30#ifndef NDA_HAVE_DEVICE
37namespace nda::lapack {
62 template <MemoryMatrix A, MemoryMatrix B, MemoryVector IPIV>
64 int getrs(A
const &a, B &&b, IPIV
const &ipiv) {
65 static_assert(std::is_same_v<get_value_t<IPIV>,
int>,
"Error in nda::lapack::getrs: Pivoting array must have elements of type int");
66 EXPECTS(ipiv.size() >= std::min(a.extent(0), a.extent(1)));
69 EXPECTS(a.indexmap().min_stride() == 1);
70 EXPECTS(b.indexmap().min_stride() == 1);
71 EXPECTS(ipiv.indexmap().min_stride() == 1);
74 static constexpr bool conj_A = is_conj_array_expr<A>;
75 char op_a = get_op<conj_A, has_C_layout<A>>;
80#if defined(NDA_HAVE_DEVICE)
81 device::getrs(op_a, get_ncols(a), get_ncols(b), a.data(), get_ld(a), ipiv.data(), b.data(), get_ld(b), info);
86 f77::getrs(op_a, get_ncols(a), get_ncols(b), a.data(), get_ld(a), ipiv.data(), b.data(), get_ld(b), info);
Provides definitions and type traits involving the different memory address spaces supported by nda.
Provides concepts for the nda library.
Provides GPU and non-GPU specific functionality.
constexpr bool have_same_value_type_v
Constexpr variable that is true if all types in As have the same value type as A0.
int getrs(A const &a, B &&b, IPIV const &ipiv)
Interface to the LAPACK getrs 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.