Check the result of the computation
Make sure the result of the computation is always the same
This commit is contained in:
parent
8010f34abe
commit
75bd067571
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue