44 #ifndef KOKKOS_OPENMP_HPP 45 #define KOKKOS_OPENMP_HPP 47 #include <Kokkos_Macros.hpp> 48 #if defined( KOKKOS_ENABLE_OPENMP) 51 #error "You enabled Kokkos OpenMP support without enabling OpenMP in the compiler!" 54 #include <Kokkos_Core_fwd.hpp> 58 #include <Kokkos_HostSpace.hpp> 60 #ifdef KOKKOS_ENABLE_HBWSPACE 61 #include <Kokkos_HBWSpace.hpp> 64 #include <Kokkos_ScratchSpace.hpp> 66 #include <Kokkos_TaskScheduler.hpp> 68 #include <impl/Kokkos_Tags.hpp> 83 using execution_space = OpenMP;
84 #ifdef KOKKOS_ENABLE_HBWSPACE 85 using memory_space = Experimental::HBWSpace;
87 using memory_space = HostSpace;
92 using array_layout = LayoutRight;
93 using size_type = memory_space::size_type;
95 using scratch_memory_space = ScratchMemorySpace< OpenMP >;
102 inline static bool in_parallel();
111 static void fence() {}
128 static void initialize(
unsigned thread_count = 0 ,
129 unsigned use_numa_count = 0 ,
130 unsigned use_cores_per_numa = 0 );
132 static int is_initialized();
135 static int concurrency();
146 inline static int thread_pool_size(
int depth = 0 );
149 KOKKOS_INLINE_FUNCTION
static int thread_pool_rank();
153 inline static unsigned max_hardware_threads() {
return thread_pool_size(0); }
155 KOKKOS_INLINE_FUNCTION
static 156 unsigned hardware_thread_id() {
return thread_pool_rank(); }
158 static const char* name();
170 struct MemorySpaceAccess
171 <
Kokkos::OpenMP::memory_space
172 , Kokkos::OpenMP::scratch_memory_space
175 enum { assignable =
false };
176 enum { accessible =
true };
177 enum { deepcopy =
false };
181 struct VerifyExecutionCanAccessMemorySpace
182 <
Kokkos::OpenMP::memory_space
183 , Kokkos::OpenMP::scratch_memory_space
186 enum { value =
true };
187 inline static void verify(
void ) { }
188 inline static void verify(
const void * ) { }
197 #include <OpenMP/Kokkos_OpenMP_Exec.hpp> 198 #include <OpenMP/Kokkos_OpenMP_Parallel.hpp> 199 #include <OpenMP/Kokkos_OpenMP_Task.hpp> 201 #include <KokkosExp_MDRangePolicy.hpp> void print_configuration(std::ostream &, const bool detail=false)
Print "Bill of Materials".
Memory space for main process and CPU execution spaces.
Declaration of various MemoryLayout options.
Declaration of parallel operators.
void finalize()
Finalize the spaces that were initialized via Kokkos::initialize.