1 #ifndef PHSOLVER_PHIO_H 2 #define PHSOLVER_PHIO_H 3 #include <stdlib.h> 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 void phio_initStats(); 9 void phio_printStats(); 10 double phio_getReadTime(); 11 double phio_getWriteTime(); 12 double phio_getOpenTime(); 13 double phio_getCloseTime(); 14 size_t phio_getReadBytes(); 15 size_t phio_getWriteBytes(); 16 size_t phio_getReads(); 17 size_t phio_getWrites(); 18 typedef struct phio_file* phio_fp; 19 void phio_openfile( 20 const char filename[], 21 phio_fp fileDescriptor); 22 void phio_closefile(phio_fp fileDescriptor); 23 void phio_readheader( 24 phio_fp fileDescriptor, 25 const char keyphrase[], 26 void* valueArray, 27 int* nItems, 28 const char datatype[], 29 const char iotype[] ); 30 void phio_writeheader( 31 phio_fp fileDescriptor, 32 const char keyphrase[], 33 const void* valueArray, 34 const int* nItems, 35 const int* ndataItems, 36 const char datatype[], 37 const char iotype[] ); 38 void phio_readdatablock( 39 phio_fp fileDescriptor, 40 const char keyphrase[], 41 void* valueArray, 42 int* nItems, 43 const char datatype[], 44 const char iotype[] ); 45 void phio_writedatablock( 46 phio_fp fileDescriptor, 47 const char keyphrase[], 48 const void* valueArray, 49 const int* nItems, 50 const char datatype[], 51 const char iotype[]); 52 void phio_constructName( 53 phio_fp fileDescriptor, 54 const char* inName, 55 char* outName); 56 #ifdef __cplusplus 57 } 58 #endif 59 60 #endif 61 62