24#ifndef MORPHEUS_MATRIXOPERATIONS_HPP
25#define MORPHEUS_MATRIXOPERATIONS_HPP
27#include <impl/Morpheus_MatrixOperations_Impl.hpp>
28#include <impl/Dynamic/Morpheus_MatrixOperations_Impl.hpp>
54template <
typename ExecSpace,
typename Matrix,
typename Vector>
56 Impl::update_diagonal<ExecSpace>(A, diagonal);
70template <
typename ExecSpace,
typename Matrix,
typename Vector>
72 Impl::get_diagonal<ExecSpace>(A, diagonal);
88template <
typename ExecSpace,
typename Matrix,
typename SizeType,
91 Impl::set_value(A, row, col, value);
109template <
typename ExecSpace,
typename Matrix,
typename IndexVector,
110 typename ValueVector>
111void set_values(Matrix& A,
typename IndexVector::value_type m,
112 const IndexVector idxm,
typename IndexVector::value_type n,
113 const IndexVector idxn, ValueVector values) {
114 Impl::set_values<ExecSpace>(A, m, idxm, n, idxn, values);
127template <
typename ExecSpace,
typename Matrix,
typename TransposeMatrix>
129 Impl::transpose<ExecSpace>(A, At);
void get_diagonal(const Matrix &A, Vector &diagonal)
Gets the main diagonal of the matrix and places it in a vector.
Definition: Morpheus_MatrixOperations.hpp:71
void update_diagonal(Matrix &A, const Vector &diagonal)
Updates the main diagonal of the matrix with contents of the diagonal vector.
Definition: Morpheus_MatrixOperations.hpp:55
void transpose(const Matrix &A, TransposeMatrix &At)
Computes the transpose of the given matrix.
Definition: Morpheus_MatrixOperations.hpp:128
void set_value(Matrix &A, SizeType row, SizeType col, ValueType value)
Set a single entry into a matrix.
Definition: Morpheus_MatrixOperations.hpp:90
void set_values(Matrix &A, typename IndexVector::value_type m, const IndexVector idxm, typename IndexVector::value_type n, const IndexVector idxn, ValueVector values)
Inserts or adds a block of values into a matrix.
Definition: Morpheus_MatrixOperations.hpp:111
Generic Morpheus interfaces.
Definition: dummy.cpp:24
A wrapper that checks if the provided type is a scalar type.
Definition: Morpheus_TypeTraits.hpp:85