24#ifndef MORPHEUS_DIA_COPY_IMPL_HPP
25#define MORPHEUS_DIA_COPY_IMPL_HPP
27#include <Morpheus_FormatTags.hpp>
29#include <impl/Morpheus_Utils.hpp>
30#include <impl/DenseVector/Morpheus_Copy_Impl.hpp>
31#include <impl/DenseMatrix/Morpheus_Copy_Impl.hpp>
36template <
typename SourceType,
typename DestinationType>
37void copy(
const SourceType& src, DestinationType& dst,
38 typename std::enable_if_t<
39 Morpheus::is_dia_matrix_format_container_v<SourceType> &&
40 Morpheus::is_dia_matrix_format_container_v<DestinationType>>* =
43 (dst.nrows() == src.nrows()) && (dst.ncols() == src.ncols()),
44 "Destination matrix must have equal shape to the source matrix");
45 MORPHEUS_ASSERT(dst.nnnz() == src.nnnz(),
46 "Destination matrix must have equal number of non-zeros to "
49 dst.diagonal_offsets().size() == src.cdiagonal_offsets().size(),
50 "Destination matrix must have equal number of diagonals to the source "
53 Morpheus::Impl::copy(src.cdiagonal_offsets(), dst.diagonal_offsets());
54 Morpheus::Impl::copy(src.cvalues(), dst.values());
Generic Morpheus interfaces.
Definition: dummy.cpp:24