Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Namespaces | Concepts | Functions
async_task_promise.hpp File Reference

Defines shared and concrete task coroutine promises. More...

#include "async_errors.hpp"
#include "async_node.hpp"
#include "async_task.hpp"
#include "scheduler.hpp"
#include <atomic>
#include <coroutine>
#include <exception>
#include <limits>
#include <memory>
#include <optional>
#include <type_traits>
#include <vector>
#include "async_task_impl.hpp"
Include dependency graph for async_task_promise.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  uni20::async::AsyncTaskPromise
 Promise type for ordinary AsyncTask coroutines. More...
 
struct  uni20::async::CudaTaskAwaiterTag
 Marker base for awaiters that require a CudaTaskPromise handle. More...
 
class  uni20::async::CudaTaskPromise
 Promise type for CUDA-constrained CudaTask coroutines. More...
 
struct  uni20::async::TaskAwaiter< A >
 Forwarding awaiter that transfers one task ownership claim to an awaitable. More...
 
class  uni20::async::TaskFactory
 Factory for producing multiple BasicTask ownership claims for one coroutine. More...
 
struct  uni20::async::TaskFactoryAwaiter< A >
 Forwarding awaiter that transfers shared task ownership through a TaskFactory. More...
 
class  uni20::async::TaskPromiseBase
 Shared non-polymorphic implementation for Uni20 task promises. More...
 
struct  uni20::async::TaskPromiseBase::ExceptionSinkNode
 Intrusive node describing one exception propagation sink. More...
 

Namespaces

namespace  uni20
 
namespace  uni20::async
 This represents the reverse-mode adjoint for functions of complex variables, assuming a real-valued scalar loss function ( L \colon \mathbb{C} \to \mathbb{R} ).
 

Concepts

concept  uni20::async::CudaTaskAwaitable
 Identifies an explicitly opted-in CUDA task awaiter.
 
concept  uni20::async::AwaitSuspendResult
 Concept for the valid return types of await_suspend.
 
concept  uni20::async::TaskAwaitable
 Concept for awaitables that accept promise-neutral task ownership.
 
concept  uni20::async::TaskFactoryChildAwaitable
 Awaitable that can hold one ownership claim in a multi-input join.
 
concept  uni20::async::TaskFactoryAwaitable
 Concept for awaitables that support shared promise-neutral ownership.
 

Functions

CudaTaskPromise & uni20::async::cuda_promise (TaskHandle handle) noexcept
 Narrow an erased task promise after verifying that it is CUDA-specific.
 
template<typename T >
void uni20::async::ProcessCoroutineArgument (TaskPromiseBase *promise, T const &value)
 Process a coroutine argument for debug metadata (default no-op).
 
void uni20::async::propagate_unhandled_writer_exception (EpochContext *epoch, std::exception_ptr eptr) noexcept
 Inject an unhandled writer-side coroutine exception into an epoch.
 
TaskRoute uni20::async::task_route (TaskHandle handle) noexcept
 Return the current scheduling requirements recorded by a task.
 

Detailed Description

Defines shared and concrete task coroutine promises.