diff --git a/EXAMPLE/clinsolx.c b/EXAMPLE/clinsolx.c index 4bbf367c..0cf5f763 100644 --- a/EXAMPLE/clinsolx.c +++ b/EXAMPLE/clinsolx.c @@ -26,9 +26,6 @@ at the top-level directory. #include #include "slu_cdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { char equed[1]; @@ -85,7 +82,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + cparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -205,35 +202,3 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } - -/*! - * \brief Parse command line inputs. - */ -void -parse_command_line(int argc, char *argv[], int_t *lwork, - float *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - - while ( (c = getopt(argc, argv, "hl:w:r:u:f:t:p:e:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/clinsolx1.c b/EXAMPLE/clinsolx1.c index 756d4a69..c1f5ab13 100644 --- a/EXAMPLE/clinsolx1.c +++ b/EXAMPLE/clinsolx1.c @@ -28,9 +28,6 @@ at the top-level directory. #include #include "slu_cdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { /*! @@ -96,7 +93,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + cparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -232,34 +229,4 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/*! - * \brief Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/clinsolx2.c b/EXAMPLE/clinsolx2.c index 763865b7..7b2dfedb 100644 --- a/EXAMPLE/clinsolx2.c +++ b/EXAMPLE/clinsolx2.c @@ -27,9 +27,6 @@ at the top-level directory. #include #include "slu_cdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { /*! @@ -95,7 +92,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + cparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -268,34 +265,3 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/*! - * \brief Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/clinsolx3.c b/EXAMPLE/clinsolx3.c index a95d138e..ac9d4f0e 100644 --- a/EXAMPLE/clinsolx3.c +++ b/EXAMPLE/clinsolx3.c @@ -28,9 +28,6 @@ at the top-level directory. #include #include "slu_cdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans); - /*! * \brief The driver program CLINSOLX3. * @@ -95,7 +92,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + cparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -265,34 +262,4 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/* - * Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/dlinsolx.c b/EXAMPLE/dlinsolx.c index 204471af..dccbeedf 100644 --- a/EXAMPLE/dlinsolx.c +++ b/EXAMPLE/dlinsolx.c @@ -26,9 +26,6 @@ at the top-level directory. #include #include "slu_ddefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { char equed[1]; @@ -85,7 +82,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + dparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -205,35 +202,3 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } - -/*! - * \brief Parse command line inputs. - */ -void -parse_command_line(int argc, char *argv[], int_t *lwork, - double *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - - while ( (c = getopt(argc, argv, "hl:w:r:u:f:t:p:e:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/dlinsolx1.c b/EXAMPLE/dlinsolx1.c index 48b43ac0..827658f6 100644 --- a/EXAMPLE/dlinsolx1.c +++ b/EXAMPLE/dlinsolx1.c @@ -28,9 +28,6 @@ at the top-level directory. #include #include "slu_ddefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { /*! @@ -96,7 +93,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + dparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -232,34 +229,4 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/*! - * \brief Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/dlinsolx2.c b/EXAMPLE/dlinsolx2.c index 9feedf9c..3c07efce 100644 --- a/EXAMPLE/dlinsolx2.c +++ b/EXAMPLE/dlinsolx2.c @@ -27,9 +27,6 @@ at the top-level directory. #include #include "slu_ddefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { /*! @@ -95,7 +92,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + dparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -268,34 +265,3 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/*! - * \brief Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/dlinsolx3.c b/EXAMPLE/dlinsolx3.c index 1bd90757..1cf11abb 100644 --- a/EXAMPLE/dlinsolx3.c +++ b/EXAMPLE/dlinsolx3.c @@ -28,9 +28,6 @@ at the top-level directory. #include #include "slu_ddefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans); - /*! * \brief The driver program DLINSOLX3. * @@ -95,7 +92,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + dparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -265,34 +262,4 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/* - * Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/slinsolx.c b/EXAMPLE/slinsolx.c index 6414564f..f40f22cc 100644 --- a/EXAMPLE/slinsolx.c +++ b/EXAMPLE/slinsolx.c @@ -26,9 +26,6 @@ at the top-level directory. #include #include "slu_sdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { char equed[1]; @@ -85,7 +82,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + sparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -205,35 +202,3 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } - -/*! - * \brief Parse command line inputs. - */ -void -parse_command_line(int argc, char *argv[], int_t *lwork, - float *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - - while ( (c = getopt(argc, argv, "hl:w:r:u:f:t:p:e:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/slinsolx1.c b/EXAMPLE/slinsolx1.c index 0d19e41e..7db4cdb0 100644 --- a/EXAMPLE/slinsolx1.c +++ b/EXAMPLE/slinsolx1.c @@ -28,9 +28,6 @@ at the top-level directory. #include #include "slu_sdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { /*! @@ -96,7 +93,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + sparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -232,34 +229,4 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/*! - * \brief Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/slinsolx2.c b/EXAMPLE/slinsolx2.c index 8ac3ff54..4a06f8e8 100644 --- a/EXAMPLE/slinsolx2.c +++ b/EXAMPLE/slinsolx2.c @@ -27,9 +27,6 @@ at the top-level directory. #include #include "slu_sdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { /*! @@ -95,7 +92,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + sparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -268,34 +265,3 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/*! - * \brief Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/slinsolx3.c b/EXAMPLE/slinsolx3.c index 77016db7..0daac8ee 100644 --- a/EXAMPLE/slinsolx3.c +++ b/EXAMPLE/slinsolx3.c @@ -28,9 +28,6 @@ at the top-level directory. #include #include "slu_sdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans); - /*! * \brief The driver program SLINSOLX3. * @@ -95,7 +92,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + sparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -265,34 +262,4 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/* - * Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - float *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/zlinsolx.c b/EXAMPLE/zlinsolx.c index 0536180a..a9e67ccc 100644 --- a/EXAMPLE/zlinsolx.c +++ b/EXAMPLE/zlinsolx.c @@ -26,9 +26,6 @@ at the top-level directory. #include #include "slu_zdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { char equed[1]; @@ -85,7 +82,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + zparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -205,35 +202,3 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } - -/*! - * \brief Parse command line inputs. - */ -void -parse_command_line(int argc, char *argv[], int_t *lwork, - double *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - - while ( (c = getopt(argc, argv, "hl:w:r:u:f:t:p:e:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/zlinsolx1.c b/EXAMPLE/zlinsolx1.c index 480af021..50e81420 100644 --- a/EXAMPLE/zlinsolx1.c +++ b/EXAMPLE/zlinsolx1.c @@ -28,9 +28,6 @@ at the top-level directory. #include #include "slu_zdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { /*! @@ -96,7 +93,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + zparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -232,34 +229,4 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/*! - * \brief Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/zlinsolx2.c b/EXAMPLE/zlinsolx2.c index c0040a44..71a13c64 100644 --- a/EXAMPLE/zlinsolx2.c +++ b/EXAMPLE/zlinsolx2.c @@ -27,9 +27,6 @@ at the top-level directory. #include #include "slu_zdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans); - int main(int argc, char *argv[]) { /*! @@ -95,7 +92,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + zparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -268,34 +265,3 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/*! - * \brief Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/EXAMPLE/zlinsolx3.c b/EXAMPLE/zlinsolx3.c index d4e9e291..ed458466 100644 --- a/EXAMPLE/zlinsolx3.c +++ b/EXAMPLE/zlinsolx3.c @@ -28,9 +28,6 @@ at the top-level directory. #include #include "slu_zdefs.h" -void parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans); - /*! * \brief The driver program ZLINSOLX3. * @@ -95,7 +92,7 @@ int main(int argc, char *argv[]) set_default_options(&options); /* Can use command line input to modify the defaults. */ - parse_command_line(argc, argv, &lwork, &u, &equil, &trans); + zparse_command_line(argc, argv, &lwork, &u, &equil, &trans); options.Equil = equil; options.DiagPivotThresh = u; options.Trans = trans; @@ -265,34 +262,4 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -/* - * Parse command line options to get relaxed snode size, panel size, etc. - */ -void -parse_command_line(int argc, char *argv[], int *lwork, - double *u, yes_no_t *equil, trans_t *trans ) -{ - int c; - extern char *optarg; - while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { - switch (c) { - case 'h': - printf("Options:\n"); - printf("\t-l - length of work[*] array\n"); - printf("\t-u - pivoting threshold\n"); - printf("\t-e <0 or 1> - equilibrate or not\n"); - printf("\t-t <0 or 1> - solve transposed system or not\n"); - exit(1); - break; - case 'l': *lwork = atoi(optarg); - break; - case 'u': *u = atof(optarg); - break; - case 'e': *equil = atoi(optarg); - break; - case 't': *trans = atoi(optarg); - break; - } - } -} diff --git a/SRC/cutil.c b/SRC/cutil.c index d5d3ca47..19269f00 100644 --- a/SRC/cutil.c +++ b/SRC/cutil.c @@ -33,6 +33,7 @@ at the top-level directory. #include +#include #include "slu_cdefs.h" void @@ -481,3 +482,35 @@ print_singlecomplex_vec(const char *what, int n, const singlecomplex *vec) for (i = 0; i < n; ++i) printf("%d\t%f%f\n", i, vec[i].r, vec[i].i); return 0; } + +/*! + * \brief Parse command line options to get relaxed snode size, panel size, etc. + */ +void +cparse_command_line(int argc, char *argv[], int_t *lwork, + float *u, yes_no_t *equil, trans_t *trans) +{ + int c; + extern char *optarg; + + while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { + switch (c) { + case 'h': + printf("Options:\n"); + printf("\t-l - length of work[*] array\n"); + printf("\t-u - pivoting threshold\n"); + printf("\t-e <0 or 1> - equilibrate or not\n"); + printf("\t-t <0 or 1> - solve transposed system or not\n"); + exit(1); + break; + case 'l': *lwork = atoi(optarg); + break; + case 'u': *u = atof(optarg); + break; + case 'e': *equil = atoi(optarg); + break; + case 't': *trans = atoi(optarg); + break; + } + } +} diff --git a/SRC/dutil.c b/SRC/dutil.c index 8430917c..055de147 100644 --- a/SRC/dutil.c +++ b/SRC/dutil.c @@ -33,6 +33,7 @@ at the top-level directory. #include +#include #include "slu_ddefs.h" void @@ -477,3 +478,35 @@ print_double_vec(const char *what, int n, const double *vec) for (i = 0; i < n; ++i) printf("%d\t%f\n", i, vec[i]); return 0; } + +/*! + * \brief Parse command line options to get relaxed snode size, panel size, etc. + */ +void +dparse_command_line(int argc, char *argv[], int_t *lwork, + double *u, yes_no_t *equil, trans_t *trans) +{ + int c; + extern char *optarg; + + while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { + switch (c) { + case 'h': + printf("Options:\n"); + printf("\t-l - length of work[*] array\n"); + printf("\t-u - pivoting threshold\n"); + printf("\t-e <0 or 1> - equilibrate or not\n"); + printf("\t-t <0 or 1> - solve transposed system or not\n"); + exit(1); + break; + case 'l': *lwork = atoi(optarg); + break; + case 'u': *u = atof(optarg); + break; + case 'e': *equil = atoi(optarg); + break; + case 't': *trans = atoi(optarg); + break; + } + } +} diff --git a/SRC/slu_cdefs.h b/SRC/slu_cdefs.h index 0e8e178f..6e947e30 100644 --- a/SRC/slu_cdefs.h +++ b/SRC/slu_cdefs.h @@ -252,6 +252,8 @@ extern void creadMM(FILE *, int *, int *, int_t *, singlecomplex **, int_t ** extern void cfill (singlecomplex *, int, singlecomplex); extern void cinf_norm_error (int, SuperMatrix *, singlecomplex *); extern float sqselect(int, float *, int); +extern void cparse_command_line(int argc, char *argv[], int_t *lwork, + float *u, yes_no_t *equil, trans_t *trans); /*! \brief Routines for debugging */ diff --git a/SRC/slu_ddefs.h b/SRC/slu_ddefs.h index ae506491..75f72177 100644 --- a/SRC/slu_ddefs.h +++ b/SRC/slu_ddefs.h @@ -249,6 +249,8 @@ extern void dreadMM(FILE *, int *, int *, int_t *, double **, int_t **, int_t extern void dfill (double *, int, double); extern void dinf_norm_error (int, SuperMatrix *, double *); extern double dqselect(int, double *, int); +extern void dparse_command_line(int argc, char *argv[], int_t *lwork, + double *u, yes_no_t *equil, trans_t *trans); /*! \brief Routines for debugging */ diff --git a/SRC/slu_sdefs.h b/SRC/slu_sdefs.h index f56f2155..85932468 100644 --- a/SRC/slu_sdefs.h +++ b/SRC/slu_sdefs.h @@ -249,6 +249,8 @@ extern void sreadMM(FILE *, int *, int *, int_t *, float **, int_t **, int_t extern void sfill (float *, int, float); extern void sinf_norm_error (int, SuperMatrix *, float *); extern float sqselect(int, float *, int); +extern void sparse_command_line(int argc, char *argv[], int_t *lwork, + float *u, yes_no_t *equil, trans_t *trans); /*! \brief Routines for debugging */ diff --git a/SRC/slu_util.h b/SRC/slu_util.h index de20eb95..e1b0895e 100644 --- a/SRC/slu_util.h +++ b/SRC/slu_util.h @@ -24,6 +24,7 @@ at the top-level directory. #include #include #include + /* #ifndef __STDC__ #include diff --git a/SRC/slu_zdefs.h b/SRC/slu_zdefs.h index 5dfe63e7..20c542e3 100644 --- a/SRC/slu_zdefs.h +++ b/SRC/slu_zdefs.h @@ -252,6 +252,8 @@ extern void zreadMM(FILE *, int *, int *, int_t *, doublecomplex **, int_t ** extern void zfill (doublecomplex *, int, doublecomplex); extern void zinf_norm_error (int, SuperMatrix *, doublecomplex *); extern double dqselect(int, double *, int); +extern void zparse_command_line(int argc, char *argv[], int_t *lwork, + double *u, yes_no_t *equil, trans_t *trans); /*! \brief Routines for debugging */ diff --git a/SRC/sutil.c b/SRC/sutil.c index dc077ec0..62df4464 100644 --- a/SRC/sutil.c +++ b/SRC/sutil.c @@ -33,6 +33,7 @@ at the top-level directory. #include +#include #include "slu_sdefs.h" void @@ -477,3 +478,35 @@ print_float_vec(const char *what, int n, const float *vec) for (i = 0; i < n; ++i) printf("%d\t%f\n", i, vec[i]); return 0; } + +/*! + * \brief Parse command line options to get relaxed snode size, panel size, etc. + */ +void +sparse_command_line(int argc, char *argv[], int_t *lwork, + float *u, yes_no_t *equil, trans_t *trans) +{ + int c; + extern char *optarg; + + while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { + switch (c) { + case 'h': + printf("Options:\n"); + printf("\t-l - length of work[*] array\n"); + printf("\t-u - pivoting threshold\n"); + printf("\t-e <0 or 1> - equilibrate or not\n"); + printf("\t-t <0 or 1> - solve transposed system or not\n"); + exit(1); + break; + case 'l': *lwork = atoi(optarg); + break; + case 'u': *u = atof(optarg); + break; + case 'e': *equil = atoi(optarg); + break; + case 't': *trans = atoi(optarg); + break; + } + } +} diff --git a/SRC/util.c b/SRC/util.c index 00c94c23..4c60154e 100644 --- a/SRC/util.c +++ b/SRC/util.c @@ -618,3 +618,4 @@ void check_perm(const char *what, int n, const int *perm) SUPERLU_FREE(marker); printf("check_perm: %s: n %d\n", what, n); } + diff --git a/SRC/zutil.c b/SRC/zutil.c index dcc7c164..d294db5f 100644 --- a/SRC/zutil.c +++ b/SRC/zutil.c @@ -33,6 +33,7 @@ at the top-level directory. #include +#include #include "slu_zdefs.h" void @@ -481,3 +482,35 @@ print_doublecomplex_vec(const char *what, int n, const doublecomplex *vec) for (i = 0; i < n; ++i) printf("%d\t%f%f\n", i, vec[i].r, vec[i].i); return 0; } + +/*! + * \brief Parse command line options to get relaxed snode size, panel size, etc. + */ +void +zparse_command_line(int argc, char *argv[], int_t *lwork, + double *u, yes_no_t *equil, trans_t *trans) +{ + int c; + extern char *optarg; + + while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) { + switch (c) { + case 'h': + printf("Options:\n"); + printf("\t-l - length of work[*] array\n"); + printf("\t-u - pivoting threshold\n"); + printf("\t-e <0 or 1> - equilibrate or not\n"); + printf("\t-t <0 or 1> - solve transposed system or not\n"); + exit(1); + break; + case 'l': *lwork = atoi(optarg); + break; + case 'u': *u = atof(optarg); + break; + case 'e': *equil = atoi(optarg); + break; + case 't': *trans = atoi(optarg); + break; + } + } +} diff --git a/TESTING/cdrive.c b/TESTING/cdrive.c index 137a7470..0c7debfc 100644 --- a/TESTING/cdrive.c +++ b/TESTING/cdrive.c @@ -41,7 +41,7 @@ at the top-level directory. #define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n" static void -parse_command_line(int argc, char *argv[], char *matrix_type, +get_command_line_options(int argc, char *argv[], char *matrix_type, int *n, int *w, int *relax, int *nrhs, int *maxsuper, int *rowblk, int *colblk, int_t *lwork, double *u, FILE **fp); @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) relax = sp_ienv(2); u = 1.0; strcpy(matrix_type, "LA"); - parse_command_line(argc, argv, matrix_type, &n, + get_command_line_options(argc, argv, matrix_type, &n, &panel_size, &relax, &nrhs, &maxsuper, &rowblk, &colblk, &lwork, &u, &fp); if ( lwork > 0 ) { @@ -529,7 +529,7 @@ int main(int argc, char *argv[]) * Parse command line options to get relaxed snode size, panel size, etc. */ static void -parse_command_line(int argc, char *argv[], char *matrix_type, +get_command_line_options(int argc, char *argv[], char *matrix_type, int *n, int *w, int *relax, int *nrhs, int *maxsuper, int *rowblk, int *colblk, int_t *lwork, double *u, FILE **fp) { diff --git a/TESTING/ddrive.c b/TESTING/ddrive.c index 0c71fe63..36bcfe27 100644 --- a/TESTING/ddrive.c +++ b/TESTING/ddrive.c @@ -41,7 +41,7 @@ at the top-level directory. #define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n" static void -parse_command_line(int argc, char *argv[], char *matrix_type, +get_command_line_options(int argc, char *argv[], char *matrix_type, int *n, int *w, int *relax, int *nrhs, int *maxsuper, int *rowblk, int *colblk, int_t *lwork, double *u, FILE **fp); @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) relax = sp_ienv(2); u = 1.0; strcpy(matrix_type, "LA"); - parse_command_line(argc, argv, matrix_type, &n, + get_command_line_options(argc, argv, matrix_type, &n, &panel_size, &relax, &nrhs, &maxsuper, &rowblk, &colblk, &lwork, &u, &fp); if ( lwork > 0 ) { @@ -529,7 +529,7 @@ int main(int argc, char *argv[]) * Parse command line options to get relaxed snode size, panel size, etc. */ static void -parse_command_line(int argc, char *argv[], char *matrix_type, +get_command_line_options(int argc, char *argv[], char *matrix_type, int *n, int *w, int *relax, int *nrhs, int *maxsuper, int *rowblk, int *colblk, int_t *lwork, double *u, FILE **fp) { diff --git a/TESTING/sdrive.c b/TESTING/sdrive.c index 208088f1..d184b52c 100644 --- a/TESTING/sdrive.c +++ b/TESTING/sdrive.c @@ -41,7 +41,7 @@ at the top-level directory. #define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n" static void -parse_command_line(int argc, char *argv[], char *matrix_type, +get_command_line_options(int argc, char *argv[], char *matrix_type, int *n, int *w, int *relax, int *nrhs, int *maxsuper, int *rowblk, int *colblk, int_t *lwork, double *u, FILE **fp); @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) relax = sp_ienv(2); u = 1.0; strcpy(matrix_type, "LA"); - parse_command_line(argc, argv, matrix_type, &n, + get_command_line_options(argc, argv, matrix_type, &n, &panel_size, &relax, &nrhs, &maxsuper, &rowblk, &colblk, &lwork, &u, &fp); if ( lwork > 0 ) { @@ -529,7 +529,7 @@ int main(int argc, char *argv[]) * Parse command line options to get relaxed snode size, panel size, etc. */ static void -parse_command_line(int argc, char *argv[], char *matrix_type, +get_command_line_options(int argc, char *argv[], char *matrix_type, int *n, int *w, int *relax, int *nrhs, int *maxsuper, int *rowblk, int *colblk, int_t *lwork, double *u, FILE **fp) { diff --git a/TESTING/zdrive.c b/TESTING/zdrive.c index 50b7ecdc..5e7514f8 100644 --- a/TESTING/zdrive.c +++ b/TESTING/zdrive.c @@ -41,7 +41,7 @@ at the top-level directory. #define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n" static void -parse_command_line(int argc, char *argv[], char *matrix_type, +get_command_line_options(int argc, char *argv[], char *matrix_type, int *n, int *w, int *relax, int *nrhs, int *maxsuper, int *rowblk, int *colblk, int_t *lwork, double *u, FILE **fp); @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) relax = sp_ienv(2); u = 1.0; strcpy(matrix_type, "LA"); - parse_command_line(argc, argv, matrix_type, &n, + get_command_line_options(argc, argv, matrix_type, &n, &panel_size, &relax, &nrhs, &maxsuper, &rowblk, &colblk, &lwork, &u, &fp); if ( lwork > 0 ) { @@ -529,7 +529,7 @@ int main(int argc, char *argv[]) * Parse command line options to get relaxed snode size, panel size, etc. */ static void -parse_command_line(int argc, char *argv[], char *matrix_type, +get_command_line_options(int argc, char *argv[], char *matrix_type, int *n, int *w, int *relax, int *nrhs, int *maxsuper, int *rowblk, int *colblk, int_t *lwork, double *u, FILE **fp) {