公共成员函数 | 所有成员列表
rmm::cuda_stream_view 类参考

强类型非拥有型 CUDA 流包装器,带默认构造函数。更多...

#include <cuda_stream_view.hpp>

公共成员函数

constexpr cuda_stream_view (cuda_stream_view const &)=default
 默认拷贝构造函数。
 
constexpr cuda_stream_view (cuda_stream_view &&)=default
 默认移动构造函数。
 
constexpr cuda_stream_viewoperator= (cuda_stream_view const &)=default
 默认拷贝赋值运算符。更多...
 
constexpr cuda_stream_viewoperator= (cuda_stream_view &&)=default
 默认移动赋值运算符。更多...
 
constexpr cuda_stream_view (int)=delete
 
constexpr cuda_stream_view (std::nullptr_t)=delete
 
constexpr cuda_stream_view (cudaStream_t stream) noexcept
 从 cudaStream_t 构造。更多...
 
constexpr cuda_stream_view (cuda::stream_ref stream) noexcept
 从 stream_ref 隐式转换。更多...
 
constexpr cudaStream_t value () const noexcept
 获取包装的流。更多...
 
constexpr operator cudaStream_t () const noexcept
 隐式转换为 cudaStream_t。更多...
 
constexpr operator cuda::stream_ref () const noexcept
 隐式转换为 stream_ref。更多...
 
bool is_per_thread_default () const noexcept
 如果包装的流是 CUDA 每线程默认流,则为 true。更多...
 
bool is_default () const noexcept
 如果包装的流是显式 CUDA 遗留默认流,则为 true。更多...
 
void synchronize () const
 同步视图的 CUDA 流。更多...
 
void synchronize_no_throw () const noexcept
 同步视图的 CUDA 流。发生错误时不会抛出异常。更多...
 

详细描述

强类型非拥有型 CUDA 流包装器,带默认构造函数。

此包装器只是一个“视图”:它不拥有所包装流的生命周期。

构造函数与析构函数文档

◆ cuda_stream_view() [1/2]

constexpr rmm::cuda_stream_view::cuda_stream_view ( cudaStream_t  stream)
inlineconstexprnoexcept

从 cudaStream_t 构造。

参数
stream此视图的基础流

◆ cuda_stream_view() [2/2]

constexpr rmm::cuda_stream_view::cuda_stream_view ( cuda::stream_ref  stream)
inlineconstexprnoexcept

从 stream_ref 隐式转换。

参数
stream此视图的基础流

成员函数文档

◆ is_default()

bool rmm::cuda_stream_view::is_default ( ) const
inlinenoexcept

如果包装的流是显式 CUDA 遗留默认流,则为 true

返回值
如果包装的流是显式 CUDA 遗留默认流,则为 true

◆ is_per_thread_default()

bool rmm::cuda_stream_view::is_per_thread_default ( ) const
inlinenoexcept

如果包装的流是 CUDA 每线程默认流,则为 true

返回值
如果包装的流是 CUDA 每线程默认流,则为 true

◆ operator cuda::stream_ref()

constexpr rmm::cuda_stream_view::operator cuda::stream_ref ( ) const
inlineconstexprnoexcept

隐式转换为 stream_ref。

返回值
stream_ref 此 cuda_stream_view 引用的基础流

◆ operator cudaStream_t()

constexpr rmm::cuda_stream_view::operator cudaStream_t ( ) const
inlineconstexprnoexcept

隐式转换为 cudaStream_t。

返回值
cudaStream_t 此 cuda_stream_view 引用的基础流

◆ operator=() [1/2]

constexpr cuda_stream_view& rmm::cuda_stream_view::operator= ( cuda_stream_view &&  )
constexprdefault

默认移动赋值运算符。

返回值
cuda_stream_view& 赋值对象的引用

◆ operator=() [2/2]

constexpr cuda_stream_view& rmm::cuda_stream_view::operator= ( cuda_stream_view const &  )
constexprdefault

默认拷贝赋值运算符。

返回值
cuda_stream_view& 赋值对象的引用

◆ synchronize()

void rmm::cuda_stream_view::synchronize ( ) const
inline

同步视图的 CUDA 流。

调用 cudaStreamSynchronize()

异常
rmm::cuda_error如果流同步失败

◆ synchronize_no_throw()

void rmm::cuda_stream_view::synchronize_no_throw ( ) const
inlinenoexcept

同步视图的 CUDA 流。发生错误时不会抛出异常。

调用 cudaStreamSynchronize(),如果发生错误则断言。

◆ value()

constexpr cudaStream_t rmm::cuda_stream_view::value ( ) const
inlineconstexprnoexcept

获取包装的流。

返回值
cudaStream_t 此 cuda_stream_view 引用的基础流

此类的文档由以下文件生成