44 #ifndef KOKKOS_THREADS_HPP 45 #define KOKKOS_THREADS_HPP 47 #include <Kokkos_Macros.hpp> 48 #if defined( KOKKOS_ENABLE_THREADS ) 50 #include <Kokkos_Core_fwd.hpp> 54 #include <Kokkos_HostSpace.hpp> 55 #include <Kokkos_ScratchSpace.hpp> 57 #include <Kokkos_MemoryTraits.hpp> 58 #include <impl/Kokkos_Tags.hpp> 77 typedef Threads execution_space ;
85 typedef memory_space::size_type size_type ;
87 typedef ScratchMemorySpace< Threads > scratch_memory_space ;
97 static int in_parallel();
158 static void initialize(
unsigned threads_count = 0 ,
159 unsigned use_numa_count = 0 ,
160 unsigned use_cores_per_numa = 0 ,
161 bool allow_asynchronous_threadpool =
false );
163 static int is_initialized();
166 static int concurrency();
168 static Threads & instance(
int = 0 );
172 static int thread_pool_size(
int depth = 0 );
173 #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) 174 static int thread_pool_rank();
176 KOKKOS_INLINE_FUNCTION
static int thread_pool_rank() {
return 0 ; }
179 inline static unsigned max_hardware_threads() {
return thread_pool_size(0); }
180 KOKKOS_INLINE_FUNCTION
static unsigned hardware_thread_id() {
return thread_pool_rank(); }
182 static const char* name();
195 struct MemorySpaceAccess
196 <
Kokkos::Threads::memory_space
197 , Kokkos::Threads::scratch_memory_space
200 enum { assignable =
false };
201 enum { accessible =
true };
202 enum { deepcopy =
false };
206 struct VerifyExecutionCanAccessMemorySpace
207 <
Kokkos::Threads::memory_space
208 , Kokkos::Threads::scratch_memory_space
211 enum { value =
true };
212 inline static void verify(
void ) { }
213 inline static void verify(
const void * ) { }
221 #include <Kokkos_ExecPolicy.hpp> 223 #include <Threads/Kokkos_ThreadsExec.hpp> 224 #include <Threads/Kokkos_ThreadsTeam.hpp> 225 #include <Threads/Kokkos_Threads_Parallel.hpp> 227 #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.
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.