Skip to content

Commit

Permalink
Fix the logic of the first argument checking in xGSSVX.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyeli committed May 30, 2024
1 parent 86ea4b3 commit 22cfff4
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions EXAMPLE/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions SRC/cgssvx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
14 changes: 7 additions & 7 deletions SRC/dgssvx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
14 changes: 7 additions & 7 deletions SRC/sgssvx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
14 changes: 7 additions & 7 deletions SRC/zgssvx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 22cfff4

Please sign in to comment.