44 #ifndef KOKKOS_OPENMPTARGET_HPP
45 #define KOKKOS_OPENMPTARGET_HPP
47 #include <Kokkos_Core_fwd.hpp>
49 #if defined( KOKKOS_ENABLE_OPENMPTARGET ) && defined( _OPENMP )
55 #include <Kokkos_OpenMPTargetSpace.hpp>
56 #include <Kokkos_ScratchSpace.hpp>
58 #include <Kokkos_TaskPolicy.hpp>
60 #include <impl/Kokkos_Tags.hpp>
62 #include <KokkosExp_MDRangePolicy.hpp>
66 namespace Experimental {
76 typedef OpenMPTarget execution_space ;
77 typedef OpenMPTargetSpace memory_space ;
79 typedef Kokkos::Device<execution_space,memory_space> device_type;
81 typedef LayoutLeft array_layout ;
82 typedef memory_space::size_type size_type ;
84 typedef ScratchMemorySpace< OpenMPTarget > scratch_memory_space ;
91 inline static bool in_parallel() {
return omp_in_parallel(); }
100 static void fence() {}
117 static void initialize(
unsigned thread_count = 0 ,
118 unsigned use_numa_count = 0 ,
119 unsigned use_cores_per_numa = 0 );
121 static int is_initialized();
124 static int concurrency();
135 inline static int thread_pool_size(
int depth = 0 );
138 KOKKOS_INLINE_FUNCTION
static int thread_pool_rank();
142 inline static unsigned max_hardware_threads() {
return thread_pool_size(0); }
144 KOKKOS_INLINE_FUNCTION
static
145 unsigned hardware_thread_id() {
return thread_pool_rank(); }
147 static const char* name();
149 static bool m_is_initialized;
161 struct VerifyExecutionCanAccessMemorySpace
162 < Kokkos::Experimental::OpenMPTarget::memory_space
163 , Kokkos::Experimental::OpenMPTarget::scratch_memory_space
166 enum { value =
true };
167 inline static void verify(
void ) { }
168 inline static void verify(
const void * ) { }
177 #include <OpenMPTarget/Kokkos_OpenMPTarget_Exec.hpp>
178 #include <OpenMPTarget/Kokkos_OpenMPTarget_Parallel.hpp>
179 #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.
void finalize()
Finalize the spaces that were initialized via Kokkos::initialize.