一个 CUDA 流的拥有者封装器。 更多...
#include <cuda_stream.hpp>
一个 CUDA 流的拥有者封装器。
为 CUDA 流提供 RAII 生命周期语义。
◆ cuda_stream() [1/2]
移动构造函数 (默认)
被移动的 cuda_stream 是无效的,并且调用访问所拥有流的方法会导致未定义行为。
◆ cuda_stream() [2/2]
rmm::cuda_stream::cuda_stream |
( |
| ) |
|
|
inline |
◆ is_valid()
bool rmm::cuda_stream::is_valid |
( |
| ) |
const |
|
inline |
如果拥有的流非空,则返回 true。
- 返回值
- true 如果拥有的流没有被显式移动且因此非空。
- false 如果拥有的流已被显式移动且因此为空。
◆ operator cuda_stream_view()
◆ operator=()
◆ synchronize()
void rmm::cuda_stream::synchronize |
( |
| ) |
const |
|
inline |
同步拥有的 CUDA 流。
调用 cudaStreamSynchronize()
。
- 异常
-
◆ synchronize_no_throw()
void rmm::cuda_stream::synchronize_no_throw |
( |
| ) |
const |
|
inlinenoexcept |
同步拥有的 CUDA 流。如果发生错误则不抛出异常。
调用 cudaStreamSynchronize()
并在发生错误时断言。
◆ value()
cudaStream_t rmm::cuda_stream::value |
( |
| ) |
const |
|
inline |
获取封装的 CUDA 流的值。
- 返回值
- cudaStream_t 封装的 CUDA 流。
◆ view()
此类的文档生成自以下文件