24#ifndef MORPHEUS_DENSEVECTOR_OPENMP_COPY_IMPL_HPP
25#define MORPHEUS_DENSEVECTOR_OPENMP_COPY_IMPL_HPP
27#include <Morpheus_Macros.hpp>
28#if defined(MORPHEUS_ENABLE_OPENMP)
30#include <Morpheus_SpaceTraits.hpp>
31#include <Morpheus_FormatTraits.hpp>
32#include <Morpheus_FormatTags.hpp>
33#include <Morpheus_Spaces.hpp>
35#include <impl/Morpheus_OpenMPUtils.hpp>
40template <
typename ExecSpace,
typename KeyType,
typename SourceType,
41 typename DestinationType>
43 const KeyType keys,
const SourceType& src, DestinationType& dst,
44 typename std::enable_if_t<
45 Morpheus::is_dense_vector_format_container_v<KeyType> &&
46 Morpheus::is_dense_vector_format_container_v<SourceType> &&
47 Morpheus::is_dense_vector_format_container_v<DestinationType> &&
48 Morpheus::has_custom_backend_v<ExecSpace> &&
49 Morpheus::has_openmp_execution_space_v<ExecSpace> &&
51 DestinationType>>* =
nullptr) {
52 using size_type =
typename KeyType::size_type;
53#pragma omp parallel for
54 for (size_type i = 0; i < keys.size(); i++) {
55 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