公共成员函数 | 所有成员列表
kvikio::CUFileHandleWrapper 类参考

提供 cuFile 句柄的 RAII(资源获取即初始化)的类。 更多内容...

#include <file_utils.hpp>

公共成员函数

 CUFileHandleWrapper (CUFileHandleWrapper const &)=delete
 
CUFileHandleWrapperoperator= (CUFileHandleWrapper const &)=delete
 
 CUFileHandleWrapper (CUFileHandleWrapper &&o) noexcept
 
CUFileHandleWrapperoperator= (CUFileHandleWrapper &&o) noexcept
 
std::optional< CUfileError_tregister_handle (int fd) noexcept
 使用给定的文件描述符注册文件句柄。 更多内容...
 
bool registered () const noexcept
 检查句柄是否已注册。 更多内容...
 
CUfileHandle_t handle () const noexcept
 返回 cuFile 句柄。 更多内容...
 
void unregister_handle () noexcept
 如果句柄已注册,则注销它;否则不做任何操作。
 

详细描述

提供 cuFile 句柄的 RAII(资源获取即初始化)的类。

定义于文件 file_utils.hpp 的第 86 行。

成员函数文档

◆ handle()

CUfileHandle_t kvikio::CUFileHandleWrapper::handle ( ) const
noexcept

返回 cuFile 句柄。

返回值
cuFile 句柄。

◆ register_handle()

std::optional<CUfileError_t> kvikio::CUFileHandleWrapper::register_handle ( int  fd)
noexcept

使用给定的文件描述符注册文件句柄。

参数
fd文件描述符。
返回值
返回句柄注册的 cuFile 错误码。如果句柄已通过调用 register_handle() 注册,则返回 std::nullopt

◆ registered()

bool kvikio::CUFileHandleWrapper::registered ( ) const
noexcept

检查句柄是否已注册。

返回值
一个布尔值,指示句柄是否已注册。

此类的文档生成自以下文件: