From 22cfff4093782e430623adacf1698e1e4c0828b1 Mon Sep 17 00:00:00 2001 From: Sherry Li Date: Thu, 30 May 2024 12:49:23 -0700 Subject: [PATCH] Fix the logic of the first argument checking in xGSSVX. --- EXAMPLE/CMakeLists.txt | 6 +++--- SRC/cgssvx.c | 14 +++++++------- SRC/dgssvx.c | 14 +++++++------- SRC/sgssvx.c | 14 +++++++------- SRC/zgssvx.c | 14 +++++++------- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/EXAMPLE/CMakeLists.txt b/EXAMPLE/CMakeLists.txt index 28a2eb58..aec59398 100644 --- a/EXAMPLE/CMakeLists.txt +++ b/EXAMPLE/CMakeLists.txt @@ -17,21 +17,21 @@ add_custom_target(examples_double) add_dependencies(examples_double ditersol ditersol1 dlinsol dlinsol1) if(NOT MSVC OR (MSVC AND WinGetOpt_FOUND)) - add_dependencies(examples_complex + add_dependencies(examples_double dlinsolx dlinsolx1 dlinsolx2 dlinsolx3) endif() add_custom_target(examples_float) add_dependencies(examples_float sitersol sitersol1 slinsol slinsol1) if(NOT MSVC OR (MSVC AND WinGetOpt_FOUND)) - add_dependencies(examples_complex + add_dependencies(examples_float slinsolx slinsolx1 slinsolx2 slinsolx3) endif() add_custom_target(examples_doublecomplex) add_dependencies(examples_doublecomplex zitersol zitersol1 zlinsol zlinsol1) if(NOT MSVC OR (MSVC AND WinGetOpt_FOUND)) - add_dependencies(examples_complex + add_dependencies(examples_doublecomplex zlinsolx zlinsolx1 zlinsolx2 zlinsolx3) endif() add_dependencies(examples diff --git a/SRC/cgssvx.c b/SRC/cgssvx.c index e5d43e54..d86923bc 100644 --- a/SRC/cgssvx.c +++ b/SRC/cgssvx.c @@ -408,13 +408,13 @@ printf("dgssvx: Fact=%4d, Trans=%4d, equed=%c\n", #endif /* Test the input parameters */ - if (options->Fact != DOFACT && options->Fact != SamePattern && - options->Fact != SamePattern_SameRowPerm && - options->Fact != FACTORED && - options->Trans != NOTRANS && options->Trans != TRANS && - options->Trans != CONJ && - options->Equil != NO && options->Equil != YES) - *info = -1; + if ( (options->Fact != DOFACT && options->Fact != SamePattern && + options->Fact != SamePattern_SameRowPerm && + options->Fact != FACTORED) || + (options->Trans != NOTRANS && options->Trans != TRANS && + options->Trans != CONJ) || + (options->Equil != NO && options->Equil != YES) ) + *info = -1; else if ( A->nrow != A->ncol || A->nrow < 0 || (A->Stype != SLU_NC && A->Stype != SLU_NR) || A->Dtype != SLU_C || A->Mtype != SLU_GE ) diff --git a/SRC/dgssvx.c b/SRC/dgssvx.c index 2edce3c7..d840c209 100644 --- a/SRC/dgssvx.c +++ b/SRC/dgssvx.c @@ -408,13 +408,13 @@ printf("dgssvx: Fact=%4d, Trans=%4d, equed=%c\n", #endif /* Test the input parameters */ - if (options->Fact != DOFACT && options->Fact != SamePattern && - options->Fact != SamePattern_SameRowPerm && - options->Fact != FACTORED && - options->Trans != NOTRANS && options->Trans != TRANS && - options->Trans != CONJ && - options->Equil != NO && options->Equil != YES) - *info = -1; + if ( (options->Fact != DOFACT && options->Fact != SamePattern && + options->Fact != SamePattern_SameRowPerm && + options->Fact != FACTORED) || + (options->Trans != NOTRANS && options->Trans != TRANS && + options->Trans != CONJ) || + (options->Equil != NO && options->Equil != YES) ) + *info = -1; else if ( A->nrow != A->ncol || A->nrow < 0 || (A->Stype != SLU_NC && A->Stype != SLU_NR) || A->Dtype != SLU_D || A->Mtype != SLU_GE ) diff --git a/SRC/sgssvx.c b/SRC/sgssvx.c index 23c21f10..905b07ac 100644 --- a/SRC/sgssvx.c +++ b/SRC/sgssvx.c @@ -408,13 +408,13 @@ printf("dgssvx: Fact=%4d, Trans=%4d, equed=%c\n", #endif /* Test the input parameters */ - if (options->Fact != DOFACT && options->Fact != SamePattern && - options->Fact != SamePattern_SameRowPerm && - options->Fact != FACTORED && - options->Trans != NOTRANS && options->Trans != TRANS && - options->Trans != CONJ && - options->Equil != NO && options->Equil != YES) - *info = -1; + if ( (options->Fact != DOFACT && options->Fact != SamePattern && + options->Fact != SamePattern_SameRowPerm && + options->Fact != FACTORED) || + (options->Trans != NOTRANS && options->Trans != TRANS && + options->Trans != CONJ) || + (options->Equil != NO && options->Equil != YES) ) + *info = -1; else if ( A->nrow != A->ncol || A->nrow < 0 || (A->Stype != SLU_NC && A->Stype != SLU_NR) || A->Dtype != SLU_S || A->Mtype != SLU_GE ) diff --git a/SRC/zgssvx.c b/SRC/zgssvx.c index 3c57cbe0..9d2173ea 100644 --- a/SRC/zgssvx.c +++ b/SRC/zgssvx.c @@ -408,13 +408,13 @@ printf("dgssvx: Fact=%4d, Trans=%4d, equed=%c\n", #endif /* Test the input parameters */ - if (options->Fact != DOFACT && options->Fact != SamePattern && - options->Fact != SamePattern_SameRowPerm && - options->Fact != FACTORED && - options->Trans != NOTRANS && options->Trans != TRANS && - options->Trans != CONJ && - options->Equil != NO && options->Equil != YES) - *info = -1; + if ( (options->Fact != DOFACT && options->Fact != SamePattern && + options->Fact != SamePattern_SameRowPerm && + options->Fact != FACTORED) || + (options->Trans != NOTRANS && options->Trans != TRANS && + options->Trans != CONJ) || + (options->Equil != NO && options->Equil != YES) ) + *info = -1; else if ( A->nrow != A->ncol || A->nrow < 0 || (A->Stype != SLU_NC && A->Stype != SLU_NR) || A->Dtype != SLU_Z || A->Mtype != SLU_GE )