Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
uni20::async::CudaTask Class Referencefinal

CUDA-constrained public task type used for typed initial admission. More...

#include <cuda_task.hpp>

Inheritance diagram for uni20::async::CudaTask:
[legend]
Collaboration diagram for uni20::async::CudaTask:
[legend]

Public Types

using base_type = BasicTask
 
using promise_type = CudaTaskPromise
 

Public Member Functions

 CudaTask ()=default
 
 CudaTask (CudaTask &&) noexcept=default
 
 CudaTask (CudaTask const &)=delete
 
CudaTask & debug_name (std::string const &label)
 Assign an optional debug label while preserving the concrete task type.
 
CudaTask & operator= (CudaTask &&) noexcept=default
 
CudaTask & operator= (CudaTask const &)=delete
 
- Public Member Functions inherited from uni20::async::BasicTask
void abandon_leak ()
 Intentionally leak the coroutine during emergency unwinding.
 
bool await_ready () const noexcept
 
void await_resume ()
 
template<TaskPromise ParentPromise>
std::coroutine_handle await_suspend (std::coroutine_handle< ParentPromise > parent)
 Await a nested task from any Uni20 task promise type.
 
 BasicTask () noexcept=default
 Construct an empty task.
 
 BasicTask (BasicTask &&other) noexcept
 Move-construct one ownership claim.
 
 BasicTask (BasicTask const &)=delete
 
std::coroutine_handle coroutine_handle () const noexcept
 Return the generic coroutine handle for diagnostics.
 
BasicTask & debug_name (std::string const &label)
 Assign an optional debug label.
 
void destroy () noexcept
 Destroy an exclusively owned coroutine.
 
void exception_on_resume (std::exception_ptr error) noexcept
 Store an exception for delivery on the next resume.
 
TaskHandle handle () const noexcept
 Return the erased task identity.
 
 operator bool () const noexcept
 
BasicTask & operator= (BasicTask &&other) noexcept
 Move-assign one ownership claim.
 
BasicTask & operator= (BasicTask const &)=delete
 
std::optional< int > preferred_numa_node () const noexcept
 
TaskHandle release_handle ()
 Release this ownership claim to a scheduler activation.
 
void resume ()
 Resume the coroutine and transfer this ownership claim.
 
void set_cancel_on_resume () noexcept
 Request cancellation before the next resume.
 
void set_preferred_numa_node (std::optional< int > node) noexcept
 
bool set_scheduler (IScheduler *scheduler)
 Install the scheduler used for later resumption.
 
 ~BasicTask () noexcept
 Release the ownership claim and destroy the frame when appropriate.
 

Friends

class CudaTaskPromise
 

Additional Inherited Members

- Static Public Member Functions inherited from uni20::async::BasicTask
static BasicTask make_sole_owner (BasicTask &&task)
 Retain a task only when it is the sole ownership claimant.
 
static void reschedule (BasicTask task)
 Reschedule a task when it becomes the sole ownership claimant.
 
- Protected Member Functions inherited from uni20::async::BasicTask
 BasicTask (TaskHandle handle, construction_key) noexcept
 

Detailed Description

CUDA-constrained public task type used for typed initial admission.

Member Typedef Documentation

◆ base_type

◆ promise_type

Constructor & Destructor Documentation

◆ CudaTask() [1/3]

uni20::async::CudaTask::CudaTask ( )
default

◆ CudaTask() [2/3]

uni20::async::CudaTask::CudaTask ( CudaTask const &  )
delete

◆ CudaTask() [3/3]

uni20::async::CudaTask::CudaTask ( CudaTask &&  )
defaultnoexcept

Member Function Documentation

◆ debug_name()

CudaTask & uni20::async::CudaTask::debug_name ( std::string const &  label)
inline

Assign an optional debug label while preserving the concrete task type.

Parameters
labelHuman-readable label used only by debug diagnostics.
Returns
Reference to this task for call chaining.

◆ operator=() [1/2]

CudaTask & uni20::async::CudaTask::operator= ( CudaTask &&  )
defaultnoexcept

◆ operator=() [2/2]

CudaTask & uni20::async::CudaTask::operator= ( CudaTask const &  )
delete

Friends And Related Symbol Documentation

◆ CudaTaskPromise

friend class CudaTaskPromise
friend

The documentation for this class was generated from the following file: