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 zla_porpvgrw__(char *uplo, integer *ncols, doublecomplex *a,
00017 integer *lda, doublecomplex *af, integer *ldaf, doublereal *work,
00018 ftnlen uplo_len)
00019 {
00020
00021 integer a_dim1, a_offset, af_dim1, af_offset, i__1, i__2, i__3;
00022 doublereal ret_val, d__1, d__2, d__3, d__4;
00023
00024
00025 double d_imag(doublecomplex *);
00026
00027
00028 integer i__, j;
00029 doublereal amax, umax;
00030 extern logical lsame_(char *, char *);
00031 logical upper;
00032 doublereal rpvgrw;
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
00098 a_dim1 = *lda;
00099 a_offset = 1 + a_dim1;
00100 a -= a_offset;
00101 af_dim1 = *ldaf;
00102 af_offset = 1 + af_dim1;
00103 af -= af_offset;
00104 --work;
00105
00106
00107 upper = lsame_("Upper", uplo);
00108
00109
00110
00111
00112
00113 rpvgrw = 1.;
00114 i__1 = *ncols << 1;
00115 for (i__ = 1; i__ <= i__1; ++i__) {
00116 work[i__] = 0.;
00117 }
00118
00119
00120
00121 if (upper) {
00122 i__1 = *ncols;
00123 for (j = 1; j <= i__1; ++j) {
00124 i__2 = j;
00125 for (i__ = 1; i__ <= i__2; ++i__) {
00126
00127 i__3 = i__ + j * a_dim1;
00128 d__3 = (d__1 = a[i__3].r, abs(d__1)) + (d__2 = d_imag(&a[i__
00129 + j * a_dim1]), abs(d__2)), d__4 = work[*ncols + j];
00130 work[*ncols + j] = max(d__3,d__4);
00131 }
00132 }
00133 } else {
00134 i__1 = *ncols;
00135 for (j = 1; j <= i__1; ++j) {
00136 i__2 = *ncols;
00137 for (i__ = j; i__ <= i__2; ++i__) {
00138
00139 i__3 = i__ + j * a_dim1;
00140 d__3 = (d__1 = a[i__3].r, abs(d__1)) + (d__2 = d_imag(&a[i__
00141 + j * a_dim1]), abs(d__2)), d__4 = work[*ncols + j];
00142 work[*ncols + j] = max(d__3,d__4);
00143 }
00144 }
00145 }
00146
00147
00148
00149
00150 if (lsame_("Upper", uplo)) {
00151 i__1 = *ncols;
00152 for (j = 1; j <= i__1; ++j) {
00153 i__2 = j;
00154 for (i__ = 1; i__ <= i__2; ++i__) {
00155
00156 i__3 = i__ + j * af_dim1;
00157 d__3 = (d__1 = af[i__3].r, abs(d__1)) + (d__2 = d_imag(&af[
00158 i__ + j * af_dim1]), abs(d__2)), d__4 = work[j];
00159 work[j] = max(d__3,d__4);
00160 }
00161 }
00162 } else {
00163 i__1 = *ncols;
00164 for (j = 1; j <= i__1; ++j) {
00165 i__2 = *ncols;
00166 for (i__ = j; i__ <= i__2; ++i__) {
00167
00168 i__3 = i__ + j * af_dim1;
00169 d__3 = (d__1 = af[i__3].r, abs(d__1)) + (d__2 = d_imag(&af[
00170 i__ + j * af_dim1]), abs(d__2)), d__4 = work[j];
00171 work[j] = max(d__3,d__4);
00172 }
00173 }
00174 }
00175
00176
00177
00178
00179
00180
00181
00182
00183 if (lsame_("Upper", uplo)) {
00184 i__1 = *ncols;
00185 for (i__ = 1; i__ <= i__1; ++i__) {
00186 umax = work[i__];
00187 amax = work[*ncols + i__];
00188 if (umax != 0.) {
00189
00190 d__1 = amax / umax;
00191 rpvgrw = min(d__1,rpvgrw);
00192 }
00193 }
00194 } else {
00195 i__1 = *ncols;
00196 for (i__ = 1; i__ <= i__1; ++i__) {
00197 umax = work[i__];
00198 amax = work[*ncols + i__];
00199 if (umax != 0.) {
00200
00201 d__1 = amax / umax;
00202 rpvgrw = min(d__1,rpvgrw);
00203 }
00204 }
00205 }
00206 ret_val = rpvgrw;
00207 return ret_val;
00208 }