Morpheus 1.0.0
Dynamic matrix type and algorithms for sparse matrices
Loading...
Searching...
No Matches
Coo/Kokkos/Morpheus_Multiply_Impl.hpp
1
24#ifndef MORPHEUS_COO_KOKKOS_MULTIPLY_IMPL_HPP
25#define MORPHEUS_COO_KOKKOS_MULTIPLY_IMPL_HPP
26
27#include <Morpheus_Exceptions.hpp>
28#include <Morpheus_SpaceTraits.hpp>
29#include <Morpheus_FormatTraits.hpp>
30#include <Morpheus_FormatTags.hpp>
31#include <Morpheus_Spaces.hpp>
32
33#include <impl/Coo/Serial/Morpheus_Multiply_Impl.hpp>
34#include <impl/Coo/OpenMP/Morpheus_Multiply_Impl.hpp>
35#include <impl/Coo/Cuda/Morpheus_Multiply_Impl.hpp>
36#include <impl/Coo/HIP/Morpheus_Multiply_Impl.hpp>
37
38namespace Morpheus {
39namespace Impl {
40
41template <typename ExecSpace, typename Matrix, typename Vector>
42inline void multiply(
43 const Matrix& A, const Vector& x, Vector& y, const bool init,
44 typename std::enable_if_t<
45 Morpheus::is_coo_matrix_format_container_v<Matrix> &&
46 Morpheus::is_dense_vector_format_container_v<Vector> &&
47 Morpheus::has_generic_backend_v<ExecSpace> &&
48 Morpheus::has_access_v<ExecSpace, Matrix, Vector>>* = nullptr) {
50 Impl::multiply<backend>(A, x, y, init);
51}
52
53} // namespace Impl
54} // namespace Morpheus
55
56#endif // MORPHEUS_COO_KOKKOS_MULTIPLY_IMPL_HPP
Generic Morpheus interfaces.
Definition: dummy.cpp:24
A wrapper that converts a valid space into a custom backend.
Definition: Morpheus_CustomBackend.hpp:75