Check the result of the computation

Make sure the result of the computation is always the same
This commit is contained in:
Thomas Preud'homme 2012-02-01 18:57:24 +01:00
parent 8010f34abe
commit 75bd067571
1 changed files with 4 additions and 3 deletions

View File

@ -27,6 +27,8 @@ typedef unsigned long data_t;
long seq_len = 24/*27720*/;
long nb_packets = 100000;
struct timespec stage_time;
data_t result = 0;
/* $Stage_{i+1} (data_{j+1}) = E_i (data_{j+1}) + E_{i+1} (data_j)$ */
void process_stage(data_t *prev_pipeline_stage, data_t *next_pipeline_stage)
@ -73,6 +75,7 @@ void last_process_stage(data_t *prev_stage)
process_stage(prev_stage, &next_stage);
printf("%lu\n", next_stage);
result = next_stage;
}
int analyse_options(int argc, char *argv[])
@ -266,10 +269,7 @@ int compute_metrics(void)
last_process_stage(&state4);
#elif NB_CORES > 3
#pragma omp task input (state3)
{
//printf("3.5) state1: %lu\n", state3);
last_process_stage(&state3);
}
#elif NB_CORES > 2
#pragma omp task input (state2)
last_process_stage(&state2);
@ -283,6 +283,7 @@ int compute_metrics(void)
}
}
}
printf("Final result: %lu\n", result);
return 0;
}