eckit::linalg::LinearAlgebra class

Public static functions

static auto backend() -> const LinearAlgebra&
Get the currently selected backend (instance)
static void backend(const std::string& name)
Select specific backend by name (re-setting default)
static auto list(std::ostream&) -> std::ostream&
List all available backends.
static auto getBackend(const std::string& name) -> const LinearAlgebra&
Get specific backend by name.
static auto hasBackend(const std::string& name) -> bool
Check if a backend is available.
static auto getDenseBackend(const std::string& name = "") -> const LinearAlgebraDense&
Get current or specific LinearAlgebraDense backend.
static auto getSparseBackend(const std::string& name = "") -> const LinearAlgebraSparse&
Get current or specific LinearAlgebraSparse backend.
static auto denseBackend(const std::string& name = "") -> const LinearAlgebraDense&
Get current or specific LinearAlgebraDense backend (re-setting default)
static auto sparseBackend(const std::string& name = "") -> const LinearAlgebraSparse&
Get current or specific LinearAlgebraSparse backend (re-setting default)
static auto hasDenseBackend(const std::string& name) -> bool
Check if a LinearAlgebraDense backend is available.
static auto hasSparseBackend(const std::string& name) -> bool
Check if a LinearAlgebraSparse backend is available.
static auto name() -> std::string
Return active backend name.
static auto dot(const Vector& x, const Vector& y) -> Scalar
Compute the inner product of vectors x and y.
static void gemv(const Matrix& A, const Vector& x, Vector& y)
static void gemm(const Matrix& A, const Matrix& X, Matrix& Y)
static void spmv(const SparseMatrix& A, const Vector& x, Vector& y)
static void spmm(const SparseMatrix& A, const Matrix& X, Matrix& Y)
static void dsptd(const Vector& x, const SparseMatrix& A, const Vector& y, SparseMatrix& B)

Friends

auto operator<<(std::ostream& s, const LinearAlgebra&) -> std::ostream&

Function documentation

static void eckit::linalg::LinearAlgebra::gemv(const Matrix& A, const Vector& x, Vector& y)

Compute the product of a dense matrix A and vector x

static void eckit::linalg::LinearAlgebra::gemm(const Matrix& A, const Matrix& X, Matrix& Y)

Compute the product of dense matrices A and X

static void eckit::linalg::LinearAlgebra::spmv(const SparseMatrix& A, const Vector& x, Vector& y)

Compute the product of a sparse matrix A and vector x

static void eckit::linalg::LinearAlgebra::spmm(const SparseMatrix& A, const Matrix& X, Matrix& Y)

Compute the product of sparse matrix A and dense matrix X

static void eckit::linalg::LinearAlgebra::dsptd(const Vector& x, const SparseMatrix& A, const Vector& y, SparseMatrix& B)

Compute the product x A' y with x and y diagonal matrices stored as vectors and A a sparse matrix