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();
164 static Threads & instance(
int = 0 );
168 static int thread_pool_size(
int depth = 0 );
169 #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) 170 static int thread_pool_rank();
172 KOKKOS_INLINE_FUNCTION
static int thread_pool_rank() {
return 0 ; }
175 inline static unsigned max_hardware_threads() {
return thread_pool_size(0); }
176 KOKKOS_INLINE_FUNCTION
static unsigned hardware_thread_id() {
return thread_pool_rank(); }
190 struct VerifyExecutionCanAccessMemorySpace
191 <
Kokkos::Threads::memory_space
192 , Kokkos::Threads::scratch_memory_space
195 enum { value =
true };
196 inline static void verify(
void ) { }
197 inline static void verify(
const void * ) { }
205 #include <Kokkos_ExecPolicy.hpp> 207 #include <Threads/Kokkos_ThreadsExec.hpp> 208 #include <Threads/Kokkos_ThreadsTeam.hpp> 209 #include <Threads/Kokkos_Threads_Parallel.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.