From 4c2123c3343c523d5359853ac0ebe1bd6550a881 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Sat, 23 Feb 2013 12:51:13 +0800 Subject: [PATCH] Fixed the overflowing bug in single thread cholesky factorization. --- lapack/potrf/potrf_L_single.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lapack/potrf/potrf_L_single.c b/lapack/potrf/potrf_L_single.c index b88f8fc7a..d6d143623 100644 --- a/lapack/potrf/potrf_L_single.c +++ b/lapack/potrf/potrf_L_single.c @@ -66,7 +66,9 @@ static FLOAT dm1 = -1.; #endif #define GEMM_PQ MAX(GEMM_P, GEMM_Q) -#define REAL_GEMM_R (GEMM_R - GEMM_PQ) + +//leave some space for GEMM_ALIGN in sb2 +#define REAL_GEMM_R (GEMM_R - 2*GEMM_PQ) #if 0 #define SHARED_ARRAY @@ -220,7 +222,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, sa, sb2, a + (is + js * lda) * COMPSIZE, lda, - - is + js); + is - js); #endif }