44 #ifndef KOKKOS_THREADS_HPP 45 #define KOKKOS_THREADS_HPP 47 #include <Kokkos_Core_fwd.hpp> 49 #if defined( KOKKOS_HAVE_PTHREAD ) 53 #include <Kokkos_HostSpace.hpp> 54 #include <Kokkos_ScratchSpace.hpp> 56 #include <Kokkos_MemoryTraits.hpp> 57 #include <impl/Kokkos_Tags.hpp> 76 typedef Threads execution_space ;
84 typedef memory_space::size_type size_type ;
86 typedef ScratchMemorySpace< Threads > scratch_memory_space ;
96 static int in_parallel();
132 static void print_configuration( std::ostream & ,
const bool detail =
false );
157 static void initialize(
unsigned threads_count = 0 ,
158 unsigned use_numa_count = 0 ,
159 unsigned use_cores_per_numa = 0 ,
160 bool allow_asynchronous_threadpool =
false );
162 static int is_initialized();
165 static int concurrency();
167 static Threads & instance(
int = 0 );
171 static int thread_pool_size(
int depth = 0 );
172 #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) 173 static int thread_pool_rank();
175 KOKKOS_INLINE_FUNCTION
static int thread_pool_rank() {
return 0 ; }
178 inline static unsigned max_hardware_threads() {
return thread_pool_size(0); }
179 KOKKOS_INLINE_FUNCTION
static unsigned hardware_thread_id() {
return thread_pool_rank(); }
193 struct VerifyExecutionCanAccessMemorySpace
194 <
Kokkos::Threads::memory_space
195 , Kokkos::Threads::scratch_memory_space
198 enum { value =
true };
199 inline static void verify(
void ) { }
200 inline static void verify(
const void * ) { }
208 #include <Kokkos_ExecPolicy.hpp> 210 #include <Threads/Kokkos_ThreadsExec.hpp> 211 #include <Threads/Kokkos_ThreadsTeam.hpp> 212 #include <Threads/Kokkos_Threads_Parallel.hpp> 214 #include <KokkosExp_MDRangePolicy.hpp> Memory space for main process and CPU execution spaces.
Memory management for host memory.
Memory layout tag indicating right-to-left (C or lexigraphical scheme) striding of multi-indices...
Declaration of various MemoryLayout options.
Declaration of parallel operators.
void finalize()
Finalize the spaces that were initialized via Kokkos::initialize.