cuFileIO
cuFileIO
Section titled “cuFileIO”#include <sbio/io/cufile.hh>struct cuFileIODefined in src/lib/sbio/io/cufile.hh:39
Inherits:
IOPolicy< cuFileIO >
A IO protocol using cuFile APIs in conjunction with POSIX descriptors.
List of all members
Section titled “List of all members”| Name | Kind | Owner |
|---|---|---|
cuFileIO |
function |
Declared here |
~cuFileIO |
function |
Declared here |
cuFileIO |
function |
Declared here |
operator= |
function |
Declared here |
cuFileIO |
function |
Declared here |
operator= |
function |
Declared here |
connect |
function |
Declared here |
connect |
function |
Declared here |
read_impl |
function |
Declared here |
Capabilities |
variable |
Declared here |
open_environment |
function |
Declared here |
close_environment |
function |
Declared here |
register_buffer |
function |
Declared here |
deregister_buffer |
function |
Declared here |
m_fd |
variable |
Declared here |
m_host_fd |
variable |
Declared here |
m_descr |
variable |
Declared here |
m_handle |
variable |
Declared here |
m_holds_driver |
variable |
Declared here |
read_host |
function |
Declared here |
release |
function |
Declared here |
take |
function |
Declared here |
IOPolicy |
function |
Inherited from IOPolicy |
connect |
function |
Inherited from IOPolicy |
read |
function |
Inherited from IOPolicy |
file_size |
function |
Inherited from IOPolicy |
m_file_size |
variable |
Inherited from IOPolicy |
Inherited from IOPolicy
Section titled “Inherited from IOPolicy”| Kind | Name | Description |
|---|---|---|
function |
IOPolicy inline |
|
function |
connect inline |
|
function |
read const inline |
|
function |
file_size const inline |
|
variable |
m_file_size |
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
cuFileIO |
||
~cuFileIO |
||
cuFileIO |
Deleted constructor. | |
cuFileIO & |
operator= |
Defaulted assignment operator. |
cuFileIO noexcept |
||
cuFileIO & |
operator= noexcept |
|
IOStatus |
connect |
|
IOStatus |
connect |
|
ReadResult |
read_impl const |
cuFileIO
Section titled “cuFileIO”cuFileIO()Defined in src/lib/sbio/io/cufile.hh:54
~cuFileIO
Section titled “~cuFileIO”~cuFileIO()Defined in src/lib/sbio/io/cufile.hh:55
cuFileIO
Section titled “cuFileIO”cuFileIO(const cuFileIO & other) = deleteDefined in src/lib/sbio/io/cufile.hh:57
Deleted constructor.
operator=
Section titled “operator=”cuFileIO & operator=(const cuFileIO & other) = defaultDefined in src/lib/sbio/io/cufile.hh:58
Defaulted assignment operator.
cuFileIO
Section titled “cuFileIO”noexcept
cuFileIO(cuFileIO && other) noexceptDefined in src/lib/sbio/io/cufile.hh:60
operator=
Section titled “operator=”noexcept
cuFileIO & operator=(cuFileIO && other) noexceptDefined in src/lib/sbio/io/cufile.hh:61
connect
Section titled “connect”IOStatus connect(const char * path)Defined in src/lib/sbio/io/cufile.hh:63
connect
Section titled “connect”IOStatus connect(int fd)Defined in src/lib/sbio/io/cufile.hh:66
read_impl
Section titled “read_impl”const
ReadResult read_impl(std::uint64_t offset, std::size_t size, void * dest) constDefined in src/lib/sbio/io/cufile.hh:69
Public Static Attributes
Section titled “Public Static Attributes”| Return | Name | Description |
|---|---|---|
constexpr IOCapability |
Capabilities static constexpr |
Read into device with cuFile and into host using pread. |
Capabilities
Section titled “Capabilities”static constexpr
constexpr IOCapability Capabilities { IOCapability::ReadToDevice | IOCapability::ReadToHost | IOCapability::ReadToPinned | IOCapability::ConcurrentReads }Type: constexpr IOCapability
Defined in src/lib/sbio/io/cufile.hh:47
Read into device with cuFile and into host using pread.
Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
bool |
open_environment static |
Hold a reference to the cuFile driver (opened by the first reference). |
void |
close_environment static |
Release a reference to the cuFile driver (closed with the last reference). |
bool |
register_buffer static |
Register device memory with cuFile, for faster reads into it. |
void |
deregister_buffer static |
open_environment
Section titled “open_environment”static
static bool open_environment(const char *& error)Defined in src/lib/sbio/io/cufile.hh:79
Hold a reference to the cuFile driver (opened by the first reference).
A Context holds one for its lifetime, as does every connected cuFileIO.
Returns
Section titled “Returns”true if the driver is open.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
error |
const char *& |
If the driver can not be opened, a description of the problem. |
close_environment
Section titled “close_environment”static
static void close_environment()Defined in src/lib/sbio/io/cufile.hh:84
Release a reference to the cuFile driver (closed with the last reference).
register_buffer
Section titled “register_buffer”static
static bool register_buffer(void * ptr, std::size_t size)Defined in src/lib/sbio/io/cufile.hh:92
Register device memory with cuFile, for faster reads into it.
Registration is optional: unregistered memory is read through cuFile’s own bounce buffers.
deregister_buffer
Section titled “deregister_buffer”static
static void deregister_buffer(void * ptr)Defined in src/lib/sbio/io/cufile.hh:94
Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
int |
m_fd |
|
int |
m_host_fd |
|
CUfileDescr_t |
m_descr |
|
CUfileHandle_t |
m_handle |
|
bool |
m_holds_driver |
int m_fdDefined in src/lib/sbio/io/cufile.hh:106
m_host_fd
Section titled “m_host_fd”int m_host_fd { -1 }Defined in src/lib/sbio/io/cufile.hh:107
m_descr
Section titled “m_descr”CUfileDescr_t m_descrDefined in src/lib/sbio/io/cufile.hh:109
m_handle
Section titled “m_handle”CUfileHandle_t m_handle { nullptr }Defined in src/lib/sbio/io/cufile.hh:110
m_holds_driver
Section titled “m_holds_driver”bool m_holds_driver { false }Defined in src/lib/sbio/io/cufile.hh:111
Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
ReadResult |
read_host const |
|
void |
release |
|
void |
take |
read_host
Section titled “read_host”const
ReadResult read_host(std::uint64_t offset, std::size_t size, void * dest) constDefined in src/lib/sbio/io/cufile.hh:97
release
Section titled “release”void release()Defined in src/lib/sbio/io/cufile.hh:99
void take(cuFileIO & other)Defined in src/lib/sbio/io/cufile.hh:101