From 618b358bfdf33016aba27bfecdb56a29f7dfb30f Mon Sep 17 00:00:00 2001 From: yozo Date: Tue, 11 Nov 2008 19:55:57 +0000 Subject: [PATCH] XBLAS: Fix bug in testgen_BLAS_[cz]dot2. Wrong parameter was being passed to gen_y_to_cancel. Should pass n_fix2+1 instead of k+1, since k and n_fix2 differ by factor of two for complex case. --- XBLAS/testing/test-dot2/testgen_BLAS_cdot2.c | 2 +- XBLAS/testing/test-dot2/testgen_BLAS_zdot2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/XBLAS/testing/test-dot2/testgen_BLAS_cdot2.c b/XBLAS/testing/test-dot2/testgen_BLAS_cdot2.c index fb4ef7a0b..ec8d7735c 100644 --- a/XBLAS/testing/test-dot2/testgen_BLAS_cdot2.c +++ b/XBLAS/testing/test-dot2/testgen_BLAS_cdot2.c @@ -314,7 +314,7 @@ testgen_BLAS_cdot2(int n, int n_fix2, int n_mix, int norm, } else { /* x[k] fixed, x[k+1] fixed or free. */ y_i[k] = xrand(seed); y_i[k + 1] = xrand(seed); - gen_y_to_cancel(k+1, n, conj, alpha, head_x, tail_x, y); + gen_y_to_cancel(n_fix2 + 1, n, conj, alpha, head_x, tail_x, y); } break; default: /* y_free >= 3 */ diff --git a/XBLAS/testing/test-dot2/testgen_BLAS_zdot2.c b/XBLAS/testing/test-dot2/testgen_BLAS_zdot2.c index 57f8b392d..fa92b4e4e 100644 --- a/XBLAS/testing/test-dot2/testgen_BLAS_zdot2.c +++ b/XBLAS/testing/test-dot2/testgen_BLAS_zdot2.c @@ -310,7 +310,7 @@ testgen_BLAS_zdot2(int n, int n_fix2, int n_mix, int norm, } else { /* x[k] fixed, x[k+1] free or fixed. */ y_i[k] = xrand(seed); y_i[k + 1] = xrand(seed); - gen_y_to_cancel(k+1, n, conj, alpha, head_x, tail_x, y); + gen_y_to_cancel(n_fix2 + 1, n, conj, alpha, head_x, tail_x, y); } break; default: /* y_free >= 3 */