24#ifndef MORPHEUS_CONVERT_IMPL_HPP
25#define MORPHEUS_CONVERT_IMPL_HPP
27#include <Morpheus_FormatTags.hpp>
29#include <fwd/Morpheus_Fwd_CooMatrix.hpp>
31#include <impl/DenseVector/Serial/Morpheus_Convert_Impl.hpp>
32#include <impl/DenseVector/OpenMP/Morpheus_Convert_Impl.hpp>
33#include <impl/DenseVector/Cuda/Morpheus_Convert_Impl.hpp>
34#include <impl/DenseVector/HIP/Morpheus_Convert_Impl.hpp>
35#include <impl/DenseVector/Kokkos/Morpheus_Convert_Impl.hpp>
37#include <impl/DenseMatrix/Serial/Morpheus_Convert_Impl.hpp>
38#include <impl/DenseMatrix/OpenMP/Morpheus_Convert_Impl.hpp>
39#include <impl/DenseMatrix/Cuda/Morpheus_Convert_Impl.hpp>
40#include <impl/DenseMatrix/HIP/Morpheus_Convert_Impl.hpp>
41#include <impl/DenseMatrix/Kokkos/Morpheus_Convert_Impl.hpp>
43#include <impl/Coo/Serial/Morpheus_Convert_Impl.hpp>
44#include <impl/Coo/OpenMP/Morpheus_Convert_Impl.hpp>
45#include <impl/Coo/Cuda/Morpheus_Convert_Impl.hpp>
46#include <impl/Coo/HIP/Morpheus_Convert_Impl.hpp>
47#include <impl/Coo/Kokkos/Morpheus_Convert_Impl.hpp>
49#include <impl/Csr/Serial/Morpheus_Convert_Impl.hpp>
50#include <impl/Csr/OpenMP/Morpheus_Convert_Impl.hpp>
51#include <impl/Csr/Cuda/Morpheus_Convert_Impl.hpp>
52#include <impl/Csr/HIP/Morpheus_Convert_Impl.hpp>
53#include <impl/Csr/Kokkos/Morpheus_Convert_Impl.hpp>
55#include <impl/Dia/Serial/Morpheus_Convert_Impl.hpp>
56#include <impl/Dia/OpenMP/Morpheus_Convert_Impl.hpp>
57#include <impl/Dia/Cuda/Morpheus_Convert_Impl.hpp>
58#include <impl/Dia/HIP/Morpheus_Convert_Impl.hpp>
59#include <impl/Dia/Kokkos/Morpheus_Convert_Impl.hpp>
65template <
typename ExecSpace,
typename SourceType,
typename DestinationType>
66void convert(
const SourceType& src, DestinationType& dst,
67 typename std::enable_if_t<
68 is_matrix_container_v<SourceType> &&
69 is_matrix_container_v<DestinationType> &&
70 !is_dynamic_matrix_format_container_v<SourceType> &&
71 !is_dynamic_matrix_format_container_v<DestinationType> &&
72 !is_coo_matrix_format_container_v<SourceType> &&
73 !is_coo_matrix_format_container_v<DestinationType> &&
74 !has_same_format_v<SourceType, DestinationType>>* =
nullptr) {
75 using ValueType =
typename SourceType::value_type;
76 using IndexType =
typename SourceType::index_type;
77 using ArrayLayout =
typename SourceType::array_layout;
78 using MemorySpace =
typename SourceType::memory_space;
79 using Backend =
typename ExecSpace::backend;
81 using Coo = CooMatrix<ValueType, IndexType, ArrayLayout,
85 Impl::convert<ExecSpace>(src, tmp);
86 Impl::convert<ExecSpace>(tmp, dst);
Generic Morpheus interfaces.
Definition: dummy.cpp:24
A type that binds together the execution, memory space and backend.
Definition: Morpheus_Spaces.hpp:39