summaryrefslogtreecommitdiff
path: root/Microbenchmarks/STREAM/host/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'Microbenchmarks/STREAM/host/app.c')
-rw-r--r--Microbenchmarks/STREAM/host/app.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Microbenchmarks/STREAM/host/app.c b/Microbenchmarks/STREAM/host/app.c
index 6e0ac16..14b2c4d 100644
--- a/Microbenchmarks/STREAM/host/app.c
+++ b/Microbenchmarks/STREAM/host/app.c
@@ -102,6 +102,12 @@ int main(int argc, char **argv) {
double cc_min = 0;
const unsigned int input_size = p.input_size * nr_of_dpus;
+#if defined(add) || defined(triad)
+ const unsignd int n_arrays = 3;
+#else
+ const unsignd int n_arrays = 2;
+#endif
+
// Input/output allocation
A = malloc(input_size * sizeof(T));
B = malloc(input_size * sizeof(T));
@@ -242,7 +248,7 @@ int main(int argc, char **argv) {
}
if (status) {
printf("[" ANSI_COLOR_GREEN "OK" ANSI_COLOR_RESET "] Outputs are equal\n");
- printf("[::] n_dpus=%d n_tasklets=%d e_benchmark=%-6s e_type=%s e_mem=%s b_unroll=%d | throughput_cpu_MBps=%f throughput_pim_MBps=%f throughput_MBps=%f \n", nr_of_dpus, NR_TASKLETS, benchmark_name, XSTR(T), mem_name, UNROLL, input_size * sizeof(T) / timer.time[0], input_size * sizeof(T) / timer.time[2], input_size * sizeof(T) / (timer.time[1] + timer.time[2] + timer.time[3]));
+ printf("[::] n_dpus=%d n_tasklets=%d e_benchmark=%-6s e_type=%s e_mem=%s b_unroll=%d | throughput_cpu_MBps=%f throughput_pim_MBps=%f throughput_MBps=%f \n", nr_of_dpus, NR_TASKLETS, benchmark_name, XSTR(T), mem_name, UNROLL, input_size * n_arrays * sizeof(T) / timer.time[0], input_size * n_arrays * sizeof(T) / timer.time[2], input_size * n_arrays * sizeof(T) / (timer.time[1] + timer.time[2] + timer.time[3]));
printf("[::] n_dpus=%d n_tasklets=%d e_benchmark=%-6s e_type=%s e_mem=%s b_unroll=%d | throughput_cpu_MOpps=%f throughput_pim_MOpps=%f throughput_MOpps=%f \n", nr_of_dpus, NR_TASKLETS, benchmark_name, XSTR(T), mem_name, UNROLL, input_size / timer.time[0], input_size / timer.time[2], input_size / (timer.time[1] + timer.time[2] + timer.time[3]));
} else {
printf("[" ANSI_COLOR_RED "ERROR" ANSI_COLOR_RESET "] Outputs differ!\n");