Skip to content

cuFileIO

#include <sbio/io/cufile.hh>
struct cuFileIO

Defined in src/lib/sbio/io/cufile.hh:39

Inherits: IOPolicy< cuFileIO >

A IO protocol using cuFile APIs in conjunction with POSIX descriptors.

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
Kind Name Description
function IOPolicy inline
function connect inline
function read const inline
function file_size const inline
variable m_file_size
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()

Defined in src/lib/sbio/io/cufile.hh:54


~cuFileIO()

Defined in src/lib/sbio/io/cufile.hh:55


cuFileIO(const cuFileIO & other) = delete

Defined in src/lib/sbio/io/cufile.hh:57

Deleted constructor.


cuFileIO & operator=(const cuFileIO & other) = default

Defined in src/lib/sbio/io/cufile.hh:58

Defaulted assignment operator.


noexcept

cuFileIO(cuFileIO && other) noexcept

Defined in src/lib/sbio/io/cufile.hh:60


noexcept

cuFileIO & operator=(cuFileIO && other) noexcept

Defined in src/lib/sbio/io/cufile.hh:61


IOStatus connect(const char * path)

Defined in src/lib/sbio/io/cufile.hh:63


IOStatus connect(int fd)

Defined in src/lib/sbio/io/cufile.hh:66


const

ReadResult read_impl(std::uint64_t offset, std::size_t size, void * dest) const

Defined in src/lib/sbio/io/cufile.hh:69

Return Name Description
constexpr IOCapability Capabilities static constexpr Read into device with cuFile and into host using pread.

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.

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

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.

true if the driver is open.

Parameter Type Description
error const char *& If the driver can not be opened, a description of the problem.

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).


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.


static

static void deregister_buffer(void * ptr)

Defined in src/lib/sbio/io/cufile.hh:94

Return Name Description
int m_fd
int m_host_fd
CUfileDescr_t m_descr
CUfileHandle_t m_handle
bool m_holds_driver

int m_fd

Defined in src/lib/sbio/io/cufile.hh:106


int m_host_fd { -1 }

Defined in src/lib/sbio/io/cufile.hh:107


CUfileDescr_t m_descr

Defined in src/lib/sbio/io/cufile.hh:109


CUfileHandle_t m_handle { nullptr }

Defined in src/lib/sbio/io/cufile.hh:110


bool m_holds_driver { false }

Defined in src/lib/sbio/io/cufile.hh:111

Return Name Description
ReadResult read_host const
void release
void take

const

ReadResult read_host(std::uint64_t offset, std::size_t size, void * dest) const

Defined in src/lib/sbio/io/cufile.hh:97


void release()

Defined in src/lib/sbio/io/cufile.hh:99


void take(cuFileIO & other)

Defined in src/lib/sbio/io/cufile.hh:101