| 
    TRIQS/nda 1.3.0
    
   Multi-dimensional array library for C++ 
   | 
 
Interface to parts of the BLAS library.
Typedefs | |
| using | nda::dcomplex = std::complex<double> | 
| Alias for std::complex<double> type.  | |
Functions | |
| template<MemoryVector X, MemoryVector Y>  requires (have_same_value_type_v<X, Y> and mem::have_compatible_addr_space<X, Y> and is_blas_lapack_v<get_value_t<X>>)  | |
| auto | nda::blas::dot (X const &x, Y const &y) | 
| Interface to the BLAS dot and dotu routine.   | |
| template<MemoryVector X, MemoryVector Y>  requires (have_same_value_type_v<X, Y> and mem::have_compatible_addr_space<X, Y> and is_blas_lapack_v<get_value_t<X>>)  | |
| auto | nda::blas::dotc (X const &x, Y const &y) | 
| Interface to the BLAS dotc routine.   | |
| template<Matrix A, Matrix B, MemoryMatrix C>  requires ((MemoryMatrix<A> or is_conj_array_expr<A>) and (MemoryMatrix<B> or is_conj_array_expr<B>) and have_same_value_type_v<A, B, C> and mem::have_compatible_addr_space<A, B, C> and is_blas_lapack_v<get_value_t<A>>)  | |
| void | nda::blas::gemm (get_value_t< A > alpha, A const &a, B const &b, get_value_t< A > beta, C &&c) | 
| Interface to the BLAS gemm routine.   | |
| template<bool is_vbatch = false, Matrix A, Matrix B, MemoryMatrix C>  requires ((MemoryMatrix<A> or is_conj_array_expr<A>) and (MemoryMatrix<B> or is_conj_array_expr<B>) and have_same_value_type_v<A, B, C> and mem::have_compatible_addr_space<A, B, C> and is_blas_lapack_v<get_value_t<A>>)  | |
| void | nda::blas::gemm_batch (get_value_t< A > alpha, std::vector< A > const &va, std::vector< B > const &vb, get_value_t< A > beta, std::vector< C > &vc) | 
| Interface to MKL's gemm_batch and gemm_vbatch routines.   | |
| template<ArrayOfRank< 3 > A, ArrayOfRank< 3 > B, MemoryArrayOfRank< 3 > C>  requires ((MemoryArrayOfRank<A, 3> or is_conj_array_expr<A>) and (MemoryArrayOfRank<B, 3> or is_conj_array_expr<B>) and have_same_value_type_v<A, B, C> and mem::have_compatible_addr_space<A, B, C> and is_blas_lapack_v<get_value_t<A>>)  | |
| void | nda::blas::gemm_batch_strided (get_value_t< A > alpha, A const &a, B const &b, get_value_t< A > beta, C &&c) | 
| Implements a strided batched version of nda::blas::gemm taking 3-dimensional arrays as arguments.   | |
| template<Matrix A, Matrix B, MemoryMatrix C> | |
| void | nda::blas::gemm_vbatch (get_value_t< A > alpha, std::vector< A > const &va, std::vector< B > const &vb, get_value_t< A > beta, std::vector< C > &vc) | 
| Interface to MKL's gemm_vbatch routine.   | |
| template<Matrix A, MemoryVector X, MemoryVector Y>  requires ((MemoryMatrix<A> or is_conj_array_expr<A>) and have_same_value_type_v<A, X, Y> and mem::have_compatible_addr_space<A, X, Y> and is_blas_lapack_v<get_value_t<A>>)  | |
| void | nda::blas::gemv (get_value_t< A > alpha, A const &a, X const &x, get_value_t< A > beta, Y &&y) | 
| Interface to the BLAS gemv routine.   | |
| template<MemoryVector X, MemoryVector Y, MemoryMatrix M>  requires (have_same_value_type_v<X, Y, M> and mem::have_compatible_addr_space<X, Y, M> and is_blas_lapack_v<get_value_t<X>>)  | |
| void | nda::blas::ger (get_value_t< X > alpha, X const &x, Y const &y, M &&m) | 
| Interface to the BLAS ger and geru routine.   | |
| template<Array A>  requires (MemoryArray<A> or is_conj_array_expr<A>)  | |
| MemoryArray decltype(auto) | nda::blas::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::get_ld (A const &a) | 
| Get the leading dimension of an nda::MemoryArray with rank 1 or 2 for LAPACK calls.   | |
| template<MemoryArray A>  requires (get_rank<A> == 1 or get_rank<A> == 2)  | |
| int | nda::blas::get_ncols (A const &a) | 
| Get the number of columns of an nda::MemoryArray with rank 1 or 2 for BLAS/LAPACK calls.   | |
| template<MemoryVector X>  requires (is_blas_lapack_v<get_value_t<X>>)  | |
| void | nda::blas::scal (get_value_t< X > alpha, X &&x) | 
| Interface to the BLAS scal routine.   | |
Variables | |
| template<Array A> | |
| static constexpr char | nda::blas::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 A> | |
| static constexpr bool | nda::blas::has_C_layout | 
| Constexpr variable that is true if the given nda::Array type has a C memory layout.  | |
| template<Array A> | |
| static constexpr bool | nda::blas::has_F_layout | 
| Constexpr variable that is true if the given nda::Array type has a Fortran memory layout.  | |
| template<typename A> | |
| static constexpr bool | nda::blas::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::is_conj_array_expr< expr_call< detail::conj_f, A > > = true | 
| Specialization of nda::blas::is_conj_array_expr for the conjugate lazy expressions.  | |
| auto nda::blas::dot | ( | X const & | x, | 
| Y const & | y ) | 
#include <nda/blas/dot.hpp>
Interface to the BLAS dot and dotu routine.
This function forms the dot product of two vectors. It calculates
\[ \mathbf{x}^T \mathbf{y} \; . \]
| X | nda::MemoryVector type. | 
| Y | nda::MemoryVector type. | 
| x | Input vector \( \mathbf{x} \). | 
| y | Input vector \( \mathbf{y} \). | 
| auto nda::blas::dotc | ( | X const & | x, | 
| Y const & | y ) | 
#include <nda/blas/dot.hpp>
Interface to the BLAS dotc routine.
This function forms the dot product of two vectors. It calculates
\[ \mathbf{x}^H \mathbf{y} \; . \]
If the value type of the input vectors is real, it calls nda::blas::dot and returns a real result.
| X | nda::MemoryVector type. | 
| Y | nda::MemoryVector type. | 
| x | Input vector \( \mathbf{x} \). | 
| y | Input vector \( \mathbf{y} \). | 
| void nda::blas::gemm | ( | get_value_t< A > | alpha, | 
| A const & | a, | ||
| B const & | b, | ||
| get_value_t< A > | beta, | ||
| C && | c ) | 
#include <nda/blas/gemm.hpp>
Interface to the BLAS gemm routine.
This function performs one of the matrix-matrix operations
\[ \mathbf{C} \leftarrow \alpha \mathrm{op}_A(\mathbf{A}) \mathrm{op}_B(\mathbf{B}) + \beta \mathbf{C} \;, \]
where \( \mathrm{op}(\mathbf{X}) \) is one of
Here, \( \alpha \) and \( \beta \) are scalars, and \( \mathbf{A} \), \( \mathbf{B} \) and \( \mathbf{C} \) are matrices of size \( m \times k \), \( k \times n \) and \( m \times n \), respectively.
| A | nda::Matrix type. | 
| B | nda::Matrix type. | 
| C | nda::MemoryMatrix type. | 
| alpha | Input scalar \( \alpha \). | 
| a | Input matrix \( \mathrm{op}_A(\mathbf{A}) \) of size \( m \times k \). | 
| b | Input matrix \( \mathrm{op}_B(\mathbf{B}) \) of size \( k \times n \). | 
| beta | Input scalar \( beta \). | 
| c | Input/Output matrix \( \mathbf{C} \) of size \( m \times n \). | 
| void nda::blas::gemm_batch | ( | get_value_t< A > | alpha, | 
| std::vector< A > const & | va, | ||
| std::vector< B > const & | vb, | ||
| get_value_t< A > | beta, | ||
| std::vector< C > & | vc ) | 
#include <nda/blas/gemm_batch.hpp>
Interface to MKL's gemm_batch and gemm_vbatch routines.
This routine is a batched version of nda::blas::gemm, performing multiple gemm operations in a single call. Each gemm operation performs a matrix-matrix product.
If is_vbatch is true, the matrices are allowed to have different sizes. Otherwise, they are required to have the same size.
See also nda::blas::gemm for more details.
| is_vbatch | Allow variable sized matrices. | 
| A | nda::Matrix type. | 
| B | nda::Matrix type. | 
| C | nda::MemoryMatrix type. | 
| alpha | Input scalar. | 
| va | std::vector of input matrices. | 
| vb | std::vector of input matrices. | 
| beta | Input scalar. | 
| vc | std::vector of input/output matrices. | 
Definition at line 86 of file gemm_batch.hpp.
| void nda::blas::gemm_batch_strided | ( | get_value_t< A > | alpha, | 
| A const & | a, | ||
| B const & | b, | ||
| get_value_t< A > | beta, | ||
| C && | c ) | 
#include <nda/blas/gemm_batch.hpp>
Implements a strided batched version of nda::blas::gemm taking 3-dimensional arrays as arguments.
This function is similar to nda::blas::gemm_batch except that it takes 3-dimensional arrays as arguments instead of vectors of matrices. The first dimension of the arrays indexes the matrices to be multiplied.
| A | nda::ArrayOfRank<3> type. | 
| B | nda::ArrayOfRank<3> type. | 
| C | nda::ArrayOfRank<3> type. | 
| alpha | Input scalar. | 
| a | 3-dimensional input array. | 
| b | 3-dimensional input array. | 
| beta | Input scalar. | 
| c | 3-dimensional input/output array. | 
Definition at line 209 of file gemm_batch.hpp.
| void nda::blas::gemm_vbatch | ( | get_value_t< A > | alpha, | 
| std::vector< A > const & | va, | ||
| std::vector< B > const & | vb, | ||
| get_value_t< A > | beta, | ||
| std::vector< C > & | vc ) | 
#include <nda/blas/gemm_batch.hpp>
Interface to MKL's gemm_vbatch routine.
It simply calls nda::blas::gemm_batch with is_vbatch set to true.
| A | nda::Matrix type. | 
| B | nda::Matrix type. | 
| C | nda::MemoryMatrix type. | 
| alpha | Input scalar. | 
| va | std::vector of input matrices. | 
| vb | std::vector of input matrices. | 
| beta | Input scalar. | 
| vc | std::vector of input/output matrices. | 
Definition at line 187 of file gemm_batch.hpp.
| void nda::blas::gemv | ( | get_value_t< A > | alpha, | 
| A const & | a, | ||
| X const & | x, | ||
| get_value_t< A > | beta, | ||
| Y && | y ) | 
#include <nda/blas/gemv.hpp>
Interface to the BLAS gemv routine.
This function performs one of the matrix-vector operations
where \( \alpha \) and \( \beta \) are scalars, \( \mathbf{A} \) is an \( m \times n \) matrix and \(\mathbf{x} \) and \( \mathbf{y} \) are vectors of sizes \( n \) and \( m \), respectively.
| A | nda::Matrix type. | 
| X | nda::MemoryVector type. | 
| Y | nda::MemoryVector type. | 
| alpha | Input scalar \( \alpha \). | 
| a | Input matrix \( \mathbf{A} \) of size \( m \times n \). | 
| x | Input vector \( \mathbf{x} \) of size \( n \). | 
| beta | Input scalar \( beta \). | 
| y | Input/Output vector \( \mathbf{y} \) of size \( m \). | 
| void nda::blas::ger | ( | get_value_t< X > | alpha, | 
| X const & | x, | ||
| Y const & | y, | ||
| M && | m ) | 
#include <nda/blas/ger.hpp>
Interface to the BLAS ger and geru routine.
This function performs the rank 1 operation
\[ \mathbf{M} \leftarrow \alpha \mathbf{x} \mathbf{y}^T + \mathbf{M} \; , \]
where \( \alpha \) is a scalar, \( \mathbf{x} \) is an \( m \) element vector, \( \mathbf{y} \) is an \( n \) element vector and \( \mathbf{M} \) is an \( m \times n \) matrix.
| X | nda::MemoryVector type. | 
| Y | nda::MemoryVector type. | 
| M | nda::MemoryMatrix type. | 
| alpha | Input scalar \( \alpha \). | 
| x | Input vector \( \mathbf{x} \) of size \( m \). | 
| y | Input vector \( \mathbf{y} \) of size \( n \). | 
| m | Input/Output matrix \( \mathbf{M} \) of size \( m \times n \) to which the outer product is added. | 
| MemoryArray decltype(auto) nda::blas::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::get_ld | ( | A const & | a | ) | 
#include <nda/blas/tools.hpp>
Get the leading dimension of an nda::MemoryArray with rank 1 or 2 for 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::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::scal | ( | get_value_t< X > | alpha, | 
| X && | x ) | 
#include <nda/blas/scal.hpp>
Interface to the BLAS scal routine.
Scales a vector by a constant. This function calculates \( \mathbf{x} \leftarrow \alpha \mathbf{x} \), where \( \alpha \) is a scalar constant and \( \mathbf{x} \) is a vector.
| X | nda::MemoryVector type. | 
| alpha | Input scalar \( \alpha \). | 
| x | Input/Output vector \( \mathbf{x} \) to be scaled. | 
      
  | 
  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. |