Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
uni20::cuda::Completion Class Reference

Shared completion token for one submitted CUDA operation. More...

#include <runtime.hpp>

Classes

class  State
 

Public Member Functions

 Completion ()=default
 
int device () const noexcept
 Return the producer device ordinal.
 
 operator bool () const noexcept
 Return whether this token refers to a submitted operation.
 
bool ready () const
 Return whether the operation has completed.
 
void synchronize () const
 Wait on the host for the operation to complete.
 

Static Public Member Functions

static Completion record (int device, cudaStream_t stream)
 Record a completion at the current tail of a native CUDA stream.
 

Friends

class Stream
 
class Stream::State
 

Detailed Description

Shared completion token for one submitted CUDA operation.

Constructor & Destructor Documentation

◆ Completion()

uni20::cuda::Completion::Completion ( )
default

Member Function Documentation

◆ device()

int uni20::cuda::Completion::device ( ) const
noexcept

Return the producer device ordinal.

◆ operator bool()

uni20::cuda::Completion::operator bool ( ) const
inlineexplicitnoexcept

Return whether this token refers to a submitted operation.

◆ ready()

bool uni20::cuda::Completion::ready ( ) const

Return whether the operation has completed.

◆ record()

Completion uni20::cuda::Completion::record ( int  device,
cudaStream_t  stream 
)
static

Record a completion at the current tail of a native CUDA stream.

Parameters
deviceDevice ordinal that owns stream.
streamNative CUDA stream, including the default stream.

◆ synchronize()

void uni20::cuda::Completion::synchronize ( ) const

Wait on the host for the operation to complete.

Friends And Related Symbol Documentation

◆ Stream

friend class Stream
friend

◆ Stream::State

friend class Stream::State
friend

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