38namespace nda::lapack {
60 template <MemoryMatrix A, MemoryVector TAU>
64 static_assert(has_F_layout<A>,
"Error in nda::lapack::ungqr: C order is not supported");
68 EXPECTS(a.indexmap().min_stride() == 1);
69 EXPECTS(tau.indexmap().min_stride() == 1);
73 value_type bufferSize_T{};
74 auto [m, n] = a.shape();
77 lapack::f77::ungqr(m, std::min(m, n), k, a.data(), get_ld(a), tau.data(), &bufferSize_T, -1, info);
78 int bufferSize =
static_cast<int>(std::ceil(std::real(bufferSize_T)));
82 lapack::f77::ungqr(m, std::min(m, n), k, a.data(), get_ld(a), tau.data(), work.
data(), bufferSize, info);
84 if (info) NDA_RUNTIME_ERROR <<
"Error in nda::lapack::ungqr: info = " << info;
Provides definitions and type traits involving the different memory address spaces supported by nda.
A generic multi-dimensional array.
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...
Provides a custom runtime error class and macros to assert conditions and throw exceptions.
constexpr bool have_same_value_type_v
Constexpr variable that is true if all types in As have the same value type as A0.
std::decay_t< decltype(get_first_element(std::declval< A const >()))> get_value_t
Get the value type of an array/view or a scalar type.
int ungqr(A &&a, TAU &&tau)
Interface to the LAPACK ungqr 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.
static constexpr bool have_compatible_addr_space
Constexpr variable that is true if all given types have compatible address spaces.
static constexpr bool on_host
Constexpr variable that is true if all given types have a Host address space.
Provides a C++ interface for various LAPACK routines.
Provides definitions of various layout policies.
Macros used in the nda library.
Defines various memory handling policies.
Provides type traits for the nda library.