codex
Loading...
Searching...
No Matches
table.c File Reference
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for table.c:

Classes

struct  reader
 
struct  result
 
struct  results
 

Macros

#define MAX(x, y)   ((x) > (y) ? (x) : (y))
 
#define FMT_LEN(f, x)   (size_t)(snprintf(NULL, 0, (f), (x)))
 

Functions

void reader_destroy (struct reader *r)
 
const char * reader_getline (struct reader *r, FILE *f)
 
static void result_destroy (struct result *r)
 
static void results_destroy (struct results *r)
 
static void results_append (struct results *r, size_t t_len, long t, char *msg)
 
static bool parse_line (const char *line, size_t *out_t_len, long *out_t, const char **out_msg)
 
static void calc_max (const struct results *r, size_t *max, size_t *max_sub0, size_t *max_sub1, size_t *max_div0, size_t *max_div1)
 
static void print_header (size_t max, size_t max_sub0, size_t max_sub1, size_t max_div0, size_t max_div1)
 
static void print_result (double t0, double t_prev, size_t max, size_t max_sub0, size_t max_sub1, size_t max_div0, size_t max_div1, double t, const char *msg)
 
static void print_table (const struct results *r)
 
int main ()
 

Macro Definition Documentation

◆ FMT_LEN

#define FMT_LEN ( f,
x )   (size_t)(snprintf(NULL, 0, (f), (x)))

◆ MAX

#define MAX ( x,
y )   ((x) > (y) ? (x) : (y))

Function Documentation

◆ calc_max()

static void calc_max ( const struct results * r,
size_t * max,
size_t * max_sub0,
size_t * max_sub1,
size_t * max_div0,
size_t * max_div1 )
static

◆ main()

int main ( void )
Here is the call graph for this function:

◆ parse_line()

static bool parse_line ( const char * line,
size_t * out_t_len,
long * out_t,
const char ** out_msg )
static
Here is the call graph for this function:

◆ print_header()

static void print_header ( size_t max,
size_t max_sub0,
size_t max_sub1,
size_t max_div0,
size_t max_div1 )
static
Here is the call graph for this function:

◆ print_result()

static void print_result ( double t0,
double t_prev,
size_t max,
size_t max_sub0,
size_t max_sub1,
size_t max_div0,
size_t max_div1,
double t,
const char * msg )
static
Here is the call graph for this function:

◆ print_table()

static void print_table ( const struct results * r)
static
Here is the call graph for this function:

◆ reader_destroy()

void reader_destroy ( struct reader * r)

◆ reader_getline()

const char * reader_getline ( struct reader * r,
FILE * f )

◆ result_destroy()

static void result_destroy ( struct result * r)
static

◆ results_append()

static void results_append ( struct results * r,
size_t t_len,
long t,
char * msg )
static

◆ results_destroy()

static void results_destroy ( struct results * r)
static
Here is the call graph for this function: