atlas::linalg namespace

Namespaces

namespace dense
namespace introspection
namespace sparse
namespace view

Classes

class EckitSparseMatrixNonOwningAllocator
class FFT
class FFTW
class MatrixMultiply
class pocketfft
class SparseMatrixMultiply
class SparseMatrixStorage
SparseMatrixStorage Storage class based on atlas::array::Array with GPU offload capability This class contains only the data and no operators, iterators, or special sparse matrix construction from triplets etc.
template<typename Value, typename Index = eckit::linalg::Index>
class SparseMatrixView
template<typename Value, typename Index>
class Triplet
A triplet which represents a non-zero entry in a sparse matrix.

Enums

enum class Indexing { layout_left, layout_right }

Typedefs

using Matrix = eckit::linalg::Matrix
using Configuration = eckit::Configuration
template<typename Value, int Rank>
using View = array::LocalView<Value, Rank>
template<typename View>
using view_type = typename view::ConvertView<View>::type

Functions

template<typename Matrix>
void matrix_multiply(const Matrix& A, const Matrix& B, Matrix& C)
template<typename Matrix>
void matrix_multiply(const Matrix& A, const Matrix& B, Matrix& C, const eckit::Configuration&)
auto make_non_owning_eckit_sparse_matrix(const SparseMatrixView<eckit::linalg::Scalar, eckit::linalg::Index>& view) -> eckit::linalg::SparseMatrix
auto make_non_owning_eckit_sparse_matrix(const SparseMatrixStorage& m) -> eckit::linalg::SparseMatrix
auto make_eckit_sparse_matrix(const SparseMatrixView<eckit::linalg::Scalar, eckit::linalg::Index>& view) -> eckit::linalg::SparseMatrix
auto make_eckit_sparse_matrix(const SparseMatrixStorage& m) -> eckit::linalg::SparseMatrix
template<typename OutputT, typename InputT>
void host_copy_eckit(const InputT* input_data, array::Array& output)
auto make_sparse_matrix_storage(eckit::linalg::SparseMatrix&& m) -> SparseMatrixStorage
template<typename value_type, typename index_type = eckit::linalg::Index>
auto make_sparse_matrix_storage(eckit::linalg::SparseMatrix&& m) -> SparseMatrixStorage
auto make_sparse_matrix_storage(const eckit::linalg::SparseMatrix& m) -> SparseMatrixStorage
template<typename value_type, typename index_type = eckit::linalg::Index>
auto make_sparse_matrix_storage(const eckit::linalg::SparseMatrix& m) -> SparseMatrixStorage
template<typename Matrix, typename SourceView, typename TargetView>
void sparse_matrix_multiply(const Matrix& matrix, const SourceView& src, TargetView& tgt)
template<typename Matrix, typename SourceView, typename TargetView>
void sparse_matrix_multiply(const Matrix& matrix, const SourceView& src, TargetView&& tgt)
template<typename Matrix, typename SourceView, typename TargetView>
void sparse_matrix_multiply(const Matrix& matrix, const SourceView& src, TargetView& tgt, const Configuration& config)
template<typename Matrix, typename SourceView, typename TargetView>
void sparse_matrix_multiply(const Matrix& matrix, const SourceView& src, TargetView& tgt, Indexing)
template<typename Matrix, typename SourceView, typename TargetView>
void sparse_matrix_multiply(const Matrix& matrix, const SourceView& src, TargetView& tgt, Indexing, const Configuration& config)
template<typename Matrix, typename SourceView, typename TargetView>
void sparse_matrix_multiply_add(const Matrix& matrix, const SourceView& src, TargetView& tgt)
template<typename Matrix, typename SourceView, typename TargetView>
void sparse_matrix_multiply_add(const Matrix& matrix, const SourceView& src, TargetView& tgt, const Configuration& config)
template<typename Matrix, typename SourceView, typename TargetView>
void sparse_matrix_multiply_add(const Matrix& matrix, const SourceView& src, TargetView& tgt, Indexing)
template<typename Matrix, typename SourceView, typename TargetView>
void sparse_matrix_multiply_add(const Matrix& matrix, const SourceView& src, TargetView& tgt, Indexing, const Configuration& config)
template<typename value_type, typename index_type = eckit::linalg::Index>
auto make_sparse_matrix_storage(const SparseMatrixStorage& other) -> SparseMatrixStorage
template<typename value_type, typename index_type = eckit::linalg::Index>
auto make_sparse_matrix_storage(SparseMatrixStorage&& other) -> SparseMatrixStorage
template<typename Value, typename Index = eckit::linalg::Index>
auto make_host_view(const SparseMatrixStorage& m) -> SparseMatrixView<Value, Index>
template<typename Value, typename Index = eckit::linalg::Index>
auto make_device_view(const SparseMatrixStorage& m) -> SparseMatrixView<Value, Index>
template<typename ViewIndex, typename ViewValue, typename Index, typename Value>
void sparse_matrix_to_rows_columns_values(const linalg::SparseMatrixView<ViewValue, ViewIndex>& mat, Index rows[], Index columns[], Value values[])
template<typename ViewIndex, typename ViewValue, typename Index, typename Value>
void sparse_matrix_to_rows_columns_values(const linalg::SparseMatrixView<ViewValue, ViewIndex>& mat, std::vector<Index>& rows, std::vector<Index>& columns, std::vector<Value>& values)
template<typename Index, typename Value>
void sparse_matrix_to_rows_columns_values(const SparseMatrixStorage& mat, std::vector<Index>& rows, std::vector<Index>& columns, std::vector<Value>& values)
template<typename SparseMatrixValue = eckit::linalg::Scalar, typename SparseMatrixIndex = eckit::linalg::Index, typename Value, typename Index, typename IndexBase>
auto make_sparse_matrix_storage_from_rows_columns_values(std::size_t nr, std::size_t nc, std::size_t nnz, const Index rows[], const Index cols[], const Value vals[], const IndexBase index_base = 0, bool is_sorted = true) -> SparseMatrixStorage
template<typename SparseMatrixValue = eckit::linalg::Scalar, typename SparseMatrixIndex = eckit::linalg::Index, typename Value, typename Index, typename IndexBase>
auto make_sparse_matrix_storage_from_rows_columns_values(std::size_t nr, std::size_t nc, const std::vector<Index>& rows, const std::vector<Index>& cols, const std::vector<Value>& vals, const IndexBase index_base = 0, bool is_sorted = true) -> SparseMatrixStorage
template<typename Iter>
auto make_sparse_matrix_storage_from_triplets(std::size_t n_rows, std::size_t n_cols, Iter triplets_begin, Iter triplets_end) -> std::enable_if_t<detail::is_triplet_iterator<Iter>, SparseMatrixStorage>
Construct a SparseMatrixStorage from a range of triplets.
template<typename Iter>
auto make_sparse_matrix_storage_from_triplets(std::size_t n_rows, std::size_t n_cols, std::size_t n_non_zero, Iter triplets_begin, bool is_sorted = false) -> std::enable_if_t<detail::is_triplet_iterator<Iter> && detail::is_sortable_iterator<Iter>, SparseMatrixStorage>
Construct a SparseMatrixStorage from a random-access range of triplets, sorting if necessary.
template<typename Value, typename Index>
auto make_sparse_matrix_storage_from_triplets(std::size_t n_rows, std::size_t n_cols, std::vector<Triplet<Value, Index>>& triplets, bool is_sorted = false) -> SparseMatrixStorage
Construct a SparseMatrixStorage from a vector of triplets, sorting if necessary.
template<typename Value, typename Index, typename Functor>
auto sparse_matrix_for_each_row(std::size_t row, const SparseMatrixView<Value, Index>& matrix, Functor&& functor) -> std::enable_if_t<std::is_invocable_v<Functor, Index, Index, Value>>
For-each iteration over all non-zero triplets in row.
template<typename Value, typename Index, typename Functor>
auto sparse_matrix_for_each(const SparseMatrixView<Value, Index>& matrix, Functor&& functor) -> std::enable_if_t<std::is_invocable_v<Functor, Index, Index, Value>>
For-each iteration over all non-zero triplets in matrix.
template<typename T>
auto make_view(T& view) -> view_type<T>