Fix function prototypes and INTERFACE64 support
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Tue, 12 Jul 2022 17:37:30 +0000 (19:37 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Jul 2022 17:37:30 +0000 (19:37 +0200)
12 files changed:
ctest/c_cblat1c.c
ctest/c_cblat2c.c
ctest/c_cblat3c.c
ctest/c_dblat1c.c
ctest/c_dblat2c.c
ctest/c_dblat3c.c
ctest/c_sblat1c.c
ctest/c_sblat2c.c
ctest/c_sblat3c.c
ctest/c_zblat1c.c
ctest/c_zblat2c.c
ctest/c_zblat3c.c

index 6949bfc..8c0dd14 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -379,6 +361,7 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
+#if 0
 static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
        integer n = *n_, incx = *incx_, incy = *incy_, i;
 #ifdef _MSC_VER
@@ -503,6 +486,7 @@ static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integ
        pCd(z) = zdotc;
 }
 #endif
+#endif
 
 /* Common Block Declarations */
 
@@ -588,7 +572,7 @@ static real c_b43 = (float)1.;
 /*     .. Common blocks .. */
 /*     .. Data statements .. */
 /*     .. Executable Statements .. */
-    printf("Test of subprogram number %3d         %15s\n", combla_1.icase, l[combla_1.icase - 1]);
+    printf("Test of subprogram number %3d         %15s", combla_1.icase, l[combla_1.icase - 1]);
     return 0;
 
 } /* header_ */
@@ -699,7 +683,7 @@ real *sfac;
 
     /* Local variables */
     static integer i__;
-    extern /* Subroutine */ int cscal_(), ctest_();
+    extern /* Subroutine */ int ctest_();
     static complex mwpcs[5], mwpct[5];
     extern /* Subroutine */ int itest1_(), stest1_();
     static complex cx[8];
index 1fda093..b7616b1 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,130 +360,6 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif 
-static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i]) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i]) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif
 /*  -- translated by f2c (version 20000121).
    You must link the resulting object file with the libraries:
        -lf2c -lm   (in that order)
@@ -673,7 +531,11 @@ static logical c_false = FALSE_;
     fgets(line,80,stdin);
     sscanf(line,"'%s'",snaps);
     fgets(line,80,stdin);
+#ifdef USE64BITINT
+    sscanf(line,"%ld",&ntra);
+#else
     sscanf(line,"%d",&ntra);
+#endif
     trace = ntra >= 0;
     if (trace) {
 /*     o__1.oerr = 0;
@@ -713,15 +575,24 @@ static logical c_false = FALSE_;
 
 /*     Values of N */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nidim);
+#else
    sscanf(line,"%d",&nidim);
+#endif
 
     if (nidim < 1 || nidim > 9) {
         fprintf(stderr,"NUMBER OF VALUES OF N IS LESS THAN 1 OR GREATER THAN 9");
         goto L230;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld %ld %ld",&idim[0],&idim[1],&idim[2],
+    &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d %d %d",&idim[0],&idim[1],&idim[2],
     &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#endif
     i__1 = nidim;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (idim[i__ - 1] < 0 || idim[i__ - 1] > 65) {
@@ -732,14 +603,22 @@ static logical c_false = FALSE_;
     }
 /*     Values of K */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nkb);
+#else
    sscanf(line,"%d",&nkb);
+#endif
 
     if (nkb < 1 || nkb > 7) {
         fprintf(stderr,"NUMBER OF VALUES OF K IS LESS THAN 1 OR GREATER THAN 7");
         goto L230;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld",&kb[0],&kb[1],&kb[2],&kb[3],&kb[4],&kb[5],&kb[6]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d",&kb[0],&kb[1],&kb[2],&kb[3],&kb[4],&kb[5],&kb[6]);
+#endif
     i__1 = nkb;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (kb[i__ - 1] < 0 ) {
@@ -750,7 +629,11 @@ static logical c_false = FALSE_;
     }
 /*     Values of INCX and INCY */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&ninc);
+#else
    sscanf(line,"%d",&ninc);
+#endif
 
     if (ninc < 1 || ninc > 7) {
         fprintf(stderr,"NUMBER OF VALUES OF INCX AND INCY IS LESS THAN 1 OR GREATER THAN 7");
@@ -758,7 +641,11 @@ static logical c_false = FALSE_;
     }
 
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld",&inc[0],&inc[1],&inc[2],&inc[3],&inc[4],&inc[5],&inc[6]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d",&inc[0],&inc[1],&inc[2],&inc[3],&inc[4],&inc[5],&inc[6]);
+#endif
     i__1 = ninc;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (inc[i__ - 1] == 0 || (i__2 = inc[i__ - 1], abs(i__2)) > 2) {
index 4bee17d..1f4b967 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,130 +360,6 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif 
-static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i]) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i]) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif
 /*  -- translated by f2c (version 20000121).
    You must link the resulting object file with the libraries:
        -lf2c -lm   (in that order)
@@ -661,7 +519,11 @@ int /* Main program */ main(void)
     fgets(line,80,stdin);
     sscanf(line,"'%s'",snaps);
     fgets(line,80,stdin);
+#ifdef USE64BITINT
+    sscanf(line,"%ld",&ntra);
+#else
     sscanf(line,"%d",&ntra);
+#endif
     trace = ntra >= 0;
     if (trace) {
 /*     o__1.oerr = 0;
@@ -698,15 +560,24 @@ int /* Main program */ main(void)
 
 /*     Values of N */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nidim);
+#else
    sscanf(line,"%d",&nidim);
+#endif
 
     if (nidim < 1 || nidim > 9) {
        fprintf(stderr,"NUMBER OF VALUES OF N IS LESS THAN 1 OR GREATER THAN 9");
        goto L220;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld %ld %ld",&idim[0],&idim[1],&idim[2],
+    &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d %d %d",&idim[0],&idim[1],&idim[2],
     &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#endif
     i__1 = nidim;
     for (i__ = 1; i__ <= i__1; ++i__) {
        if (idim[i__ - 1] < 0 || idim[i__ - 1] > 65) {
@@ -717,7 +588,11 @@ int /* Main program */ main(void)
     }
 /*     Values of ALPHA */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nalf);
+#else
    sscanf(line,"%d",&nalf);
+#endif
     if (nalf < 1 || nalf > 7) {
        fprintf(stderr,"VALUE OF ALPHA IS LESS THAN 0 OR GREATER THAN 7\n");
        goto L220;
@@ -732,7 +607,11 @@ int /* Main program */ main(void)
 //    }
 /*     Values of BETA */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nbet);
+#else
    sscanf(line,"%d",&nbet);
+#endif
     if (nalf < 1 || nbet > 7) {
        fprintf(stderr,"VALUE OF BETA IS LESS THAN 0 OR GREATER THAN 7\n");
        goto L220;
index b2efc23..bf2f7a7 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,130 +360,6 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif 
-static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i]) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i]) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif
 
 /* Common Block Declarations */
 
@@ -587,7 +445,7 @@ static doublereal c_b34 = 1.;
 /*     .. Common blocks .. */
 /*     .. Data statements .. */
 /*     .. Executable Statements .. */
-    printf("Test of subprogram number %3d         %15s\n", combla_1.icase, l[combla_1.icase -1]);
+    printf("Test of subprogram number %3d         %15s", combla_1.icase, l[combla_1.icase -1]);
     return 0;
 
 } /* header_ */
@@ -895,9 +753,9 @@ doublereal *sfac;
            ;
 
     /* Local variables */
-    extern /* Subroutine */ int drot_(), drottest_();
+    extern /* Subroutine */ int drottest_();
     static integer i__, k, ksize;
-    extern /* Subroutine */ int drotm_(), stest_(), drotmtest_();
+    extern /* Subroutine */int stest_(), drotmtest_();
     static integer ki, kn;
     static doublereal dparam[5], sx[10], sy[10], stx[10], sty[10];
 
@@ -1121,6 +979,7 @@ L40:
 
 } /* itest1_ */
 
+#if 0
 /* Subroutine */ int drot_(n, dx, incx, dy, incy, c__, s)
 integer *n;
 doublereal *dx;
@@ -1329,3 +1188,4 @@ doublereal *dparam;
     return 0;
 } /* drotm_ */
 
+#endif
\ No newline at end of file
index 7800c34..f94dbc1 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,130 +360,6 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif 
-static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i]) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i]) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif
 /*  -- translated by f2c (version 20000121).
    You must link the resulting object file with the libraries:
        -lf2c -lm   (in that order)
@@ -672,7 +530,11 @@ static logical c_false = FALSE_;
     fgets(line,80,stdin);
     sscanf(line,"'%s'",snaps);
     fgets(line,80,stdin);
+#ifdef USE64BITINT
+    sscanf(line,"%ld",&ntra);
+#else
     sscanf(line,"%d",&ntra);
+#endif
     trace = ntra >= 0;
 
     if (trace) {
@@ -713,15 +575,24 @@ static logical c_false = FALSE_;
 
 /*     Values of N */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nidim);
+#else
    sscanf(line,"%d",&nidim);
+#endif
 
     if (nidim < 1 || nidim > 9) {
         fprintf(stderr,"NUMBER OF VALUES OF N IS LESS THAN 1 OR GREATER THAN 9");
         goto L220;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld %ld %ld",&idim[0],&idim[1],&idim[2],
+    &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d %d %d",&idim[0],&idim[1],&idim[2],
     &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#endif
     i__1 = nidim;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (idim[i__ - 1] < 0 || idim[i__ - 1] > 65) {
@@ -732,14 +603,22 @@ static logical c_false = FALSE_;
     }
 /*     Values of K */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
    sscanf(line,"%d",&nkb);
+#else
+   sscanf(line,"%d",&nkb);
+#endif
 
     if (nkb < 1 || nkb > 7) {
         fprintf(stderr,"NUMBER OF VALUES OF K IS LESS THAN 1 OR GREATER THAN 7");
         goto L220;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld",&kb[0],&kb[1],&kb[2],&kb[3],&kb[4],&kb[5],&kb[6]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d",&kb[0],&kb[1],&kb[2],&kb[3],&kb[4],&kb[5],&kb[6]);
+#endif
     i__1 = nkb;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (kb[i__ - 1] < 0 ) {
@@ -750,7 +629,11 @@ static logical c_false = FALSE_;
     }
 /*     Values of INCX and INCY */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&ninc);
+#else
    sscanf(line,"%d",&ninc);
+#endif
 
     if (ninc < 1 || ninc > 7) {
         fprintf(stderr,"NUMBER OF VALUES OF INCX AND INCY IS LESS THAN 1 OR GREATER THAN 7");
@@ -758,7 +641,11 @@ static logical c_false = FALSE_;
     }
 
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld",&inc[0],&inc[1],&inc[2],&inc[3],&inc[4],&inc[5],&inc[6]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d",&inc[0],&inc[1],&inc[2],&inc[3],&inc[4],&inc[5],&inc[6]);
+#endif
     i__1 = ninc;
     for (i__ = 1; i__ <= i__1; ++i__) {
        if (inc[i__ - 1] == 0 || (i__2 = inc[i__ - 1], abs(i__2)) > 2) {
index 7575d8e..05d6b65 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,130 +360,6 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif 
-static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i]) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i]) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif
 /*  -- translated by f2c (version 20000121).
    You must link the resulting object file with the libraries:
        -lf2c -lm   (in that order)
@@ -646,7 +504,11 @@ static logical c_false = FALSE_;
     fgets(line,80,stdin);
     sscanf(line,"'%s'",snaps);
     fgets(line,80,stdin);
+#ifdef USE64BITINT
+    sscanf(line,"%ld",&ntra);
+#else
     sscanf(line,"%d",&ntra);
+#endif
     trace = ntra >= 0;
     if (trace) {
 /*     o__1.oerr = 0;
@@ -685,15 +547,24 @@ static logical c_false = FALSE_;
 
 /*     Values of N */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nidim);
+#else
    sscanf(line,"%d",&nidim);
+#endif
 
     if (nidim < 1 || nidim > 9) {
         fprintf(stderr,"NUMBER OF VALUES OF N IS LESS THAN 1 OR GREATER THAN 9");
         goto L220;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld %ld %ld",&idim[0],&idim[1],&idim[2],
+    &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d %d %d",&idim[0],&idim[1],&idim[2],
     &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#endif
     i__1 = nidim;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (idim[i__ - 1] < 0 || idim[i__ - 1] > 65) {
@@ -704,7 +575,11 @@ static logical c_false = FALSE_;
     }
 /*     Values of ALPHA */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nalf);
+#else
    sscanf(line,"%d",&nalf);
+#endif
     if (nalf < 1 || nalf > 7) {
         fprintf(stderr,"VALUE OF ALPHA IS LESS THAN 0 OR GREATER THAN 7\n");
         goto L220;
@@ -714,7 +589,11 @@ static logical c_false = FALSE_;
 
 /*     Values of BETA */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nbet);
+#else
    sscanf(line,"%d",&nbet);
+#endif
     if (nalf < 1 || nbet > 7) {
         fprintf(stderr,"VALUE OF BETA IS LESS THAN 0 OR GREATER THAN 7\n");
         goto L220;
index d6062b2..4993d31 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,6 +360,7 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
+#if 0
 static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
        integer n = *n_, incx = *incx_, incy = *incy_, i;
 #ifdef _MSC_VER
@@ -502,7 +485,7 @@ static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integ
        pCd(z) = zdotc;
 }
 #endif
-
+#endif
 
 
 /* Common Block Declarations */
@@ -867,7 +850,7 @@ real *sfac;
 
     /* Local variables */
     static integer lenx, leny;
-    extern doublereal sdottest_();
+    extern real sdottest_();
     static integer i__, j, ksize;
     extern /* Subroutine */ int stest_(), scopytest_(), sswaptest_(), 
            saxpytest_();
@@ -986,9 +969,9 @@ real *sfac;
            1.17 };
 
     /* Local variables */
-    extern /* Subroutine */ int srot_(), srottest_();
+    extern /* Subroutine */ srottest_();
     static integer i__, k, ksize;
-    extern /* Subroutine */ int stest_(), srotm_(), srotmtest_();
+    extern /* Subroutine */ int stest_(), srotmtest_();
     static integer ki, kn;
     static real sx[19], sy[19], sparam[5], stx[19], sty[19];
 
@@ -1211,7 +1194,7 @@ L40:
     return 0;
 
 } /* itest1_ */
-
+#if 0
 /* Subroutine */ int srot_(n, sx, incx, sy, incy, c__, s)
 integer *n;
 real *sx;
@@ -1418,3 +1401,4 @@ real *sparam;
     return 0;
 } /* srotm_ */
 
+#endif
index 7eac109..a646091 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,6 +360,7 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
+#if 0
 static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
        integer n = *n_, incx = *incx_, incy = *incy_, i;
 #ifdef _MSC_VER
@@ -502,6 +485,7 @@ static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integ
        pCd(z) = zdotc;
 }
 #endif
+#endif
 /*  -- translated by f2c (version 20000121).
    You must link the resulting object file with the libraries:
        -lf2c -lm   (in that order)
@@ -671,7 +655,11 @@ static logical c_false = FALSE_;
     fgets(line,80,stdin);
     sscanf(line,"'%s'",snaps);
     fgets(line,80,stdin);
+#ifdef USE64BITINT
+    sscanf(line,"%ld",&ntra);
+#else
     sscanf(line,"%d",&ntra);
+#endif
     trace = ntra >= 0;
 
     if (trace) {
@@ -712,15 +700,23 @@ static logical c_false = FALSE_;
 
 /*     Values of N */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nidim);
+#else
    sscanf(line,"%d",&nidim);
-
+#endif
     if (nidim < 1 || nidim > 9) {
         fprintf(stderr,"NUMBER OF VALUES OF N IS LESS THAN 1 OR GREATER THAN 9");
         goto L220;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld %ld %ld",&idim[0],&idim[1],&idim[2],
+    &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d %d %d",&idim[0],&idim[1],&idim[2],
     &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#endif
     i__1 = nidim;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (idim[i__ - 1] < 0 || idim[i__ - 1] > 65) {
@@ -731,14 +727,21 @@ static logical c_false = FALSE_;
     }
 /*     Values of K */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nkb);
+#else
    sscanf(line,"%d",&nkb);
-
+#endif
     if (nkb < 1 || nkb > 7) {
         fprintf(stderr,"NUMBER OF VALUES OF K IS LESS THAN 1 OR GREATER THAN 7");
         goto L220;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld",&kb[0],&kb[1],&kb[2],&kb[3],&kb[4],&kb[5],&kb[6]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d",&kb[0],&kb[1],&kb[2],&kb[3],&kb[4],&kb[5],&kb[6]);
+#endif
     i__1 = nkb;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (kb[i__ - 1] < 0 ) {
@@ -749,15 +752,22 @@ static logical c_false = FALSE_;
     }
 /*     Values of INCX and INCY */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&ninc);
+#else
    sscanf(line,"%d",&ninc);
-
+#endif
     if (ninc < 1 || ninc > 7) {
         fprintf(stderr,"NUMBER OF VALUES OF INCX AND INCY IS LESS THAN 1 OR GREATER THAN 7");
         goto L230;
     }
 
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld",&inc[0],&inc[1],&inc[2],&inc[3],&inc[4],&inc[5],&inc[6]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d",&inc[0],&inc[1],&inc[2],&inc[3],&inc[4],&inc[5],&inc[6]);
+#endif
     i__1 = ninc;
     for (i__ = 1; i__ <= i__1; ++i__) {
        if (inc[i__ - 1] == 0 || (i__2 = inc[i__ - 1], abs(i__2)) > 2) {
index 850b3fe..73897a8 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,130 +360,6 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif 
-static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i]) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i]) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif
 /*  -- translated by f2c (version 20000121).
    You must link the resulting object file with the libraries:
        -lf2c -lm   (in that order)
@@ -642,7 +500,11 @@ static logical c_false = FALSE_;
     fgets(line,80,stdin);
     sscanf(line,"'%s'",snaps);
     fgets(line,80,stdin);
+#ifdef USE64BITINT
+    sscanf(line,"%ld",&ntra);
+#else
     sscanf(line,"%d",&ntra);
+#endif
     trace = ntra >= 0;
     if (trace) {
 /*         OPEN( NTRA, FILE = SNAPS, STATUS = 'NEW' ) */
@@ -682,15 +544,24 @@ static logical c_false = FALSE_;
 
 /*     Values of N */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nidim);
+#else
    sscanf(line,"%d",&nidim);
+#endif
 
     if (nidim < 1 || nidim > 9) {
         fprintf(stderr,"NUMBER OF VALUES OF N IS LESS THAN 1 OR GREATER THAN 9");
         goto L220;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld %ld %ld",&idim[0],&idim[1],&idim[2],
+    &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d %d %d",&idim[0],&idim[1],&idim[2],
     &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#endif
     i__1 = nidim;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (idim[i__ - 1] < 0 || idim[i__ - 1] > 65) {
@@ -701,7 +572,11 @@ static logical c_false = FALSE_;
     }
 /*     Values of ALPHA */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nalf);
+#else
    sscanf(line,"%d",&nalf);
+#endif
     if (nalf < 1 || nalf > 7) {
         fprintf(stderr,"VALUE OF ALPHA IS LESS THAN 0 OR GREATER THAN 7\n");
         goto L220;
@@ -711,7 +586,11 @@ static logical c_false = FALSE_;
 
 /*     Values of BETA */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nbet);
+#else
    sscanf(line,"%d",&nbet);
+#endif
     if (nalf < 1 || nbet > 7) {
         fprintf(stderr,"VALUE OF BETA IS LESS THAN 0 OR GREATER THAN 7\n");
         goto L220;
index d6c723e..d5b0806 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,6 +360,7 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
+#if 0
 static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
        integer n = *n_, incx = *incx_, incy = *incy_, i;
 #ifdef _MSC_VER
@@ -502,6 +485,7 @@ static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integ
        pCd(z) = zdotc;
 }
 #endif
+#endif
 
 /* Common Block Declarations */
 
@@ -581,7 +565,7 @@ static doublereal c_b43 = 1.;
 /*     .. Common blocks .. */
 /*     .. Data statements .. */
 /*     .. Executable Statements .. */
-    printf("Test of subprogram number %3d         %15s\n", combla_1.icase, l[combla_1.icase-1]);
+    printf("Test of subprogram number %3d         %15s", combla_1.icase, l[combla_1.icase-1]);
     return 0;
 
 } /* header_ */
index 3635919..92f03a0 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,130 +360,6 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif 
-static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i]) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i]) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif
 /*  -- translated by f2c (version 20000121).
    You must link the resulting object file with the libraries:
        -lf2c -lm   (in that order)
@@ -674,7 +532,11 @@ static logical c_false = FALSE_;
     fgets(line,80,stdin);
     sscanf(line,"'%s'",snaps);
     fgets(line,80,stdin);
+#ifdef USE64BITINT
+    sscanf(line,"%ld",&ntra);
+#else
     sscanf(line,"%d",&ntra);
+#endif
     trace = ntra >= 0;
     if (trace) {
 /*     o__1.oerr = 0;
@@ -714,15 +576,24 @@ static logical c_false = FALSE_;
 
 /*     Values of N */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nidim);
+#else
    sscanf(line,"%d",&nidim);
+#endif
 
     if (nidim < 1 || nidim > 9) {
         fprintf(stderr,"NUMBER OF VALUES OF N IS LESS THAN 1 OR GREATER THAN 9");
         goto L230;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld %ld %ld",&idim[0],&idim[1],&idim[2],
+    &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d %d %d",&idim[0],&idim[1],&idim[2],
     &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#endif
     i__1 = nidim;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (idim[i__ - 1] < 0 || idim[i__ - 1] > 65) {
@@ -733,14 +604,22 @@ static logical c_false = FALSE_;
     }
 /*     Values of K */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nkb);
+#else
    sscanf(line,"%d",&nkb);
+#endif
 
     if (nkb < 1 || nkb > 7) {
         fprintf(stderr,"NUMBER OF VALUES OF K IS LESS THAN 1 OR GREATER THAN 7");
         goto L230;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld",&kb[0],&kb[1],&kb[2],&kb[3],&kb[4],&kb[5],&kb[6]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d",&kb[0],&kb[1],&kb[2],&kb[3],&kb[4],&kb[5],&kb[6]);
+#endif
     i__1 = nkb;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (kb[i__ - 1] < 0 ) {
@@ -751,7 +630,11 @@ static logical c_false = FALSE_;
     }
 /*     Values of INCX and INCY */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&ninc);
+#else
    sscanf(line,"%d",&ninc);
+#endif
 
     if (ninc < 1 || ninc > 7) {
         fprintf(stderr,"NUMBER OF VALUES OF INCX AND INCY IS LESS THAN 1 OR GREATER THAN 7");
@@ -759,7 +642,11 @@ static logical c_false = FALSE_;
     }
 
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld",&inc[0],&inc[1],&inc[2],&inc[3],&inc[4],&inc[5],&inc[6]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d",&inc[0],&inc[1],&inc[2],&inc[3],&inc[4],&inc[5],&inc[6]);
+#endif
     i__1 = ninc;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (inc[i__ - 1] == 0 || (i__2 = inc[i__ - 1], abs(i__2)) > 2) {
index c785d24..eca2c3f 100644 (file)
 #undef I
 #endif
 
-#if defined(_WIN64)
-typedef long long BLASLONG;
-typedef unsigned long long BLASULONG;
-#else
-typedef long BLASLONG;
-typedef unsigned long BLASULONG;
-#endif
-
-#ifdef LAPACK_ILP64
-typedef BLASLONG blasint;
-#if defined(_WIN64)
-#define blasabs(x) llabs(x)
-#else
-#define blasabs(x) labs(x)
-#endif
-#else
-typedef int blasint;
-#define blasabs(x) abs(x)
-#endif
+#include "common.h"
 
 typedef blasint integer;
 
@@ -378,131 +360,6 @@ static integer smaxloc_(float *w, integer s, integer e, integer *n)
        return mi-s+1;
 }
 #endif
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif 
-static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Fcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
-               }
-       }
-       pCf(z) = zdotc;
-}
-#else
-       _Complex float zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i]) * Cf(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
-               }
-       }
-       pCf(z) = zdotc;
-}
-#endif
-static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
-       integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
-       _Dcomplex zdotc = {0.0, 0.0};
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
-                       zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
-               }
-       }
-       pCd(z) = zdotc;
-}
-#else
-       _Complex double zdotc = 0.0;
-       if (incx == 1 && incy == 1) {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i]) * Cd(&y[i]);
-               }
-       } else {
-               for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
-                       zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
-               }
-       }
-       pCd(z) = zdotc;
-}
-#endif
-
 
 /* Common Block Declarations */
 
@@ -645,7 +502,11 @@ static logical c_false = FALSE_;
     fgets(line,80,stdin);
     sscanf(line,"'%s'",snaps);
     fgets(line,80,stdin);
+#ifdef USE64BITINT
+    sscanf(line,"%ld",&ntra);
+#else
     sscanf(line,"%d",&ntra);
+#endif
     trace = ntra >= 0;
     if (trace) {
 /*     o__1.oerr = 0;
@@ -684,15 +545,23 @@ static logical c_false = FALSE_;
 
 /*     Values of N */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
    sscanf(line,"%d",&nidim);
-
+#else
+   sscanf(line,"%d",&nidim);
+#endif
     if (nidim < 1 || nidim > 9) {
         fprintf(stderr,"NUMBER OF VALUES OF N IS LESS THAN 1 OR GREATER THAN 9");
         goto L220;
     }
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld %ld %ld %ld %ld %ld %ld %ld %ld",&idim[0],&idim[1],&idim[2],
+    &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#else
    sscanf(line,"%d %d %d %d %d %d %d %d %d",&idim[0],&idim[1],&idim[2],
     &idim[3],&idim[4],&idim[5],&idim[6],&idim[7],&idim[8]);
+#endif
     i__1 = nidim;
     for (i__ = 1; i__ <= i__1; ++i__) {
         if (idim[i__ - 1] < 0 || idim[i__ - 1] > 65) {
@@ -703,7 +572,11 @@ static logical c_false = FALSE_;
     }
 /*     Values of ALPHA */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nalf);
+#else
    sscanf(line,"%d",&nalf);
+#endif
     if (nalf < 1 || nalf > 7) {
         fprintf(stderr,"VALUE OF ALPHA IS LESS THAN 0 OR GREATER THAN 7\n");
         goto L220;
@@ -714,7 +587,11 @@ static logical c_false = FALSE_;
 
 /*     Values of BETA */
    fgets(line,80,stdin);
+#ifdef USE64BITINT
+   sscanf(line,"%ld",&nbet);
+#else
    sscanf(line,"%d",&nbet);
+#endif
     if (nalf < 1 || nbet > 7) {
         fprintf(stderr,"VALUE OF BETA IS LESS THAN 0 OR GREATER THAN 7\n");
         goto L220;