45 #ifndef KOKKOS_OPENMPTARGET_HPP
46 #define KOKKOS_OPENMPTARGET_HPP
48 #include <Kokkos_Core_fwd.hpp>
50 #if defined(KOKKOS_ENABLE_OPENMPTARGET) && defined(_OPENMP)
56 #include <Kokkos_OpenMPTargetSpace.hpp>
57 #include <Kokkos_ScratchSpace.hpp>
59 #include <Kokkos_TaskPolicy.hpp>
61 #include <impl/Kokkos_Tags.hpp>
62 #include <impl/Kokkos_Profiling_Interface.hpp>
63 #include <KokkosExp_MDRangePolicy.hpp>
67 namespace Experimental {
69 class OpenMPTargetInternal;
81 typedef OpenMPTarget execution_space;
82 typedef OpenMPTargetSpace memory_space;
84 typedef Kokkos::Device<execution_space, memory_space> device_type;
86 typedef LayoutLeft array_layout;
87 typedef memory_space::size_type size_type;
89 typedef ScratchMemorySpace<OpenMPTarget> scratch_memory_space;
91 inline static bool in_parallel() {
return omp_in_parallel(); }
96 static int concurrency();
101 static const char* name();
104 void impl_finalize();
107 static int impl_is_initialized();
110 void impl_initialize();
112 inline Impl::OpenMPTargetInternal* impl_internal_space_instance()
const {
113 return m_space_instance;
117 uint32_t impl_instance_id() const noexcept {
return 0; }
120 Impl::OpenMPTargetInternal* m_space_instance;
124 namespace Profiling {
125 namespace Experimental {
127 struct DeviceTypeTraits<::Kokkos::Experimental::OpenMPTarget> {
128 static constexpr DeviceType
id =
129 ::Kokkos::Profiling::Experimental::DeviceType::OpenMPTarget;
142 struct VerifyExecutionCanAccessMemorySpace<
143 Kokkos::Experimental::OpenMPTarget::memory_space,
144 Kokkos::Experimental::OpenMPTarget::scratch_memory_space> {
145 enum { value =
true };
146 inline static void verify(
void) {}
147 inline static void verify(
const void*) {}
156 #include <OpenMPTarget/Kokkos_OpenMPTarget_Exec.hpp>
157 #include <OpenMPTarget/Kokkos_OpenMPTarget_Parallel.hpp>
158 #include <OpenMPTarget/Kokkos_OpenMPTarget_Parallel_MDRange.hpp>
159 #include <OpenMPTarget/Kokkos_OpenMPTarget_Task.hpp>
void print_configuration(std::ostream &, const bool detail=false)
Print "Bill of Materials".
Declaration of various MemoryLayout options.
Declaration of parallel operators.