Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016 doublereal cla_porpvgrw__(char *uplo, integer *ncols, complex *a, integer *
00017 lda, complex *af, integer *ldaf, real *work, ftnlen uplo_len)
00018 {
00019
00020 integer a_dim1, a_offset, af_dim1, af_offset, i__1, i__2, i__3;
00021 real ret_val, r__1, r__2, r__3, r__4;
00022
00023
00024 double r_imag(complex *);
00025
00026
00027 integer i__, j;
00028 real amax, umax;
00029 extern logical lsame_(char *, char *);
00030 logical upper;
00031 real rpvgrw;
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097 a_dim1 = *lda;
00098 a_offset = 1 + a_dim1;
00099 a -= a_offset;
00100 af_dim1 = *ldaf;
00101 af_offset = 1 + af_dim1;
00102 af -= af_offset;
00103 --work;
00104
00105
00106 upper = lsame_("Upper", uplo);
00107
00108
00109
00110
00111
00112 rpvgrw = 1.f;
00113 i__1 = *ncols << 1;
00114 for (i__ = 1; i__ <= i__1; ++i__) {
00115 work[i__] = 0.f;
00116 }
00117
00118
00119
00120 if (upper) {
00121 i__1 = *ncols;
00122 for (j = 1; j <= i__1; ++j) {
00123 i__2 = j;
00124 for (i__ = 1; i__ <= i__2; ++i__) {
00125
00126 i__3 = i__ + j * a_dim1;
00127 r__3 = (r__1 = a[i__3].r, dabs(r__1)) + (r__2 = r_imag(&a[i__
00128 + j * a_dim1]), dabs(r__2)), r__4 = work[*ncols + j];
00129 work[*ncols + j] = dmax(r__3,r__4);
00130 }
00131 }
00132 } else {
00133 i__1 = *ncols;
00134 for (j = 1; j <= i__1; ++j) {
00135 i__2 = *ncols;
00136 for (i__ = j; i__ <= i__2; ++i__) {
00137
00138 i__3 = i__ + j * a_dim1;
00139 r__3 = (r__1 = a[i__3].r, dabs(r__1)) + (r__2 = r_imag(&a[i__
00140 + j * a_dim1]), dabs(r__2)), r__4 = work[*ncols + j];
00141 work[*ncols + j] = dmax(r__3,r__4);
00142 }
00143 }
00144 }
00145
00146
00147
00148
00149 if (lsame_("Upper", uplo)) {
00150 i__1 = *ncols;
00151 for (j = 1; j <= i__1; ++j) {
00152 i__2 = j;
00153 for (i__ = 1; i__ <= i__2; ++i__) {
00154
00155 i__3 = i__ + j * af_dim1;
00156 r__3 = (r__1 = af[i__3].r, dabs(r__1)) + (r__2 = r_imag(&af[
00157 i__ + j * af_dim1]), dabs(r__2)), r__4 = work[j];
00158 work[j] = dmax(r__3,r__4);
00159 }
00160 }
00161 } else {
00162 i__1 = *ncols;
00163 for (j = 1; j <= i__1; ++j) {
00164 i__2 = *ncols;
00165 for (i__ = j; i__ <= i__2; ++i__) {
00166
00167 i__3 = i__ + j * af_dim1;
00168 r__3 = (r__1 = af[i__3].r, dabs(r__1)) + (r__2 = r_imag(&af[
00169 i__ + j * af_dim1]), dabs(r__2)), r__4 = work[j];
00170 work[j] = dmax(r__3,r__4);
00171 }
00172 }
00173 }
00174
00175
00176
00177
00178
00179
00180
00181
00182 if (lsame_("Upper", uplo)) {
00183 i__1 = *ncols;
00184 for (i__ = 1; i__ <= i__1; ++i__) {
00185 umax = work[i__];
00186 amax = work[*ncols + i__];
00187 if (umax != 0.f) {
00188
00189 r__1 = amax / umax;
00190 rpvgrw = dmin(r__1,rpvgrw);
00191 }
00192 }
00193 } else {
00194 i__1 = *ncols;
00195 for (i__ = 1; i__ <= i__1; ++i__) {
00196 umax = work[i__];
00197 amax = work[*ncols + i__];
00198 if (umax != 0.f) {
00199
00200 r__1 = amax / umax;
00201 rpvgrw = dmin(r__1,rpvgrw);
00202 }
00203 }
00204 }
00205 ret_val = rpvgrw;
00206 return ret_val;
00207 }