24#ifndef MORPHEUS_COO_SERIAL_CONVERT_IMPL_HPP
25#define MORPHEUS_COO_SERIAL_CONVERT_IMPL_HPP
27#include <Morpheus_Macros.hpp>
28#if defined(MORPHEUS_ENABLE_SERIAL)
30#include <Morpheus_SpaceTraits.hpp>
31#include <Morpheus_FormatTraits.hpp>
32#include <Morpheus_FormatTags.hpp>
33#include <Morpheus_Spaces.hpp>
38template <
typename ExecSpace,
typename SourceType,
typename DestinationType>
40 const SourceType& src, DestinationType& dst,
41 typename std::enable_if<
42 Morpheus::is_coo_matrix_format_container_v<SourceType> &&
43 Morpheus::is_coo_matrix_format_container_v<DestinationType> &&
44 Morpheus::has_custom_backend_v<ExecSpace> &&
45 Morpheus::has_serial_execution_space_v<ExecSpace> &&
46 Morpheus::has_access_v<ExecSpace, SourceType, DestinationType>>::type* =
48 using size_type =
typename SourceType::size_type;
50 dst.resize(src.nrows(), src.ncols(), src.nnnz());
53 for (size_type n = 0; n < src.nnnz(); n++) {
54 dst.row_indices(n) = src.crow_indices(n);
57 for (size_type n = 0; n < src.nnnz(); n++) {
58 dst.column_indices(n) = src.ccolumn_indices(n);
61 for (size_type n = 0; n < src.nnnz(); n++) {
62 dst.values(n) = src.cvalues(n);
Generic Morpheus interfaces.
Definition: dummy.cpp:24