Defines | |
#define | DEF_CALCULATE_RAW_DATA(suffix, representation) |
A macro for constructing calculate_raw_data_normal and calculate_raw_data_hapax. | |
Functions | |
static void | print_raw_data (unsigned accum_items, unsigned accum_value) |
Print a row of raw data. | |
static void | calculate_raw_data_normal (const input_t *pinput) |
Print raw data for type accumulation. | |
static void | calculate_raw_data_hapax (const input_t *pinput) |
Print raw data for hapax accumulation. | |
static void | calculate_raw_data (const input_t *pinput) |
Print raw data for type or hapax accumulation. |
#define DEF_CALCULATE_RAW_DATA | ( | suffix, | |||
representation | ) |
Value:
static void \ calculate_raw_data_ ## suffix(const input_t *pinput) \ { \ builtin_rng_state_t rng_state; \ builtin_rng_init(&rng_state); \ \ for (unsigned iteration = 0; iteration < pinput->iterations; iteration++) { \ unsigned sample_order[pinput->nsample]; \ next_permutation(&rng_state, pinput, sample_order); \ \ representation ## _t accum[pinput->type_words]; \ representation ## _clear(accum, pinput->type_words); \ \ unsigned accum_items = 0; \ unsigned accum_value = 0; \ \ print_raw_data(accum_items, accum_value); \ for (unsigned i = 0; i < pinput->nsample; i++) { \ const unsigned sample = sample_order[i]; \ accum_items += pinput->sample_items[sample]; \ \ bounds_t b_sample; \ calculate_bounds_ ## suffix(pinput, sample, accum, &accum_value, &b_sample); \ \ print_raw_data(accum_items, accum_value); \ } \ } \ }
static void calculate_raw_data | ( | const input_t * | pinput | ) | [static] |
Print raw data for type or hapax accumulation.
Definition at line 1047 of file types.c.
References calculate_raw_data_hapax(), and calculate_raw_data_normal().
Referenced by main().
static void calculate_raw_data_hapax | ( | const input_t * | pinput | ) | [static] |
Print raw data for hapax accumulation.
Definition at line 1043 of file types.c.
Referenced by calculate_raw_data().
static void calculate_raw_data_normal | ( | const input_t * | pinput | ) | [static] |
Print raw data for type accumulation.
Definition at line 1040 of file types.c.
Referenced by calculate_raw_data().
static void print_raw_data | ( | unsigned | accum_items, | |
unsigned | accum_value | |||
) | [static] |