|
|
| Stream ()=default |
| | Constructs a stream wrapping the CUDA 0 (NULL) stream.
|
|
| Stream (const Stream &other)=default |
| | Default copy-constructor.
|
|
| Stream (Stream &&other) noexcept=default |
| | Default move-constructor.
|
| | operator const stream_t & () const |
| | Access the CUDA stream handle associated with this object.
|
|
Stream & | operator= (const Stream &other)=default |
| | Default copy-assignment operator.
|
|
Stream & | operator= (Stream &&other) noexcept=default |
| | Default move-assignment operator.
|
|
| static Stream | create (unsigned int flags=StreamDefault, int priority=0) |
| | Creates a new stream.
|
◆ create()
| Stream TNL::Backend::Stream::create |
( |
unsigned int | flags = StreamDefault, |
|
|
int | priority = 0 ) |
|
inlinestatic |
Creates a new stream.
The stream is created by calling cudaStreamCreateWithPriority with the following parameters:
- Parameters
-
| flags | Custom flags for stream creation. Possible values are:
- cudaStreamDefault: Default stream creation flag.
- cudaStreamNonBlocking: Specifies that work running in the created stream may run concurrently with work in stream 0 (the NULL stream), and that the created stream should perform no implicit synchronization with stream 0.
|
| priority | Priority of the stream. Lower numbers represent higher priorities. See cudaDeviceGetStreamPriorityRange for more information about the meaningful stream priorities that can be passed. |
◆ operator const stream_t &()
| TNL::Backend::Stream::operator const stream_t & |
( |
| ) |
const |
|
inline |
Access the CUDA stream handle associated with this object.
This routine permits the implicit conversion from Stream to stream_t.
- Warning
- The obtained stream_t handle becomes invalid when the originating Stream object is destroyed. For example, the following code is invalid, because the Stream object managing the lifetime of the stream_t handle is destroyed as soon as it is cast to stream_t:
my_kernel<<< gridSize, blockSize, 0, stream >>>( args... );
static Stream create(unsigned int flags=StreamDefault, int priority=0)
Creates a new stream.
Definition Stream.h:79
The documentation for this class was generated from the following file: