cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
|
Proxy class for a CUDA stream. More...
#include <stream.hpp>
Classes | |
class | enqueue_t |
A gadget through which commands are enqueued on the stream. More... | |
Public Types | |
enum | : bool { doesnt_synchronizes_with_default_stream = false, does_synchronize_with_default_stream = true } |
Public Member Functions | |
stream::handle_t | handle () const noexcept |
The raw CUDA handle for a stream which this class wraps. | |
context::handle_t | context_handle () const noexcept |
The raw CUDA handle for the context in which the represented stream is defined. | |
device::id_t | device_id () const noexcept |
The raw CUDA ID for the device w.r.t. which the stream is defined. | |
device_t | device () const noexcept |
The device w.r.t. which the stream is defined. | |
context_t | context () const noexcept |
The context in which this stream was defined. | |
bool | is_owning () const noexcept |
True if this wrapper is responsible for telling CUDA to destroy the stream upon the wrapper's own destruction. | |
bool | synchronizes_with_default_stream () const |
When true, work running in the created stream may run concurrently with work in stream 0 (the NULL stream), and there is no implicit synchronization performed between it and stream 0. | |
stream::priority_t | priority () const |
bool | has_work_remaining () const |
Determines whether all work on this stream has been completed. More... | |
bool | is_clear () const |
The opposite of has_work_remaining() More... | |
bool | query () const |
An alias for is_clear() - to conform to how the CUDA runtime API names this functionality. | |
void | synchronize () const |
Block or busy-wait until all previously-scheduled work on this stream has been completed. | |
stream_t (const stream_t &other)=delete | |
stream_t (stream_t &&other) noexcept | |
stream_t & | operator= (const stream_t &other)=delete |
stream_t & | operator= (stream_t &&other) noexcept |
Public Attributes | |
const enqueue_t | enqueue { *this } |
This data member is a gadget for use instead of a "class-local" namespace; we do not need it as a distinct object. | |
Friends | |
stream_t | stream::wrap (device::id_t device_id, context::handle_t context_handle, stream::handle_t stream_handle, bool take_ownership, bool hold_pc_refcount_unit) noexcept |
bool | operator== (const stream_t &lhs, const stream_t &rhs) noexcept |
Proxy class for a CUDA stream.
|
inline |
Determines whether all work on this stream has been completed.
|
inline |
The opposite of has_work_remaining()
|
inline |