Morpheus 1.0.0
Dynamic matrix type and algorithms for sparse matrices
Loading...
Searching...
No Matches
DenseMatrix/Cuda/Morpheus_Convert_Impl.hpp
1
24#ifndef MORPHEUS_DENSEMATRIX_CUDA_CONVERT_IMPL_HPP
25#define MORPHEUS_DENSEMATRIX_CUDA_CONVERT_IMPL_HPP
26
27#include <Morpheus_Macros.hpp>
28#if defined(MORPHEUS_ENABLE_CUDA)
29
30#include <Morpheus_Exceptions.hpp>
31#include <Morpheus_SpaceTraits.hpp>
32#include <Morpheus_FormatTraits.hpp>
33#include <Morpheus_FormatTags.hpp>
34#include <Morpheus_Spaces.hpp>
35
36namespace Morpheus {
37namespace Impl {
38
39template <typename ExecSpace, typename SourceType, typename DestinationType>
40void convert(
41 const SourceType&, DestinationType&,
42 typename std::enable_if<
43 Morpheus::is_dense_matrix_format_container_v<SourceType> &&
44 Morpheus::is_dense_matrix_format_container_v<DestinationType> &&
45 Morpheus::has_custom_backend_v<ExecSpace> &&
46 Morpheus::has_cuda_execution_space_v<ExecSpace> &&
47 Morpheus::has_access_v<ExecSpace, SourceType, DestinationType>>::type* =
48 nullptr) {
49 throw Morpheus::NotImplementedException("convert<Kokkos::Cuda>");
50}
51
52template <typename ExecSpace, typename SourceType, typename DestinationType>
53void convert(
54 const SourceType&, DestinationType&,
55 typename std::enable_if<
56 Morpheus::is_dense_matrix_format_container_v<SourceType> &&
57 Morpheus::is_dense_vector_format_container_v<DestinationType> &&
58 Morpheus::has_custom_backend_v<ExecSpace> &&
59 Morpheus::has_cuda_execution_space_v<ExecSpace> &&
60 Morpheus::has_access_v<ExecSpace, SourceType, DestinationType>>::type* =
61 nullptr) {
62 throw Morpheus::NotImplementedException("convert<Kokkos::Cuda>");
63}
64
65template <typename ExecSpace, typename SourceType, typename DestinationType>
66void convert(
67 const SourceType&, DestinationType&,
68 typename std::enable_if<
69 Morpheus::is_dense_matrix_format_container_v<SourceType> &&
70 Morpheus::is_coo_matrix_format_container_v<DestinationType> &&
71 Morpheus::has_custom_backend_v<ExecSpace> &&
72 Morpheus::has_cuda_execution_space_v<ExecSpace> &&
73 Morpheus::has_access_v<ExecSpace, SourceType, DestinationType>>::type* =
74 nullptr) {
75 throw Morpheus::NotImplementedException("convert<Kokkos::Cuda>");
76}
77
78template <typename ExecSpace, typename SourceType, typename DestinationType>
79void convert(
80 const SourceType&, DestinationType&,
81 typename std::enable_if<
82 Morpheus::is_coo_matrix_format_container_v<SourceType> &&
83 Morpheus::is_dense_matrix_format_container_v<DestinationType> &&
84 Morpheus::has_custom_backend_v<ExecSpace> &&
85 Morpheus::has_cuda_execution_space_v<ExecSpace> &&
86 Morpheus::has_access_v<ExecSpace, SourceType, DestinationType>>::type* =
87 nullptr) {
88 throw Morpheus::NotImplementedException("convert<Kokkos::Cuda>");
89}
90
91} // namespace Impl
92} // namespace Morpheus
93
94#endif // MORPHEUS_ENABLE_CUDA
95#endif // MORPHEUS_DENSEMATRIX_CUDA_CONVERT_IMPL_HPP
Definition: Morpheus_Exceptions.hpp:43
Generic Morpheus interfaces.
Definition: dummy.cpp:24