GADGET-4
io_streamcount Class Reference

#include <io_streamcount.h>

Inherited by IO_Def, ewald, restart, and test_io_bandwidth.

Public Member Functions

size_t my_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream)
 A wrapper for the fwrite() function. More...
 
size_t my_fread (void *ptr, size_t size, size_t nmemb, FILE *stream)
 A wrapper for the fread() function. More...
 
void reset_io_byte_count (void)
 
long long get_io_byte_count (void)
 

Public Attributes

long long byte_count = 0
 

Detailed Description

Definition at line 17 of file io_streamcount.h.

Member Function Documentation

◆ get_io_byte_count()

long long get_io_byte_count ( void  )
inline

Definition at line 95 of file io_streamcount.h.

◆ my_fread()

size_t my_fread ( void *  ptr,
size_t  size,
size_t  nmemb,
FILE *  stream 
)
inline

A wrapper for the fread() function.

This catches I/O errors occuring for fread(). In this case we better stop. If stream is null, no attempt at readingis done.

Parameters
ptrpointer to the beginning of memory location where to store data
sizesize in bytes of a single data element
nmembnumber of elements to be read
streampointer to the nput stream
Returns
number of elements read from stream

Definition at line 66 of file io_streamcount.h.

◆ my_fwrite()

size_t my_fwrite ( const void *  ptr,
size_t  size,
size_t  nmemb,
FILE *  stream 
)
inline

A wrapper for the fwrite() function.

This catches I/O errors occuring for fwrite(). In this case we better stop. If stream is null, no attempt at writing is done.

Parameters
ptrpointer to the beginning of data to write
sizesize in bytes of a single data element
nmembnumber of elements to be written
streampointer to the output stream
Returns
number of elements written to stream

Definition at line 33 of file io_streamcount.h.

◆ reset_io_byte_count()

void reset_io_byte_count ( void  )
inline

Definition at line 93 of file io_streamcount.h.

Member Data Documentation

◆ byte_count

long long byte_count = 0

Definition at line 20 of file io_streamcount.h.


The documentation for this class was generated from the following file: