24#ifndef MORPHEUS_DYNAMIC_MATRIXOPERATIONS_IMPL_HPP
25#define MORPHEUS_DYNAMIC_MATRIXOPERATIONS_IMPL_HPP
27#include <Morpheus_FormatTags.hpp>
29#include <impl/Morpheus_MatrixOperations_Impl.hpp>
30#include <impl/Morpheus_Variant.hpp>
34template <
typename ExecSpace,
typename Matrix,
typename Vector>
35inline void update_diagonal(
36 Matrix& A,
const Vector& diagonal,
37 typename std::enable_if<
42 [&](
auto&& arg) { Impl::update_diagonal<ExecSpace>(arg, diagonal); },
46template <
typename ExecSpace,
typename Matrix,
typename Vector>
47inline void get_diagonal(
48 const Matrix& A, Vector& diagonal,
49 typename std::enable_if<
54 [&](
auto&& arg) { Impl::get_diagonal<ExecSpace>(arg, diagonal); },
58template <
typename ExecSpace,
typename Matrix,
typename SizeType,
61 Matrix& A, SizeType row, SizeType col, ValueType value,
62 typename std::enable_if<
66 [&](
auto&& arg) { Impl::set_value<ExecSpace>(arg, row, col, value); },
70template <
typename ExecSpace,
typename Matrix,
typename IndexVector,
72inline void set_values(
73 Matrix& A,
typename IndexVector::value_type m,
const IndexVector idxm,
74 typename IndexVector::value_type n,
const IndexVector idxn,
76 typename std::enable_if<
83 Impl::set_value<ExecSpace>(arg, m, idxm, n, idxn, values);
88template <
typename ExecSpace,
typename Matrix,
typename TransposeMatrix>
90 const Matrix& A, TransposeMatrix& At,
91 typename std::enable_if<
95 Impl::Variant::visit([&](
auto&& arg) { Impl::transpose<ExecSpace>(arg, At); },
99template <
typename ExecSpace,
typename Matrix,
typename TransposeMatrix>
100inline void transpose(
101 const Matrix& A, TransposeMatrix& At,
102 typename std::enable_if<
106 Impl::Variant::visit(
107 [&](
auto&& arg1,
auto&& arg2) { Impl::transpose<ExecSpace>(arg1, arg2); },
108 A.const_formats(), At.formats());
A valid Sparse Matrix container is the one that has a valid Sparse Matrix tag i.e satisfies the has_s...
Definition: Morpheus_FormatTraits.hpp:85
Generic Morpheus interfaces.
Definition: dummy.cpp:24