From faba876fda719518d43dd6ccf14dd91f544fd1b7 Mon Sep 17 00:00:00 2001 From: Ashwin Sekhar T K Date: Sun, 19 Feb 2017 23:11:50 -0800 Subject: [PATCH] THUNDERX2T99: Bug fix in C/Z IAMAX --- kernel/arm64/iamax_thunderx2t99.c | 2 +- kernel/arm64/izamax_thunderx2t99.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/arm64/iamax_thunderx2t99.c b/kernel/arm64/iamax_thunderx2t99.c index 62429fd40..bc5f3c3ca 100644 --- a/kernel/arm64/iamax_thunderx2t99.c +++ b/kernel/arm64/iamax_thunderx2t99.c @@ -326,7 +326,7 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x) if (inc_x == 0) nthreads = 1; - if (n <= 1000) + if (n <= 10000) nthreads = 1; if (nthreads == 1) { diff --git a/kernel/arm64/izamax_thunderx2t99.c b/kernel/arm64/izamax_thunderx2t99.c index d99509580..152f936b6 100644 --- a/kernel/arm64/izamax_thunderx2t99.c +++ b/kernel/arm64/izamax_thunderx2t99.c @@ -335,7 +335,7 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x) if (inc_x == 0) nthreads = 1; - if (n <= 1000) + if (n <= 10000) nthreads = 1; if (nthreads == 1) { @@ -366,8 +366,8 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x) BLASLONG cur_max_index; cur_max_index = *(BLASLONG *)&result[num_cpu * sizeof(double) * 2]; - elem_r = x[((cur_index + cur_max_index - 1) * inc_x) + 0]; - elem_i = x[((cur_index + cur_max_index - 1) * inc_x) + 1]; + elem_r = x[((cur_index + cur_max_index - 1) * inc_x * 2) + 0]; + elem_i = x[((cur_index + cur_max_index - 1) * inc_x * 2) + 1]; elem_r = fabs(elem_r) + fabs(elem_i); if (elem_r >= max) {