Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
uni20::linalg::KernelTaskAttempt< Task > Class Template Reference

Runtime backend attempt optionally carrying a deferred kernel task. More...

#include <kernel_task.hpp>

Public Types

using task_type = Task
 

Public Member Functions

KernelAttempt attempt () const noexcept
 Return the runtime acceptance result.
 
bool has_task () const noexcept
 Return whether successful execution still requires awaiting a task.
 
 KernelTaskAttempt (KernelAttempt attempt) noexcept
 Construct a completed attempt without deferred work.
 
 KernelTaskAttempt (KernelTaskAttempt &&) noexcept=default
 
 KernelTaskAttempt (KernelTaskAttempt const &)=delete
 
 KernelTaskAttempt (Task task) noexcept
 Construct a successful attempt with deferred work.
 
KernelTaskAttempt & operator= (KernelTaskAttempt &&) noexcept=default
 
KernelTaskAttempt & operator= (KernelTaskAttempt const &)=delete
 
Task take_task () &&
 Transfer the deferred task from a successful attempt.
 

Detailed Description

template<class Task>
requires std::derived_from<Task, async::BasicTask>
class uni20::linalg::KernelTaskAttempt< Task >

Runtime backend attempt optionally carrying a deferred kernel task.

A decline carries no task and must satisfy the ordinary clean-decline contract, including its allowance for provisional preparation of operation-declared replaceable outputs. Success without a task represents an operation that is already complete, such as an empty output. Success with a task commits the backend once that task is awaited; later failures are terminal exceptions rather than backend declines.

Member Typedef Documentation

◆ task_type

template<class Task >
using uni20::linalg::KernelTaskAttempt< Task >::task_type = Task

Constructor & Destructor Documentation

◆ KernelTaskAttempt() [1/4]

template<class Task >
uni20::linalg::KernelTaskAttempt< Task >::KernelTaskAttempt ( KernelAttempt  attempt)
inlineexplicitnoexcept

Construct a completed attempt without deferred work.

◆ KernelTaskAttempt() [2/4]

template<class Task >
uni20::linalg::KernelTaskAttempt< Task >::KernelTaskAttempt ( Task  task)
inlineexplicitnoexcept

Construct a successful attempt with deferred work.

◆ KernelTaskAttempt() [3/4]

template<class Task >
uni20::linalg::KernelTaskAttempt< Task >::KernelTaskAttempt ( KernelTaskAttempt< Task > const &  )
delete

◆ KernelTaskAttempt() [4/4]

template<class Task >
uni20::linalg::KernelTaskAttempt< Task >::KernelTaskAttempt ( KernelTaskAttempt< Task > &&  )
defaultnoexcept

Member Function Documentation

◆ attempt()

template<class Task >
KernelAttempt uni20::linalg::KernelTaskAttempt< Task >::attempt ( ) const
inlinenoexcept

Return the runtime acceptance result.

◆ has_task()

template<class Task >
bool uni20::linalg::KernelTaskAttempt< Task >::has_task ( ) const
inlinenoexcept

Return whether successful execution still requires awaiting a task.

◆ operator=() [1/2]

template<class Task >
KernelTaskAttempt & uni20::linalg::KernelTaskAttempt< Task >::operator= ( KernelTaskAttempt< Task > &&  )
defaultnoexcept

◆ operator=() [2/2]

template<class Task >
KernelTaskAttempt & uni20::linalg::KernelTaskAttempt< Task >::operator= ( KernelTaskAttempt< Task > const &  )
delete

◆ take_task()

template<class Task >
Task uni20::linalg::KernelTaskAttempt< Task >::take_task ( ) &&
inline

Transfer the deferred task from a successful attempt.


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