Synchronous I/O API

Synchronous I/O API#

ROCprofiler-SDK developer API: Synchronous I/O API
ROCprofiler-SDK developer API 1.4.1
ROCm Profiling API and tools
Synchronous I/O API

Typedefs

typedef off_t hoff_t
 Platform-independent offset type.
 

Functions

ssize_t hipFileRead (hipFileHandle_t fh, void *buffer_base, unsigned long size, hoff_t file_offset, hoff_t buffer_offset)
 Synchronously read data from a file into a GPU buffer.
 
ssize_t hipFileWrite (hipFileHandle_t fh, const void *buffer_base, unsigned long size, hoff_t file_offset, hoff_t buffer_offset)
 Synchronously write data from a GPU buffer to a file.
 

Detailed Description

Typedef Documentation

◆ hoff_t

typedef off_t hoff_t

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

Platform-independent offset type.

Definition at line 107 of file hipfile.h.

Function Documentation

◆ hipFileRead()

ssize_t hipFileRead ( hipFileHandle_t  fh,
void *  buffer_base,
unsigned long  size,
hoff_t  file_offset,
hoff_t  buffer_offset 
)

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

Synchronously read data from a file into a GPU buffer.

Parameters
[in]fh\hipfile_handle_param
[in]buffer_base\buffer_base_param
[in]sizeNumber of bytes that should be read
[in]file_offsetOffset into the file that should be read from
[in]buffer_offsetOffset of the GPU buffer that that the data should be written to

\max_io_size_note

Returns
if >= 0: Number of bytes read
if -1: System error (check errno for the specific error)
else: Negative value of the related hipFileOpError_t

◆ hipFileWrite()

ssize_t hipFileWrite ( hipFileHandle_t  fh,
const void *  buffer_base,
unsigned long  size,
hoff_t  file_offset,
hoff_t  buffer_offset 
)

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

Synchronously write data from a GPU buffer to a file.

Parameters
[in]fh\hipfile_handle_param
[in]buffer_base\buffer_base_param
[in]sizeNumber of bytes that should be written
[in]file_offsetOffset into the file that should be written to
[in]buffer_offsetOffset of the GPU buffer that the data should be read from

\max_io_size_note

Returns
if >= 0: Number of bytes written
if -1: System error (check errno for the specific error)
else: Negative value of the related hipFileOpError_t