24#ifndef MORPHEUS_DENSEVECTOR_SERIAL_COPY_IMPL_HPP
25#define MORPHEUS_DENSEVECTOR_SERIAL_COPY_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 KeyType,
typename SourceType,
39 typename DestinationType>
41 const KeyType keys,
const SourceType& src, DestinationType& dst,
42 typename std::enable_if_t<
43 Morpheus::is_dense_vector_format_container_v<KeyType> &&
44 Morpheus::is_dense_vector_format_container_v<SourceType> &&
45 Morpheus::is_dense_vector_format_container_v<DestinationType> &&
46 Morpheus::has_custom_backend_v<ExecSpace> &&
47 Morpheus::has_serial_execution_space_v<ExecSpace> &&
49 DestinationType>>* =
nullptr) {
50 using size_type =
typename KeyType::size_type;
51 MORPHEUS_ASSERT(keys.size() <= src.size(),
52 "Size of keys must be smaller or equal to src size.");
53 MORPHEUS_ASSERT(keys.size() <= dst.size(),
54 "Size of keys must be smaller or equal to dst size.");
56 for (size_type i = 0; i < keys.size(); i++) {
57 dst[i] = src[keys[i]];
Generic Morpheus interfaces.
Definition: dummy.cpp:24
constexpr bool has_access_v
Short-hand to has_access.
Definition: Morpheus_SpaceTraits.hpp:713