SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
sion_buffer.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** SIONLIB http://www.fz-juelich.de/jsc/sionlib **
3 *****************************************************************************
4 ** Copyright (c) 2008-2019 **
5 ** Forschungszentrum Juelich, Juelich Supercomputing Centre **
6 ** **
7 ** See the file COPYRIGHT in the package base directory for details **
8 ****************************************************************************/
9 
14 #ifndef SION_SION_BUFFER_H
15 #define SION_SION_BUFFER_H
16 
17 #include "sion_const.h"
18 #include "sion_filedesc.h"
19 
20 int _sion_buffer_check_env(_sion_filedesc *sion_filedesc);
21 
22 
23 int _sion_buffer_init(_sion_filedesc *sion_filedesc);
24 
25 
26 sion_int64 _sion_buffer_push(_sion_filedesc *sion_filedesc,
27  const void *data, sion_int64 bytes);
28 
29 int _sion_buffer_get_data_ptr(_sion_filedesc *sion_filedesc,
30  void **data, sion_int64 *bytes);
31 
32 int _sion_buffer_flush(_sion_filedesc *sion_filedesc);
33 
34 #endif
int _sion_buffer_check_env(_sion_filedesc *sion_filedesc)
Checks if environment variables are set to use buffer.
Definition: sion_buffer.c:60
int _sion_buffer_get_data_ptr(_sion_filedesc *sion_filedesc, void **data, sion_int64 *bytes)
Pop all data from buffer.
Definition: sion_buffer.c:152
int _sion_buffer_init(_sion_filedesc *sion_filedesc)
Allocate and initalize the buffer.
Definition: sion_buffer.c:81
int _sion_buffer_flush(_sion_filedesc *sion_filedesc)
Flush buffer.
Definition: sion_buffer.c:177
sion_int64 _sion_buffer_push(_sion_filedesc *sion_filedesc, const void *data, sion_int64 bytes)
Push data to buffer.
Definition: sion_buffer.c:106
Sion File Descriptor Structure.
Definition: sion_filedesc.h:79