Skip to content

Commit

Permalink
Merge pull request #96 from gruenich/feature/testing-remove-f2c.h
Browse files Browse the repository at this point in the history
Remove f2c.h from TESTING
  • Loading branch information
xiaoyeli authored Jun 1, 2023
2 parents 35a459b + cc612e2 commit db157a0
Show file tree
Hide file tree
Showing 75 changed files with 906 additions and 1,058 deletions.
4 changes: 0 additions & 4 deletions TESTING/MATGEN/cdotc.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/* -- translated by f2c (version 19940927).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/

#include "f2c.h"

/* Complex */ void cdotc_(complex * ret_val, int *n, complex *cx, int
*incx, complex *cy, int *incy)
{
Expand Down
2 changes: 1 addition & 1 deletion TESTING/MATGEN/clacgv.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "f2c.h"
#include "../../SRC/slu_scomplex.h"

/* Subroutine */ int clacgv_slu(int *n, complex *x, int *incx)
{
Expand Down
51 changes: 25 additions & 26 deletions TESTING/MATGEN/clagge.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* -- translated by f2c (version 19940927).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
*/

#include "f2c.h"
#include "../../SRC/slu_scomplex.h"
#include "../../SRC/slu_sdefs.h"

/* Table of constant values */

Expand All @@ -13,12 +12,12 @@ static int c__3 = 3;
static int c__1 = 1;

/* Subroutine */ int clagge_slu(int *m, int *n, int *kl, int *ku,
real *d, complex *a, int *lda, int *iseed, complex *work,
float *d, complex *a, int *lda, int *iseed, complex *work,
int *info)
{
/* System generated locals */
int a_dim1, a_offset, i__1, i__2, i__3;
doublereal d__1;
double d__1;
complex q__1;

/* Builtin functions */
Expand All @@ -32,10 +31,10 @@ static int c__1 = 1;
cscal_(int *, complex *, complex *, int *), cgemv_(char *
, int *, int *, complex *, complex *, int *, complex *
, int *, complex *, complex *, int *);
extern real scnrm2_(int *, complex *, int *);
extern float scnrm2_(int *, complex *, int *);
static complex wa, wb;
extern /* Subroutine */ int clacgv_slu(int *, complex *, int *);
static real wn;
static float wn;
extern /* Subroutine */ int clarnv_slu(int *, int *, int *, complex *);
extern int input_error(char *, int *);
static complex tau;
Expand Down Expand Up @@ -119,7 +118,7 @@ static int c__1 = 1;
*info = -3;
} else if (*ku < 0 || *ku > *n - 1) {
*info = -4;
} else if (*lda < max(1,*m)) {
} else if (*lda < SUPERLU_MAX(1,*m)) {
*info = -7;
}
if (*info < 0) {
Expand All @@ -140,7 +139,7 @@ static int c__1 = 1;
}
/* L20: */
}
i__1 = min(*m,*n);
i__1 = SUPERLU_MIN(*m,*n);
for (i = 1; i <= i__1; ++i) {
i__2 = i + i * a_dim1;
i__3 = i;
Expand All @@ -150,7 +149,7 @@ static int c__1 = 1;

/* pre- and post-multiply A by random unitary matrices */

for (i = min(*m,*n); i >= 1; --i) {
for (i = SUPERLU_MIN(*m,*n); i >= 1; --i) {
if (i < *m) {

/* generate random reflection */
Expand Down Expand Up @@ -186,7 +185,7 @@ t */
c__1);
i__1 = *m - i + 1;
i__2 = *n - i + 1;
q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
q__1.r = -(double)tau.r, q__1.i = -(double)tau.i;
cgerc_(&i__1, &i__2, &q__1, &work[1], &c__1, &work[*m + 1], &c__1,
&a[i + i * a_dim1], lda);
}
Expand Down Expand Up @@ -224,7 +223,7 @@ ht */
lda, &work[1], &c__1, &c_b1, &work[*n + 1], &c__1);
i__1 = *m - i + 1;
i__2 = *n - i + 1;
q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
q__1.r = -(double)tau.r, q__1.i = -(double)tau.i;
cgerc_(&i__1, &i__2, &q__1, &work[*n + 1], &c__1, &work[1], &c__1,
&a[i + i * a_dim1], lda);
}
Expand All @@ -236,7 +235,7 @@ ht */
Computing MAX */
i__2 = *m - 1 - *kl, i__3 = *n - 1 - *ku;
i__1 = max(i__2,i__3);
i__1 = SUPERLU_MAX(i__2,i__3);
for (i = 1; i <= i__1; ++i) {
if (*kl <= *ku) {

Expand All @@ -245,7 +244,7 @@ L = 0)
Computing MIN */
i__2 = *m - 1 - *kl;
if (i <= min(i__2,*n)) {
if (i <= SUPERLU_MIN(i__2,*n)) {

/* generate reflection to annihilate A(kl+i+1:m,i
) */
Expand Down Expand Up @@ -282,17 +281,17 @@ eft */
c__1, &c_b1, &work[1], &c__1);
i__2 = *m - *kl - i + 1;
i__3 = *n - i;
q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
q__1.r = -(double)tau.r, q__1.i = -(double)tau.i;
cgerc_(&i__2, &i__3, &q__1, &a[*kl + i + i * a_dim1], &c__1, &
work[1], &c__1, &a[*kl + i + (i + 1) * a_dim1], lda);
i__2 = *kl + i + i * a_dim1;
q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
q__1.r = -(double)wa.r, q__1.i = -(double)wa.i;
a[i__2].r = q__1.r, a[i__2].i = q__1.i;
}

/* Computing MIN */
i__2 = *n - 1 - *ku;
if (i <= min(i__2,*m)) {
if (i <= SUPERLU_MIN(i__2,*m)) {

/* generate reflection to annihilate A(i,ku+i+1:n
) */
Expand Down Expand Up @@ -331,11 +330,11 @@ ight */
c_b1, &work[1], &c__1);
i__2 = *m - i;
i__3 = *n - *ku - i + 1;
q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
q__1.r = -(double)tau.r, q__1.i = -(double)tau.i;
cgerc_(&i__2, &i__3, &q__1, &work[1], &c__1, &a[i + (*ku + i)
* a_dim1], lda, &a[i + 1 + (*ku + i) * a_dim1], lda);
i__2 = i + (*ku + i) * a_dim1;
q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
q__1.r = -(double)wa.r, q__1.i = -(double)wa.i;
a[i__2].r = q__1.r, a[i__2].i = q__1.i;
}
} else {
Expand All @@ -346,7 +345,7 @@ ight */
Computing MIN */
i__2 = *n - 1 - *ku;
if (i <= min(i__2,*m)) {
if (i <= SUPERLU_MIN(i__2,*m)) {

/* generate reflection to annihilate A(i,ku+i+1:n
) */
Expand Down Expand Up @@ -385,17 +384,17 @@ ight */
c_b1, &work[1], &c__1);
i__2 = *m - i;
i__3 = *n - *ku - i + 1;
q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
q__1.r = -(double)tau.r, q__1.i = -(double)tau.i;
cgerc_(&i__2, &i__3, &q__1, &work[1], &c__1, &a[i + (*ku + i)
* a_dim1], lda, &a[i + 1 + (*ku + i) * a_dim1], lda);
i__2 = i + (*ku + i) * a_dim1;
q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
q__1.r = -(double)wa.r, q__1.i = -(double)wa.i;
a[i__2].r = q__1.r, a[i__2].i = q__1.i;
}

/* Computing MIN */
i__2 = *m - 1 - *kl;
if (i <= min(i__2,*n)) {
if (i <= SUPERLU_MIN(i__2,*n)) {

/* generate reflection to annihilate A(kl+i+1:m,i
) */
Expand Down Expand Up @@ -432,11 +431,11 @@ eft */
c__1, &c_b1, &work[1], &c__1);
i__2 = *m - *kl - i + 1;
i__3 = *n - i;
q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
q__1.r = -(double)tau.r, q__1.i = -(double)tau.i;
cgerc_(&i__2, &i__3, &q__1, &a[*kl + i + i * a_dim1], &c__1, &
work[1], &c__1, &a[*kl + i + (i + 1) * a_dim1], lda);
i__2 = *kl + i + i * a_dim1;
q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
q__1.r = -(double)wa.r, q__1.i = -(double)wa.i;
a[i__2].r = q__1.r, a[i__2].i = q__1.i;
}
}
Expand Down
19 changes: 9 additions & 10 deletions TESTING/MATGEN/claghe.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* -- translated by f2c (version 19940927).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/

#include "f2c.h"
#include "../../SRC/slu_scomplex.h"
#include "../../SRC/slu_sdefs.h"

/* Table of constant values */

Expand All @@ -12,12 +11,12 @@ static complex c_b2 = {1.f,0.f};
static int c__3 = 3;
static int c__1 = 1;

/* Subroutine */ int claghe_slu(int *n, int *k, real *d, complex *a,
/* Subroutine */ int claghe_slu(int *n, int *k, float *d, complex *a,
int *lda, int *iseed, complex *work, int *info)
{
/* System generated locals */
int a_dim1, a_offset, i__1, i__2, i__3;
doublereal d__1;
double d__1;
complex q__1, q__2, q__3, q__4;

/* Builtin functions */
Expand All @@ -41,9 +40,9 @@ static int c__1 = 1;
complex *, int *, complex *, int *, complex *, complex *,
int *), caxpy_(int *, complex *, complex *,
int *, complex *, int *);
extern real scnrm2_(int *, complex *, int *);
extern float scnrm2_(int *, complex *, int *);
static complex wa, wb;
static real wn;
static float wn;
extern /* Subroutine */ int clarnv_slu(int *, int *, int *, complex *);
extern int input_error(char *, int *);
static complex tau;
Expand Down Expand Up @@ -117,7 +116,7 @@ static int c__1 = 1;
*info = -1;
} else if (*k < 0 || *k > *n - 1) {
*info = -2;
} else if (*lda < max(1,*n)) {
} else if (*lda < SUPERLU_MAX(1,*n)) {
*info = -5;
}
if (*info < 0) {
Expand Down Expand Up @@ -242,7 +241,7 @@ static int c__1 = 1;
1], &c__1);
i__2 = *n - *k - i + 1;
i__3 = *k - 1;
q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
q__1.r = -(double)tau.r, q__1.i = -(double)tau.i;
cgerc_(&i__2, &i__3, &q__1, &a[*k + i + i * a_dim1], &c__1, &work[1],
&c__1, &a[*k + i + (i + 1) * a_dim1], lda);

Expand Down Expand Up @@ -277,7 +276,7 @@ ht
, &c__1, &a[*k + i + (*k + i) * a_dim1], lda);

i__2 = *k + i + i * a_dim1;
q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
q__1.r = -(double)wa.r, q__1.i = -(double)wa.i;
a[i__2].r = q__1.r, a[i__2].i = q__1.i;
i__2 = *n;
for (j = *k + i + 1; j <= i__2; ++j) {
Expand Down
19 changes: 9 additions & 10 deletions TESTING/MATGEN/clagsy.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* -- translated by f2c (version 19940927).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/

#include "f2c.h"
#include "../../SRC/slu_scomplex.h"
#include "../../SRC/slu_sdefs.h"

/* Table of constant values */

Expand All @@ -12,13 +11,13 @@ static complex c_b2 = {1.f,0.f};
static int c__3 = 3;
static int c__1 = 1;

/* Subroutine */ int clagsy_slu(int *n, int *k, real *d, complex *a,
/* Subroutine */ int clagsy_slu(int *n, int *k, float *d, complex *a,
int *lda, int *iseed, complex *work, int *info)
{
/* System generated locals */
int a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6, i__7, i__8,
i__9;
doublereal d__1;
double d__1;
complex q__1, q__2, q__3, q__4;

/* Builtin functions */
Expand All @@ -40,11 +39,11 @@ static int c__1 = 1;
int *, complex *, int *), csymv_sluslu(char *, int *,
complex *, complex *, int *, complex *, int *, complex *,
complex *, int *);
extern real scnrm2_(int *, complex *, int *);
extern float scnrm2_(int *, complex *, int *);
static int ii, jj;
static complex wa, wb;
extern /* Subroutine */ int clacgv_slu(int *, complex *, int *);
static real wn;
static float wn;
extern /* Subroutine */ int clarnv_slu(int *, int *, int *, complex *);
extern int input_error(char *, int *);
static complex tau;
Expand Down Expand Up @@ -117,7 +116,7 @@ static int c__1 = 1;
*info = -1;
} else if (*k < 0 || *k > *n - 1) {
*info = -2;
} else if (*lda < max(1,*n)) {
} else if (*lda < SUPERLU_MAX(1,*n)) {
*info = -5;
}
if (*info < 0) {
Expand Down Expand Up @@ -269,7 +268,7 @@ static int c__1 = 1;
1], &c__1);
i__2 = *n - *k - i + 1;
i__3 = *k - 1;
q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
q__1.r = -(double)tau.r, q__1.i = -(double)tau.i;
cgerc_(&i__2, &i__3, &q__1, &a[*k + i + i * a_dim1], &c__1, &work[1],
&c__1, &a[*k + i + (i + 1) * a_dim1], lda);

Expand Down Expand Up @@ -331,7 +330,7 @@ ht
}

i__2 = *k + i + i * a_dim1;
q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
q__1.r = -(double)wa.r, q__1.i = -(double)wa.i;
a[i__2].r = q__1.r, a[i__2].i = q__1.i;
i__2 = *n;
for (j = *k + i + 1; j <= i__2; ++j) {
Expand Down
17 changes: 8 additions & 9 deletions TESTING/MATGEN/clarge.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* -- translated by f2c (version 19940927).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/

#include "f2c.h"
#include "../../SRC/slu_scomplex.h"
#include "../../SRC/slu_sdefs.h"

/* Table of constant values */

Expand All @@ -17,7 +16,7 @@ static int c__1 = 1;
{
/* System generated locals */
int a_dim1, a_offset, i__1;
doublereal d__1;
double d__1;
complex q__1;

/* Builtin functions */
Expand All @@ -31,9 +30,9 @@ static int c__1 = 1;
cscal_(int *, complex *, complex *, int *), cgemv_(char *
, int *, int *, complex *, complex *, int *, complex *
, int *, complex *, complex *, int *);
extern real scnrm2_(int *, complex *, int *);
extern float scnrm2_(int *, complex *, int *);
static complex wa, wb;
static real wn;
static float wn;
extern /* Subroutine */ int clarnv_slu(int *, int *, int *, complex *);
extern int input_error(char *, int *);
static complex tau;
Expand Down Expand Up @@ -95,7 +94,7 @@ static int c__1 = 1;
*info = 0;
if (*n < 0) {
*info = -1;
} else if (*lda < max(1,*n)) {
} else if (*lda < SUPERLU_MAX(1,*n)) {
*info = -3;
}
if (*info < 0) {
Expand Down Expand Up @@ -137,7 +136,7 @@ static int c__1 = 1;
cgemv_("Conjugate transpose", &i__1, n, &c_b2, &a[i + a_dim1], lda, &
work[1], &c__1, &c_b1, &work[*n + 1], &c__1);
i__1 = *n - i + 1;
q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
q__1.r = -(double)tau.r, q__1.i = -(double)tau.i;
cgerc_(&i__1, n, &q__1, &work[1], &c__1, &work[*n + 1], &c__1, &a[i +
a_dim1], lda);

Expand All @@ -147,7 +146,7 @@ static int c__1 = 1;
cgemv_("No transpose", n, &i__1, &c_b2, &a[i * a_dim1 + 1], lda, &
work[1], &c__1, &c_b1, &work[*n + 1], &c__1);
i__1 = *n - i + 1;
q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
q__1.r = -(double)tau.r, q__1.i = -(double)tau.i;
cgerc_(n, &i__1, &q__1, &work[*n + 1], &c__1, &work[1], &c__1, &a[i *
a_dim1 + 1], lda);
/* L10: */
Expand Down
Loading

0 comments on commit db157a0

Please sign in to comment.