25namespace nda::lapack {
57 template <MemoryMatrix A, MemoryVector TAU>
60 static_assert(
has_F_layout<A>,
"Error in nda::lapack::orgqr: A must have Fortran layout");
63 auto const [m, n] = a.shape();
64 auto const k = tau.size();
69 EXPECTS(a.indexmap().min_stride() == 1);
70 EXPECTS(tau.indexmap().min_stride() == 1);
75 lapack::f77::orgqr(m, n, k, a.data(),
get_ld(a), tau.data(), &tmp_lwork, -1, info);
76 int lwork =
static_cast<int>(std::ceil(tmp_lwork));
80 lapack::f77::orgqr(m, n, k, a.data(),
get_ld(a), tau.data(), work.
data(), lwork, info);
Provides definitions and type traits involving the different memory address spaces supported by nda.
Provides the generic class for arrays.
ValueType const * data() const noexcept
Get a pointer to the actual data (in general this is not the beginning of the memory block for a view...
Provides concepts for the nda library.
Provides various convenient aliases and helper functions for nda::basic_array and nda::basic_array_vi...
basic_array< ValueType, Rank, Layout, 'A', ContainerPolicy > array
Alias template of an nda::basic_array with an 'A' algebra.
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 orgqr(A &&a, TAU &&tau)
Interface to the LAPACK orgqr routine.
static constexpr bool have_host_compatible_addr_space
Constexpr variable that is true if all given types have an address space compatible with Host.
Provides a C++ interface for various LAPACK routines.
int get_ld(A const &a)
Get the leading dimension of an nda::MemoryArray with rank 1 or 2 for BLAS/LAPACK calls.
static constexpr bool has_F_layout
Constexpr variable that is true if the given nda::Array type has nda::F_layout.
Macros used in the nda library.
Provides type traits for the nda library.