From d6e8459f201ec0e95da31d9886f413f9fd10a034 Mon Sep 17 00:00:00 2001 From: kortschak Date: Thu, 10 Sep 2015 15:32:50 +0930 Subject: [PATCH] Fix LAPACK_*lansy routines Fixes #639. --- lapack-netlib/lapacke/src/lapacke_clansy.c | 4 ++-- lapack-netlib/lapacke/src/lapacke_dlansy.c | 4 ++-- lapack-netlib/lapacke/src/lapacke_slansy.c | 4 ++-- lapack-netlib/lapacke/src/lapacke_zlansy.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lapack-netlib/lapacke/src/lapacke_clansy.c b/lapack-netlib/lapacke/src/lapacke_clansy.c index 84a9d965ab..eb99511450 100644 --- a/lapack-netlib/lapacke/src/lapacke_clansy.c +++ b/lapack-netlib/lapacke/src/lapacke_clansy.c @@ -51,7 +51,7 @@ float LAPACKE_clansy( int matrix_order, char norm, char uplo, lapack_int n, #endif /* Allocate memory for working array(s) */ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) || - LAPACKE_lsame( norm, '0' ) ) { + LAPACKE_lsame( norm, 'O' ) ) { work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; @@ -62,7 +62,7 @@ float LAPACKE_clansy( int matrix_order, char norm, char uplo, lapack_int n, res = LAPACKE_clansy_work( matrix_order, norm, uplo, n, a, lda, work ); /* Release memory and exit */ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) || - LAPACKE_lsame( norm, '0' ) ) { + LAPACKE_lsame( norm, 'O' ) ) { LAPACKE_free( work ); } exit_level_0: diff --git a/lapack-netlib/lapacke/src/lapacke_dlansy.c b/lapack-netlib/lapacke/src/lapacke_dlansy.c index 5e6721ef8d..3d9964202b 100644 --- a/lapack-netlib/lapacke/src/lapacke_dlansy.c +++ b/lapack-netlib/lapacke/src/lapacke_dlansy.c @@ -51,7 +51,7 @@ double LAPACKE_dlansy( int matrix_order, char norm, char uplo, lapack_int n, #endif /* Allocate memory for working array(s) */ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) || - LAPACKE_lsame( norm, '0' ) ) { + LAPACKE_lsame( norm, 'O' ) ) { work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; @@ -62,7 +62,7 @@ double LAPACKE_dlansy( int matrix_order, char norm, char uplo, lapack_int n, res = LAPACKE_dlansy_work( matrix_order, norm, uplo, n, a, lda, work ); /* Release memory and exit */ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) || - LAPACKE_lsame( norm, '0' ) ) { + LAPACKE_lsame( norm, 'O' ) ) { LAPACKE_free( work ); } exit_level_0: diff --git a/lapack-netlib/lapacke/src/lapacke_slansy.c b/lapack-netlib/lapacke/src/lapacke_slansy.c index 105ce46355..adad99b7dc 100644 --- a/lapack-netlib/lapacke/src/lapacke_slansy.c +++ b/lapack-netlib/lapacke/src/lapacke_slansy.c @@ -51,7 +51,7 @@ float LAPACKE_slansy( int matrix_order, char norm, char uplo, lapack_int n, #endif /* Allocate memory for working array(s) */ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) || - LAPACKE_lsame( norm, '0' ) ) { + LAPACKE_lsame( norm, 'O' ) ) { work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; @@ -62,7 +62,7 @@ float LAPACKE_slansy( int matrix_order, char norm, char uplo, lapack_int n, res = LAPACKE_slansy_work( matrix_order, norm, uplo, n, a, lda, work ); /* Release memory and exit */ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) || - LAPACKE_lsame( norm, '0' ) ) { + LAPACKE_lsame( norm, 'O' ) ) { LAPACKE_free( work ); } exit_level_0: diff --git a/lapack-netlib/lapacke/src/lapacke_zlansy.c b/lapack-netlib/lapacke/src/lapacke_zlansy.c index 891437846c..460a51a85c 100644 --- a/lapack-netlib/lapacke/src/lapacke_zlansy.c +++ b/lapack-netlib/lapacke/src/lapacke_zlansy.c @@ -51,7 +51,7 @@ double LAPACKE_zlansy( int matrix_order, char norm, char uplo, lapack_int n, #endif /* Allocate memory for working array(s) */ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) || - LAPACKE_lsame( norm, '0' ) ) { + LAPACKE_lsame( norm, 'O' ) ) { work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; @@ -62,7 +62,7 @@ double LAPACKE_zlansy( int matrix_order, char norm, char uplo, lapack_int n, res = LAPACKE_zlansy_work( matrix_order, norm, uplo, n, a, lda, work ); /* Release memory and exit */ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) || - LAPACKE_lsame( norm, '0' ) ) { + LAPACKE_lsame( norm, 'O' ) ) { LAPACKE_free( work ); } exit_level_0: