17 #ifndef KOKKOS_IMPL_PUBLIC_INCLUDE
18 #include <Kokkos_Macros.hpp>
20 "Including non-public Kokkos header files is not allowed.");
22 #ifndef KOKKOS_TASKSCHEDULER_FWD_HPP
23 #define KOKKOS_TASKSCHEDULER_FWD_HPP
28 #include <Kokkos_Macros.hpp>
29 #if defined(KOKKOS_ENABLE_TASKDAG)
31 #include <Kokkos_Core_fwd.hpp>
34 #ifdef KOKKOS_ENABLE_DEPRECATION_WARNINGS
36 KOKKOS_IMPL_DISABLE_DEPRECATED_WARNINGS_PUSH()
43 template <
typename ValueType,
typename Scheduler>
44 class KOKKOS_DEPRECATED BasicFuture;
46 template <
class Space,
class Queue>
47 class KOKKOS_DEPRECATED SimpleTaskScheduler;
49 template <
class Space,
class Queue>
50 class KOKKOS_DEPRECATED BasicTaskScheduler;
52 template <
typename Space>
53 struct KOKKOS_DEPRECATED is_scheduler :
public std::false_type {};
55 template <
class Space,
class Queue>
56 struct KOKKOS_DEPRECATED is_scheduler<BasicTaskScheduler<Space, Queue>>
57 :
public std::true_type {};
59 template <
class Space,
class Queue>
60 struct KOKKOS_DEPRECATED is_scheduler<SimpleTaskScheduler<Space, Queue>>
61 :
public std::true_type {};
63 enum class KOKKOS_DEPRECATED TaskPriority : int {
75 template <
class Device>
80 template <
class TaskQueueTraits>
99 template <
typename Space,
typename ResultType,
typename FunctorType>
104 template <
typename Space,
typename MemorySpace>
107 template <
typename ExecSpace,
typename MemorySpace>
108 class TaskQueueMultiple;
110 template <
typename ExecSpace,
typename MemSpace,
typename TaskQueueTraits,
112 Kokkos::MemoryPool<Kokkos::Device<ExecSpace, MemSpace>>>
113 class SingleTaskQueue;
115 template <
typename ExecSpace,
typename MemSpace,
typename TaskQueueTraits,
117 class MultipleTaskQueue;
119 struct TaskQueueTraitsLockBased;
121 template <
size_t CircularBufferSize = 64>
122 struct TaskQueueTraitsChaseLev;
124 template <
typename ResultType>
127 struct TaskSchedulerBase;
129 template <
class ExecSpace>
130 struct default_tasking_memory_space_for_execution_space {
131 using type =
typename ExecSpace::memory_space;
134 #if defined(KOKKOS_ENABLE_CUDA)
136 struct default_tasking_memory_space_for_execution_space<Kokkos::Cuda> {
137 using type = Kokkos::CudaUVMSpace;
141 template <
class ExecSpace>
142 using default_tasking_memory_space_for_execution_space_t =
143 typename default_tasking_memory_space_for_execution_space<ExecSpace>::type;
152 template <
typename Space>
153 using DeprecatedTaskScheduler KOKKOS_DEPRECATED = BasicTaskScheduler<
157 Impl::default_tasking_memory_space_for_execution_space_t<Space>>>;
159 template <
typename Space>
160 using DeprecatedTaskSchedulerMultiple KOKKOS_DEPRECATED = BasicTaskScheduler<
162 Impl::TaskQueueMultiple<
164 Impl::default_tasking_memory_space_for_execution_space_t<Space>>>;
166 template <
typename Space>
167 using TaskScheduler KOKKOS_DEPRECATED = SimpleTaskScheduler<
169 Impl::SingleTaskQueue<
170 Space, Impl::default_tasking_memory_space_for_execution_space_t<Space>,
171 Impl::TaskQueueTraitsLockBased>>;
173 template <
typename Space>
174 using TaskSchedulerMultiple KOKKOS_DEPRECATED = SimpleTaskScheduler<
176 Impl::MultipleTaskQueue<
177 Space, Impl::default_tasking_memory_space_for_execution_space_t<Space>,
178 Impl::TaskQueueTraitsLockBased,
179 Kokkos::MemoryPool<Kokkos::Device<
181 Impl::default_tasking_memory_space_for_execution_space_t<Space>>>>>;
183 template <
typename Space>
184 using ChaseLevTaskScheduler KOKKOS_DEPRECATED = SimpleTaskScheduler<
186 Impl::MultipleTaskQueue<
187 Space, Impl::default_tasking_memory_space_for_execution_space_t<Space>,
188 Impl::TaskQueueTraitsChaseLev<>,
189 Kokkos::MemoryPool<Kokkos::Device<
191 Impl::default_tasking_memory_space_for_execution_space_t<Space>>>>>;
193 template <
class Space,
class QueueType>
194 KOKKOS_DEPRECATED
void wait(BasicTaskScheduler<Space, QueueType>
const&);
198 struct TaskSchedulerBase {};
200 class TaskQueueBase {};
202 template <
typename Scheduler,
typename EnableIfConstra
int =
void>
203 class TaskQueueSpecializationConstrained {};
205 template <
typename Scheduler>
206 struct TaskQueueSpecialization : TaskQueueSpecializationConstrained<Scheduler> {
209 template <
int,
typename>
210 struct TaskPolicyData;
216 #ifdef KOKKOS_ENABLE_DEPRECATION_WARNINGS
217 KOKKOS_IMPL_DISABLE_DEPRECATED_WARNINGS_POP()