//@HEADER // ************************************************************************ // // Kokkos v. 4.0 // Copyright (2022) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. // See https://kokkos.org/LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //@HEADER #ifndef KOKKOS_IMPL_PUBLIC_INCLUDE #include static_assert(false, "Including non-public Kokkos header files is not allowed."); #endif #ifndef KOKKOS_TASKSCHEDULER_FWD_HPP #define KOKKOS_TASKSCHEDULER_FWD_HPP //---------------------------------------------------------------------------- #include #include #if defined(KOKKOS_ENABLE_TASKDAG) #include //---------------------------------------------------------------------------- namespace Kokkos { // Forward declarations used in Impl::TaskQueue template class BasicFuture; template class SimpleTaskScheduler; template class BasicTaskScheduler; template struct is_scheduler : public std::false_type {}; template struct is_scheduler> : public std::true_type { }; template struct is_scheduler> : public std::true_type { }; enum class TaskPriority : int { High = 0, Regular = 1, Low = 2 }; } // namespace Kokkos //---------------------------------------------------------------------------- namespace Kokkos { template class MemoryPool; namespace Impl { template class TaskNode; class TaskBase; /*\brief Implementation data for task data management, access, and execution. * (Deprecated) * CRTP Inheritance structure to allow static_cast from the * task root type and a task's FunctorType. * * TaskBase< Space , ResultType , FunctorType > * : TaskBase< Space , ResultType , void > * , FunctorType * { ... }; * * TaskBase< Space , ResultType , void > * : TaskBase< Space , void , void > * { ... }; */ template class Task; class TaskQueueBase; template class TaskQueue; template class TaskQueueMultiple; template >> class SingleTaskQueue; template class MultipleTaskQueue; struct TaskQueueTraitsLockBased; template struct TaskQueueTraitsChaseLev; template struct TaskResult; struct TaskSchedulerBase; template struct default_tasking_memory_space_for_execution_space { using type = typename ExecSpace::memory_space; }; #if defined(KOKKOS_ENABLE_CUDA) template <> struct default_tasking_memory_space_for_execution_space { using type = Kokkos::CudaUVMSpace; }; #endif template using default_tasking_memory_space_for_execution_space_t = typename default_tasking_memory_space_for_execution_space::type; } // namespace Impl } // namespace Kokkos //---------------------------------------------------------------------------- namespace Kokkos { template using DeprecatedTaskScheduler = BasicTaskScheduler< Space, Impl::TaskQueue< Space, Impl::default_tasking_memory_space_for_execution_space_t>>; template using DeprecatedTaskSchedulerMultiple = BasicTaskScheduler< Space, Impl::TaskQueueMultiple< Space, Impl::default_tasking_memory_space_for_execution_space_t>>; template using TaskScheduler = SimpleTaskScheduler< Space, Impl::SingleTaskQueue< Space, Impl::default_tasking_memory_space_for_execution_space_t, Impl::TaskQueueTraitsLockBased>>; template using TaskSchedulerMultiple = SimpleTaskScheduler< Space, Impl::MultipleTaskQueue< Space, Impl::default_tasking_memory_space_for_execution_space_t, Impl::TaskQueueTraitsLockBased, Kokkos::MemoryPool>>>>; template using ChaseLevTaskScheduler = SimpleTaskScheduler< Space, Impl::MultipleTaskQueue< Space, Impl::default_tasking_memory_space_for_execution_space_t, Impl::TaskQueueTraitsChaseLev<>, Kokkos::MemoryPool>>>>; template void wait(BasicTaskScheduler const&); namespace Impl { struct TaskSchedulerBase {}; class TaskQueueBase {}; template class TaskQueueSpecializationConstrained {}; template struct TaskQueueSpecialization : TaskQueueSpecializationConstrained { }; template struct TaskPolicyData; } // end namespace Impl } // namespace Kokkos //---------------------------------------------------------------------------- #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ #endif /* #ifndef KOKKOS_TASKSCHEDULER_FWD_HPP */