00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016
00017
00018 static doublereal c_b6 = 1.;
00019 static doublereal c_b7 = 0.;
00020
00021 int zlarcm_(integer *m, integer *n, doublereal *a, integer *
00022 lda, doublecomplex *b, integer *ldb, doublecomplex *c__, integer *ldc,
00023 doublereal *rwork)
00024 {
00025
00026 integer a_dim1, a_offset, b_dim1, b_offset, c_dim1, c_offset, i__1, i__2,
00027 i__3, i__4, i__5;
00028 doublereal d__1;
00029 doublecomplex z__1;
00030
00031
00032 double d_imag(doublecomplex *);
00033
00034
00035 integer i__, j, l;
00036 extern int dgemm_(char *, char *, integer *, integer *,
00037 integer *, doublereal *, doublereal *, integer *, doublereal *,
00038 integer *, doublereal *, doublereal *, integer *);
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
00099
00100
00101
00102
00103
00104
00105 a_dim1 = *lda;
00106 a_offset = 1 + a_dim1;
00107 a -= a_offset;
00108 b_dim1 = *ldb;
00109 b_offset = 1 + b_dim1;
00110 b -= b_offset;
00111 c_dim1 = *ldc;
00112 c_offset = 1 + c_dim1;
00113 c__ -= c_offset;
00114 --rwork;
00115
00116
00117 if (*m == 0 || *n == 0) {
00118 return 0;
00119 }
00120
00121 i__1 = *n;
00122 for (j = 1; j <= i__1; ++j) {
00123 i__2 = *m;
00124 for (i__ = 1; i__ <= i__2; ++i__) {
00125 i__3 = i__ + j * b_dim1;
00126 rwork[(j - 1) * *m + i__] = b[i__3].r;
00127
00128 }
00129
00130 }
00131
00132 l = *m * *n + 1;
00133 dgemm_("N", "N", m, n, m, &c_b6, &a[a_offset], lda, &rwork[1], m, &c_b7, &
00134 rwork[l], m);
00135 i__1 = *n;
00136 for (j = 1; j <= i__1; ++j) {
00137 i__2 = *m;
00138 for (i__ = 1; i__ <= i__2; ++i__) {
00139 i__3 = i__ + j * c_dim1;
00140 i__4 = l + (j - 1) * *m + i__ - 1;
00141 c__[i__3].r = rwork[i__4], c__[i__3].i = 0.;
00142
00143 }
00144
00145 }
00146
00147 i__1 = *n;
00148 for (j = 1; j <= i__1; ++j) {
00149 i__2 = *m;
00150 for (i__ = 1; i__ <= i__2; ++i__) {
00151 rwork[(j - 1) * *m + i__] = d_imag(&b[i__ + j * b_dim1]);
00152
00153 }
00154
00155 }
00156 dgemm_("N", "N", m, n, m, &c_b6, &a[a_offset], lda, &rwork[1], m, &c_b7, &
00157 rwork[l], m);
00158 i__1 = *n;
00159 for (j = 1; j <= i__1; ++j) {
00160 i__2 = *m;
00161 for (i__ = 1; i__ <= i__2; ++i__) {
00162 i__3 = i__ + j * c_dim1;
00163 i__4 = i__ + j * c_dim1;
00164 d__1 = c__[i__4].r;
00165 i__5 = l + (j - 1) * *m + i__ - 1;
00166 z__1.r = d__1, z__1.i = rwork[i__5];
00167 c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
00168
00169 }
00170
00171 }
00172
00173 return 0;
00174
00175
00176
00177 }