64 #ifndef prof_lean_hpcfmt_h 65 #define prof_lean_hpcfmt_h 85 #if defined(__cplusplus) 97 #define HPCFMT_ThrowIfError(v) if ( (v) != HPCFMT_OK ) { return HPCFMT_ERR; } 115 #define HPCFMT_List(t) list_of_ ## t 117 #define HPCFMT_ListRep(t) \ 118 struct HPCFMT_List(t) { \ 123 #define HPCFMT_List_declare(t) \ 124 typedef HPCFMT_ListRep(t) HPCFMT_List(t) 153 if ( sz !=
sizeof(uint16_t) ) {
164 if ( sz !=
sizeof(uint32_t) ) {
175 if ( sz !=
sizeof(uint64_t) ) {
197 if ( sz !=
sizeof(
double) ) {
282 static inline const char*
325 FILE* fs,
const char* pre);
353 #if defined(__cplusplus) size_t hpcio_be2_fread(uint16_t *val, FILE *fs)
#define HPCFMT_List_declare(t)
void hpcfmt_free_fn(void *mem)
static int hpcfmt_int2_fwrite(uint16_t val, FILE *outfs)
static int hpcfmt_int2_fread(uint16_t *val, FILE *infs)
struct hpcfmt_nvpair_t hpcfmt_nvpair_t
int hpcfmt_nvpair_fprint(hpcfmt_nvpair_t *nvp, FILE *fs, const char *pre)
static int hpcfmt_real8_fread(double *val, FILE *infs)
static int hpcfmt_intX_fwrite(uint8_t *val, size_t size, FILE *outfs)
size_t hpcio_be2_fwrite(uint16_t *val, FILE *fs)
static int hpcfmt_int4_fread(uint32_t *val, FILE *infs)
static int hpcfmt_int4_fwrite(uint32_t val, FILE *outfs)
int hpcfmt_nvpair_fread(hpcfmt_nvpair_t *inp, FILE *infs, hpcfmt_alloc_fn alloc)
int hpcfmt_str_fread(char **str, FILE *infs, hpcfmt_alloc_fn alloc)
int hpcfmt_nvpair_fwrite(hpcfmt_nvpair_t *nvp, FILE *fs)
size_t hpcio_be8_fwrite(uint64_t *val, FILE *fs)
static int hpcfmt_intX_fread(uint8_t *val, size_t size, FILE *infs)
const char * hpcfmt_nvpairList_search(const HPCFMT_List(hpcfmt_nvpair_t) *lst, const char *name)
struct metric_aux_info_s metric_aux_info_t
static int hpcfmt_int8_fread(uint64_t *val, FILE *infs)
static int hpcfmt_int8_fwrite(uint64_t val, FILE *outfs)
size_t hpcio_be4_fwrite(uint32_t *val, FILE *fs)
struct hpcfmt_str_t hpcfmt_str_t
void hpcfmt_str_free(const char *str, hpcfmt_free_fn dealloc)
int hpcfmt_str_fwrite(const char *str, FILE *outfs)
void hpcfmt_nvpairList_free(HPCFMT_List(hpcfmt_nvpair_t) *nvps, hpcfmt_free_fn dealloc)
int hpcfmt_fwrite(void *data, size_t size, FILE *outfs)
void * hpcfmt_alloc_fn(size_t nbytes)
int hpcfmt_nvpairs_vfwrite(FILE *out, va_list args)
int hpcfmt_nvpairList_fprint(const HPCFMT_List(hpcfmt_nvpair_t) *nvps, FILE *fs, const char *pre)
size_t hpcio_be4_fread(uint32_t *val, FILE *fs)
static int hpcfmt_real8_fwrite(double val, FILE *outfs)
static const char * hpcfmt_str_ensure(const char *x)
size_t hpcio_be8_fread(uint64_t *val, FILE *fs)
size_t hpcio_beX_fread(uint8_t *val, size_t size, FILE *fs)
int hpcfmt_nvpairList_fread(HPCFMT_List(hpcfmt_nvpair_t) *nvps, FILE *infs, hpcfmt_alloc_fn alloc)
int hpcfmt_fread(void *data, size_t size, FILE *infs)
size_t hpcio_beX_fwrite(uint8_t *val, size_t size, FILE *fs)