SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
Functions
sion_buffer.h File Reference
#include "sion_const.h"
#include "sion_filedesc.h"
Include dependency graph for sion_buffer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int _sion_buffer_check_env (_sion_filedesc *sion_filedesc)
 Checks if environment variables are set to use buffer. More...
 
int _sion_buffer_init (_sion_filedesc *sion_filedesc)
 Allocate and initalize the buffer. More...
 
sion_int64 _sion_buffer_push (_sion_filedesc *sion_filedesc, const void *data, sion_int64 bytes)
 Push data to buffer. More...
 
int _sion_buffer_get_data_ptr (_sion_filedesc *sion_filedesc, void **data, sion_int64 *bytes)
 Pop all data from buffer. More...
 
int _sion_buffer_flush (_sion_filedesc *sion_filedesc)
 Flush buffer. More...
 

Function Documentation

◆ _sion_buffer_check_env()

int _sion_buffer_check_env ( _sion_filedesc sion_filedesc)

Checks if environment variables are set to use buffer.

Parameters
*sion_filedescsion file description struct (_sion_filedesc)
Returns
SION_SUCCESS if env could be checked

Definition at line 60 of file sion_buffer.c.

◆ _sion_buffer_flush()

int _sion_buffer_flush ( _sion_filedesc sion_filedesc)

Flush buffer.

Parameters
*sion_filedescsion file description struct (_sion_filedesc)
Returns
SION_SUCCESS if ok

Definition at line 177 of file sion_buffer.c.

◆ _sion_buffer_get_data_ptr()

int _sion_buffer_get_data_ptr ( _sion_filedesc sion_filedesc,
void **  data,
sion_int64 *  bytes 
)

Pop all data from buffer.

Parameters
*sion_filedescsion file description struct (_sion_filedesc)
*datapointer to data
*bytesnumber of bytes in buffer
Returns
1 if there is data to process 0 not data in buffer

Definition at line 152 of file sion_buffer.c.

References _sion_filedesc_struct::buffer, and _sion_filedesc_struct::buffer_ptr.

◆ _sion_buffer_init()

int _sion_buffer_init ( _sion_filedesc sion_filedesc)

Allocate and initalize the buffer.

Parameters
*sion_filedescsion file description struct (_sion_filedesc)
Returns
SION_SUCCESS if ok

Definition at line 81 of file sion_buffer.c.

◆ _sion_buffer_push()

sion_int64 _sion_buffer_push ( _sion_filedesc sion_filedesc,
const void *  data,
sion_int64  bytes 
)

Push data to buffer.

Parameters
*sion_filedescsion file description struct (_sion_filedesc)
*datapointer to data
*bytesnumber of bytes to push
Returns
number of bytes stored

Definition at line 106 of file sion_buffer.c.