26namespace nda::lapack {
 
   46  template <MemoryMatrix A, MemoryVector IPIV>
 
   48  int getri(A &&a, IPIV 
const &ipiv) { 
 
   49    static_assert(std::is_same_v<get_value_t<IPIV>, 
int>, 
"Error in nda::lapack::getri: Pivoting array must have elements of type int");
 
   50    auto dm = std::min(a.extent(0), a.extent(1));
 
   53      NDA_RUNTIME_ERROR << 
"Error in nda::lapack::getri: Pivot index array size " << ipiv.size() << 
" smaller than required size " << dm;
 
   56    EXPECTS(a.indexmap().min_stride() == 1);
 
   57    EXPECTS(ipiv.indexmap().min_stride() == 1);
 
   61#if defined(NDA_HAVE_DEVICE) 
   62      device::getri(a.extent(0), a.data(), 
get_ld(a), ipiv.data(), NULL, 0, info);
 
   69      value_type bufferSize_T{};
 
   70      f77::getri(a.extent(0), a.data(), 
get_ld(a), ipiv.data(), &bufferSize_T, -1, info);
 
   71      int bufferSize = 
static_cast<int>(std::ceil(std::real(bufferSize_T)));
 
   75#if defined(__has_feature) 
   76#if __has_feature(memory_sanitizer) 
   80      f77::getri(a.extent(0), a.data(), 
get_ld(a), ipiv.data(), work.
data(), bufferSize, info);
 
 
Provides definitions and type traits involving the different memory address spaces supported by nda.
 
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.
 
basic_array< ValueType, Rank, Layout, 'A', ContainerPolicy > array
Alias template of an nda::basic_array with an 'A' algebra.
 
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 getri(A &&a, IPIV const &ipiv)
Interface to the LAPACK getri 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.
 
int get_ld(A const &a)
Get the leading dimension of an nda::MemoryArray with rank 1 or 2 for LAPACK calls.
 
Macros used in the nda library.
 
Provides type traits for the nda library.