30 requires std::derived_from<Task, async::BasicTask>
50 [[nodiscard]]
bool has_task() const noexcept {
return task_.has_value(); }
56 CHECK(task_.has_value());
57 return std::move(*task_);
62 std::optional<Task> task_{};
67template <
class T>
struct IsKernelTaskAttempt : std::false_type
70template <
class Task>
struct IsKernelTaskAttempt<KernelTaskAttempt<Task>> : std::true_type
73template <
class T>
inline constexpr bool is_kernel_task_attempt = IsKernelTaskAttempt<std::remove_cvref_t<T>>
::value;
Promise-neutral coroutine task ownership and the public AsyncTask type.
Runtime backend attempt optionally carrying a deferred kernel task.
Definition kernel_task.hpp:31
KernelTaskAttempt(Task task) noexcept
Construct a successful attempt with deferred work.
Definition kernel_task.hpp:39
KernelTaskAttempt(KernelTaskAttempt &&) noexcept=default
Task task_type
Definition kernel_task.hpp:33
KernelAttempt attempt() const noexcept
Return the runtime acceptance result.
Definition kernel_task.hpp:47
KernelTaskAttempt(KernelTaskAttempt const &)=delete
KernelTaskAttempt & operator=(KernelTaskAttempt const &)=delete
bool has_task() const noexcept
Return whether successful execution still requires awaiting a task.
Definition kernel_task.hpp:50
Task take_task() &&
Transfer the deferred task from a successful attempt.
Definition kernel_task.hpp:53
KernelTaskAttempt(KernelAttempt attempt) noexcept
Construct a completed attempt without deferred work.
Definition kernel_task.hpp:36
locale_t value
Definition data_table.cpp:49
Allocation-free runtime results for kernel backend attempts.
Definition linalg/async.hpp:28
constexpr bool kernel_attempt_succeeded(KernelAttempt attempt) noexcept
Return whether a backend performed the operation.
Definition kernel_attempt.hpp:40
KernelAttempt
Result of one runtime kernel backend attempt.
Definition kernel_attempt.hpp:27
#define CHECK(cond,...)
Definition trace.hpp:299