From f04808c2ab30d5bf4fb7da6a51f74ee5e62e2dfa Mon Sep 17 00:00:00 2001 From: "Lucas M. Schnorr" Date: Sat, 12 Oct 2024 01:14:13 -0300 Subject: [PATCH 1/2] remove comparison as these conditions are never true --- LAPACKE/src/lapacke_ctpmqrt_work.c | 4 ++-- LAPACKE/src/lapacke_dtpmqrt_work.c | 4 ++-- LAPACKE/src/lapacke_stpmqrt_work.c | 4 ++-- LAPACKE/src/lapacke_ztpmqrt_work.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/LAPACKE/src/lapacke_ctpmqrt_work.c b/LAPACKE/src/lapacke_ctpmqrt_work.c index e625410b3b..afce8f8cc0 100644 --- a/LAPACKE/src/lapacke_ctpmqrt_work.c +++ b/LAPACKE/src/lapacke_ctpmqrt_work.c @@ -51,8 +51,8 @@ lapack_int API_SUFFIX(LAPACKE_ctpmqrt_work)( int matrix_layout, char side, char } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { lapack_int nrowsA, ncolsA, nrowsV; - if ( side == API_SUFFIX(LAPACKE_lsame)(side, 'l') ) { nrowsA = k; ncolsA = n; nrowsV = m; } - else if ( side == API_SUFFIX(LAPACKE_lsame)(side, 'r') ) { nrowsA = m; ncolsA = k; nrowsV = n; } + if ( API_SUFFIX(LAPACKE_lsame)(side, 'l') ) { nrowsA = k; ncolsA = n; nrowsV = m; } + else if ( API_SUFFIX(LAPACKE_lsame)(side, 'r') ) { nrowsA = m; ncolsA = k; nrowsV = n; } else { info = -2; API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_ctpmqrt_work", info ); diff --git a/LAPACKE/src/lapacke_dtpmqrt_work.c b/LAPACKE/src/lapacke_dtpmqrt_work.c index a2f17d9700..2dea60cdae 100644 --- a/LAPACKE/src/lapacke_dtpmqrt_work.c +++ b/LAPACKE/src/lapacke_dtpmqrt_work.c @@ -49,8 +49,8 @@ lapack_int API_SUFFIX(LAPACKE_dtpmqrt_work)( int matrix_layout, char side, char } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { lapack_int nrowsA, ncolsA, nrowsV; - if ( side == API_SUFFIX(LAPACKE_lsame)(side, 'l') ) { nrowsA = k; ncolsA = n; nrowsV = m; } - else if ( side == API_SUFFIX(LAPACKE_lsame)(side, 'r') ) { nrowsA = m; ncolsA = k; nrowsV = n; } + if ( API_SUFFIX(LAPACKE_lsame)(side, 'l') ) { nrowsA = k; ncolsA = n; nrowsV = m; } + else if ( API_SUFFIX(LAPACKE_lsame)(side, 'r') ) { nrowsA = m; ncolsA = k; nrowsV = n; } else { info = -2; API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_dtpmqrt_work", info ); diff --git a/LAPACKE/src/lapacke_stpmqrt_work.c b/LAPACKE/src/lapacke_stpmqrt_work.c index 47fdd32196..4e06221a78 100644 --- a/LAPACKE/src/lapacke_stpmqrt_work.c +++ b/LAPACKE/src/lapacke_stpmqrt_work.c @@ -49,8 +49,8 @@ lapack_int API_SUFFIX(LAPACKE_stpmqrt_work)( int matrix_layout, char side, char } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { lapack_int nrowsA, ncolsA, nrowsV; - if ( side == API_SUFFIX(LAPACKE_lsame)(side, 'l') ) { nrowsA = k; ncolsA = n; nrowsV = m; } - else if ( side == API_SUFFIX(LAPACKE_lsame)(side, 'r') ) { nrowsA = m; ncolsA = k; nrowsV = n; } + if ( API_SUFFIX(LAPACKE_lsame)(side, 'l') ) { nrowsA = k; ncolsA = n; nrowsV = m; } + else if ( API_SUFFIX(LAPACKE_lsame)(side, 'r') ) { nrowsA = m; ncolsA = k; nrowsV = n; } else { info = -2; API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_stpmqrt_work", info ); diff --git a/LAPACKE/src/lapacke_ztpmqrt_work.c b/LAPACKE/src/lapacke_ztpmqrt_work.c index eb0ee3f55c..82d8de96b5 100644 --- a/LAPACKE/src/lapacke_ztpmqrt_work.c +++ b/LAPACKE/src/lapacke_ztpmqrt_work.c @@ -51,8 +51,8 @@ lapack_int API_SUFFIX(LAPACKE_ztpmqrt_work)( int matrix_layout, char side, char } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { lapack_int nrowsA, ncolsA, nrowsV; - if ( side == API_SUFFIX(LAPACKE_lsame)(side, 'l') ) { nrowsA = k; ncolsA = n; nrowsV = m; } - else if ( side == API_SUFFIX(LAPACKE_lsame)(side, 'r') ) { nrowsA = m; ncolsA = k; nrowsV = n; } + if ( API_SUFFIX(LAPACKE_lsame)(side, 'l') ) { nrowsA = k; ncolsA = n; nrowsV = m; } + else if ( API_SUFFIX(LAPACKE_lsame)(side, 'r') ) { nrowsA = m; ncolsA = k; nrowsV = n; } else { info = -2; API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_ztpmqrt_work", info ); From a848e1e760c3f15f47a2919d541a3a1b08068fc3 Mon Sep 17 00:00:00 2001 From: "Lucas M. Schnorr" Date: Tue, 15 Oct 2024 10:10:37 -0300 Subject: [PATCH 2/2] fix environment variable name --- LAPACKE/src/lapacke_nancheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LAPACKE/src/lapacke_nancheck.c b/LAPACKE/src/lapacke_nancheck.c index 55b82e203e..c7d5c33f1c 100644 --- a/LAPACKE/src/lapacke_nancheck.c +++ b/LAPACKE/src/lapacke_nancheck.c @@ -47,7 +47,7 @@ int LAPACKE_get_nancheck( ) } /* Check environment variable, once and only once */ - env = getenv( "API_SUFFIX(LAPACKE_)NANCHECK" ); + env = getenv( "LAPACKE_NANCHECK" ); if ( !env ) { /* By default, NaN checking is enabled */ nancheck_flag = 1;