24#ifndef MORPHEUS_COO_COPY_IMPL_HPP
25#define MORPHEUS_COO_COPY_IMPL_HPP
27#include <Morpheus_FormatTags.hpp>
29#include <impl/Morpheus_Utils.hpp>
30#include <impl/DenseVector/Morpheus_Copy_Impl.hpp>
35template <
typename SourceType,
typename DestinationType>
36void copy(
const SourceType& src, DestinationType& dst,
37 typename std::enable_if_t<
38 Morpheus::is_coo_matrix_format_container_v<SourceType> &&
39 Morpheus::is_coo_matrix_format_container_v<DestinationType>>* =
42 (dst.nrows() == src.nrows()) && (dst.ncols() == src.ncols()),
43 "Destination matrix must have equal shape to the source matrix");
44 MORPHEUS_ASSERT(dst.nnnz() == src.nnnz(),
45 "Destination matrix must have equal number of non-zeros to "
48 Morpheus::Impl::copy(src.crow_indices(), dst.row_indices());
49 Morpheus::Impl::copy(src.ccolumn_indices(), dst.column_indices());
50 Morpheus::Impl::copy(src.cvalues(), dst.values());
Generic Morpheus interfaces.
Definition: dummy.cpp:24