44 #ifndef KOKKOS_CORE_FWD_HPP 45 #define KOKKOS_CORE_FWD_HPP 51 #include <Kokkos_Macros.hpp> 52 #include <impl/Kokkos_Utilities.hpp> 57 static_assert(
sizeof(
void*) == 8
58 ,
"Kokkos assumes 64-bit build; i.e., 8-byte pointers" );
65 KOKKOS_INLINE_FUNCTION
66 constexpr
const AUTO_t & operator()()
const {
return *this ; }
71 constexpr AUTO_t AUTO = Kokkos::AUTO_t();
74 struct InvalidType {};
86 #ifdef KOKKOS_HAVE_HBWSPACE 87 namespace Experimental {
92 #if defined( KOKKOS_HAVE_SERIAL ) 94 #endif // defined( KOKKOS_HAVE_SERIAL ) 96 #if defined( KOKKOS_HAVE_PTHREAD ) 100 #if defined( KOKKOS_HAVE_OPENMP ) 104 #if defined( KOKKOS_HAVE_CUDA ) 107 class CudaHostPinnedSpace ;
111 template<
class ExecutionSpace,
class MemorySpace>
125 #if defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_CUDA ) 126 typedef Cuda DefaultExecutionSpace ;
127 #elif defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_OPENMP ) 128 typedef OpenMP DefaultExecutionSpace ;
129 #elif defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_THREADS ) 130 typedef Threads DefaultExecutionSpace ;
131 #elif defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_SERIAL ) 132 typedef Serial DefaultExecutionSpace ;
134 # error "At least one of the following execution spaces must be defined in order to use Kokkos: Kokkos::Cuda, Kokkos::OpenMP, Kokkos::Serial, or Kokkos::Threads." 137 #if defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_OPENMP ) 138 typedef OpenMP DefaultHostExecutionSpace ;
139 #elif defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_THREADS ) 140 typedef Threads DefaultHostExecutionSpace ;
141 #elif defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_SERIAL ) 142 typedef Serial DefaultHostExecutionSpace ;
143 #elif defined ( KOKKOS_HAVE_OPENMP ) 144 typedef OpenMP DefaultHostExecutionSpace ;
145 #elif defined ( KOKKOS_HAVE_PTHREAD ) 146 typedef Threads DefaultHostExecutionSpace ;
147 #elif defined ( KOKKOS_HAVE_SERIAL ) 148 typedef Serial DefaultHostExecutionSpace ;
150 # error "At least one of the following execution spaces must be defined in order to use Kokkos: Kokkos::OpenMP, Kokkos::Serial, or Kokkos::Threads." 164 #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) && defined (KOKKOS_HAVE_CUDA) 165 typedef Kokkos::CudaSpace ActiveExecutionMemorySpace ;
166 #elif defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) 169 typedef void ActiveExecutionMemorySpace ;
172 template<
class ActiveSpace ,
class MemorySpace >
173 struct VerifyExecutionCanAccessMemorySpace {
177 template<
class Space >
178 struct VerifyExecutionCanAccessMemorySpace< Space , Space >
181 KOKKOS_INLINE_FUNCTION
static void verify(
void) {}
182 KOKKOS_INLINE_FUNCTION
static void verify(
const void *) {}
188 #define KOKKOS_RESTRICT_EXECUTION_TO_DATA( DATA_SPACE , DATA_PTR ) \ 189 Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< \ 190 Kokkos::Impl::ActiveExecutionMemorySpace , DATA_SPACE >::verify( DATA_PTR ) 192 #define KOKKOS_RESTRICT_EXECUTION_TO_( DATA_SPACE ) \ 193 Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< \ 194 Kokkos::Impl::ActiveExecutionMemorySpace , DATA_SPACE >::verify() 209 template<
class Functor
211 ,
class EnableFunctor = void
212 ,
class EnablePolicy =
void 223 template<
class FunctorType ,
class ExecPolicy ,
class ExecutionSpace =
224 typename Impl::FunctorPolicyExecutionSpace< FunctorType , ExecPolicy >::execution_space
232 template<
class FunctorType ,
class ExecPolicy ,
class ReducerType = InvalidType,
class ExecutionSpace =
233 typename Impl::FunctorPolicyExecutionSpace< FunctorType , ExecPolicy >::execution_space
242 template<
class FunctorType ,
class ExecPolicy ,
class ExecutionSapce =
243 typename Impl::FunctorPolicyExecutionSpace< FunctorType , ExecPolicy >::execution_space
Implementation detail of parallel_scan.
Memory management for host memory.
Implementation of the ParallelFor operator that has a partial specialization for the device...
Given a Functor and Execution Policy query an execution space.
Implementation detail of parallel_reduce.