Implementation for syten::CudaStream. More...
#include <cuda_support.h>
Public Member Functions | |
CudaStream ()=default | |
default ctor More... | |
CudaStream (CudaStream &&) | |
move ctor. More... | |
CudaStream (CudaStream const &)=delete | |
copy ctor is deleted. More... | |
CudaStream (std::int16_t dev) | |
standard ctor, constructs stream on specified device. More... | |
void | destroy () |
Destroys the stream, cannot be called on null streams. More... | |
std::int16_t | dev () const |
Returns the device associated to the stream, cannot be called on null streams. More... | |
bool | is_default () const |
dtor. More... | |
void | make_new (std::int16_t dev) |
Creates a new stream on the specified device. More... | |
bool | make_new_if_default (std::int16_t dev) |
Creates a new stream on the specified device only if the this object currently does not represent any particular stream. More... | |
CudaStream & | operator= (CudaStream &&)=delete |
move assignment op, also deleted. More... | |
CudaStream & | operator= (CudaStream const &)=delete |
copy assignment op deleted. More... | |
void * | str () const |
Returns the stream associated to the stream, cannot be called on default streams. More... | |
void | sync_destroy () |
First blocks until the stream is synchronised, then destroys it. More... | |
void | synchronise () |
Blocks until the stream synchronises, cannot be called on null streams. More... | |
Private Attributes | |
std::int16_t | device = -1 |
device associated to the stream. More... | |
void * | stream = nullptr |
our data More... | |
Implementation for syten::CudaStream.
cudaStream_t structs are simply pointers to CUstream_st structs, so we can store them as void*.