|
TRIQS/nda 2.0.0
Multi-dimensional array library for C++
|
Utilities for the BLAS/LAPACK (and cuBLAS/cuSOLVER) interface.
Concepts | |
| concept | nda::blas_lapack::BlasArray |
| BLAS/LAPACK compatible array type. | |
| concept | nda::blas_lapack::BlasArrayCplx |
| BLAS/LAPACK compatible array type with complex value type. | |
| concept | nda::blas_lapack::BlasArrayFor |
| BLAS/LAPACK compatible array type that has the same value type as the reference array type and a compatible address space. | |
| concept | nda::blas_lapack::BlasArrayOrConj |
| BLAS/LAPACK compatible array or conjugate lazy expression type. | |
| concept | nda::blas_lapack::BlasArrayOrConjFor |
| BLAS/LAPACK compatible array or conjugate lazy expression type that has the same value type as the reference array type and a compatible address space. | |
| concept | nda::blas_lapack::BlasArrayReal |
| BLAS/LAPACK compatible array type with real value type. | |
| concept | nda::blas_lapack::BlasArrayRealFor |
| BLAS/LAPACK compatible array type that has a compatible floating-point value type and address space with the reference array type. | |
| concept | nda::blas_lapack::PivotArrayFor |
| BLAS/LAPACK compatible pivot array type that has a compatible address space with the reference array type. | |
Typedefs | |
| using | nda::dcomplex = std::complex<double> |
| Alias for std::complex<double> type. | |
| template<MemoryArray A> | |
| using | nda::blas_lapack::vector_fp_t = vector<get_fp_t<A>, heap<mem::get_addr_space<A>>> |
| Alias for an nda::vector with the same address space as the given type and its value type determined by nda::get_fp_t<A>. | |
| template<MemoryArray A> | |
| using | nda::blas_lapack::vector_value_t = vector<get_value_t<A>, heap<mem::get_addr_space<A>>> |
| Alias for an nda::vector with the same value type and address space as the given type. | |
Functions | |
| template<Array A> requires (MemoryArrayOfRank<A, 3> or MemoryArrayOfRank<A, 2>) | |
| auto | nda::blas_lapack::batch_ptrs (A &&a) |
| Given a 2- or 3-dimensional array get an array of pointers to each of the submatrices/subvectors indexed by the slowest varying dimension. | |
| template<Array A> requires (MemoryArray<A> or is_conj_array_expr<A>) | |
| MemoryArray decltype(auto) | nda::blas_lapack::get_array (A &&a) |
| Get the underlying array of a conjugate lazy expression or return the array itself in case it is an nda::MemoryArray. | |
| template<MemoryArray A> requires (get_rank<A> == 1 or get_rank<A> == 2) | |
| int | nda::blas_lapack::get_ld (A const &a) |
| Get the leading dimension of an nda::MemoryArray with rank 1 or 2 for BLAS/LAPACK calls. | |
| template<MemoryArray A> requires (get_rank<A> == 1 or get_rank<A> == 2) | |
| int | nda::blas_lapack::get_ncols (A const &a) |
| Get the number of columns of an nda::MemoryArray with rank 1 or 2 for BLAS/LAPACK calls. | |
| template<typename A> requires (is_regular_or_view_v<A> and get_rank<A> == 1) | |
| void | nda::blas_lapack::resize_or_check_work_buffer (A &a, long min_size) |
| Resize or check the size of a 1D array/view. | |
Variables | |
| template<Array A> | |
| static constexpr char | nda::blas_lapack::get_op |
| Variable template that determines the BLAS matrix operation tag ('N','T','C') based on the given boolean flags for conjugation and transposition. | |
| template<Array... As> | |
| static constexpr bool | nda::blas_lapack::has_C_layout |
| Constexpr variable that is true if all given nda::Array types have nda::C_layout. | |
| template<Array... As> | |
| static constexpr bool | nda::blas_lapack::has_F_layout |
| Constexpr variable that is true if all given nda::Array types have nda::F_layout. | |
| template<typename A> | |
| static constexpr bool | nda::blas_lapack::is_conj_array_expr = false |
| Constexpr variable that is true if the given type is a conjugate lazy expression. | |
| template<MemoryArray A> | |
| static constexpr bool | nda::blas_lapack::is_conj_array_expr< expr_call< detail::conj_f, A > > = true |
| Specialization of nda::blas_lapack::is_conj_array_expr for the conjugate lazy expressions. | |
| using nda::blas_lapack::vector_fp_t = vector<get_fp_t<A>, heap<mem::get_addr_space<A>>> |
#include <nda/blas/tools.hpp>
Alias for an nda::vector with the same address space as the given type and its value type determined by nda::get_fp_t<A>.
| A | nda::MemoryArray type. |
| using nda::blas_lapack::vector_value_t = vector<get_value_t<A>, heap<mem::get_addr_space<A>>> |
#include <nda/blas/tools.hpp>
Alias for an nda::vector with the same value type and address space as the given type.
| A | nda::MemoryArray type. |
| auto nda::blas_lapack::batch_ptrs | ( | A && | a | ) |
#include <nda/blas/tools.hpp>
Given a 2- or 3-dimensional array get an array of pointers to each of the submatrices/subvectors indexed by the slowest varying dimension.
| A | nda::MemoryArray of rank 2 or 3. |
| a | Input array. |
| MemoryArray decltype(auto) nda::blas_lapack::get_array | ( | A && | a | ) |
#include <nda/blas/tools.hpp>
Get the underlying array of a conjugate lazy expression or return the array itself in case it is an nda::MemoryArray.
| A | nda::Array type. |
| a | Conjugate expression or array/view. |
| int nda::blas_lapack::get_ld | ( | A const & | a | ) |
#include <nda/blas/tools.hpp>
Get the leading dimension of an nda::MemoryArray with rank 1 or 2 for BLAS/LAPACK calls.
The leading dimension is the stride between two consecutive columns (rows) of a matrix in Fortran (C) layout. For 1-dimensional arrays, we simply return the size of the array.
| A | nda::MemoryArray type. |
| a | nda::MemoryArray object. |
| int nda::blas_lapack::get_ncols | ( | A const & | a | ) |
#include <nda/blas/tools.hpp>
Get the number of columns of an nda::MemoryArray with rank 1 or 2 for BLAS/LAPACK calls.
The number of columns corresponds to the extent of the second (first) dimension of a matrix in Fortran (C) layout. For 1-dimensional arrays, we return 1.
| A | nda::MemoryArray type. |
| a | nda::MemoryArray object. |
| void nda::blas_lapack::resize_or_check_work_buffer | ( | A & | a, |
| long | min_size ) |
#include <nda/blas/tools.hpp>
Resize or check the size of a 1D array/view.
This function is similar to nda::resize_or_check_if_view except that
| A | Type of the object. |
| a | Object to resize or check. |
| min_size | Minimum size. |
|
staticconstexpr |
#include <nda/blas/tools.hpp>
Variable template that determines the BLAS matrix operation tag ('N','T','C') based on the given boolean flags for conjugation and transposition.
| conj | Boolean flag for conjugation. |
| transpose | Boolean flag for transposition. |