Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Namespaces | Typedefs | Enumerations | Functions
dense_linalg.hpp File Reference
#include <uni20/backend/blas/blas_int.hpp>
#include <uni20/backend/lapack/lapack.hpp>
#include <uni20/config.hpp>
#include <uni20/core/scalar_concepts.hpp>
#include <uni20/core/scalar_traits.hpp>
#include <uni20/core/math.hpp>
#include <uni20/linalg/backends/cpu/matrix_exponential.hpp>
#include <uni20/linalg/linalg.hpp>
#include <uni20/mdspan/mdspan.hpp>
#include <uni20/tensor/tensor.hpp>
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstddef>
#include <memory>
#include <span>
#include <stdexcept>
#include <type_traits>
#include <vector>
Include dependency graph for dense_linalg.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  uni20
 
namespace  uni20::krylov
 

Typedefs

using uni20::krylov::MatrixFill = uni20::linalg::MatrixRegion
 Matrix region selected by LAPACK-style copy and set operations.
 
template<typename Scalar >
using uni20::krylov::RightMatrix = uni20::DenseMatrix< Scalar, uni20::RowMajor >
 Owning row-major dense matrix retained for layout-specific Krylov helpers.
 

Enumerations

enum class  uni20::krylov::MatrixNorm { uni20::krylov::MaxAbs , uni20::krylov::One , uni20::krylov::Infinity , uni20::krylov::Frobenius }
 LAPACK-compatible dense matrix norm selector. More...
 
enum class  uni20::krylov::MatrixSide { uni20::krylov::Left , uni20::krylov::Right }
 Matrix side selected by LAPACK-style multiply and solve operations. More...
 
enum class  uni20::krylov::MatrixTranspose { uni20::krylov::None , uni20::krylov::Transpose , uni20::krylov::ConjugateTranspose }
 Matrix transpose mode for local dense Krylov operations. More...
 

Functions

template<typename Scalar >
void uni20::krylov::axpy (std::span< Scalar > y, Scalar const &alpha, std::span< Scalar const > x)
 Add a scaled local dense vector to another vector.
 
template<typename Scalar >
void uni20::krylov::copy (std::span< Scalar > destination, std::span< Scalar const > source)
 Copy a local dense vector.
 
template<typename Scalar >
RightMatrix< Scalar > uni20::krylov::copy_left_to_right (uni20::DenseMatrix< Scalar > const &matrix)
 Copy a column-major DenseMatrix into a row-major matrix.
 
template<typename Scalar >
uni20::DenseMatrix< Scalar > uni20::krylov::copy_right_to_left (RightMatrix< Scalar > const &matrix)
 Copy a row-major matrix into a column-major DenseMatrix.
 
template<uni20::Real Scalar>
Scalar uni20::krylov::dot (std::span< Scalar const > x, std::span< Scalar const > y)
 Compute a BLAS-style real dot product.
 
template<typename Scalar >
Scalar uni20::krylov::dotc (std::span< Scalar const > x, std::span< Scalar const > y)
 Compute a conjugated dot product.
 
template<typename Scalar >
Scalar uni20::krylov::dotu (std::span< Scalar const > x, std::span< Scalar const > y)
 Compute an unconjugated dot product.
 
template<typename Scalar >
void uni20::krylov::gemv (std::span< Scalar > y, Scalar const &alpha, uni20::DenseMatrix< Scalar > const &matrix, std::span< Scalar const > x, Scalar const &beta, MatrixTranspose transpose=MatrixTranspose::None)
 Compute a dense matrix-vector product.
 
template<typename Scalar >
void uni20::krylov::gerc (uni20::DenseMatrix< Scalar > &matrix, Scalar const &alpha, std::span< Scalar const > x, std::span< Scalar const > y)
 Apply a conjugated dense rank-one update.
 
template<typename Scalar >
void uni20::krylov::geru (uni20::DenseMatrix< Scalar > &matrix, Scalar const &alpha, std::span< Scalar const > x, std::span< Scalar const > y)
 Apply a dense rank-one update.
 
template<typename Scalar >
void uni20::krylov::lacpy (uni20::DenseMatrix< Scalar > &destination, uni20::DenseMatrix< Scalar > const &source, MatrixFill fill)
 Copy a selected region of a local dense matrix.
 
template<typename Scalar >
void uni20::krylov::laset (uni20::DenseMatrix< Scalar > &matrix, Scalar const &diagonal, Scalar const &off_diagonal, MatrixFill fill)
 Set a selected region of a local dense matrix.
 
template<typename Scalar >
auto uni20::krylov::right_mdspan (RightMatrix< Scalar > &matrix)
 Return a mutable layout-right mdspan view of a prototype right-layout matrix.
 
template<typename Scalar >
auto uni20::krylov::right_mdspan (RightMatrix< Scalar > const &matrix)
 Return an immutable layout-right mdspan view of a prototype right-layout matrix.
 
template<typename Scalar >
void uni20::krylov::scal (Scalar const &alpha, std::span< Scalar > vector)
 Scale a local dense vector in place.