50 integer ch_dim1, ch_dim2, ch_dim3, ch_offset, cc_dim1, cc_dim2, cc_dim3,
51 cc_offset, cc1_dim1, cc1_dim2, cc1_offset, ch1_dim1, ch1_dim2,
52 ch1_offset, wa_dim1, wa_dim2, wa_offset, i__1, i__2, i__3;
55 integer i__, j, k, l, jc, lc, ki;
66 wa_offset = 1 + wa_dim1 * (1 + wa_dim2);
70 cc1_offset = 1 + cc1_dim1 * (1 + cc1_dim2);
75 cc_offset = 1 + cc_dim1 * (1 + cc_dim2 * (1 + cc_dim3));
79 ch1_offset = 1 + ch1_dim1 * (1 + ch1_dim2);
84 ch_offset = 1 + ch_dim1 * (1 + ch_dim2 * (1 + ch_dim3));
91 for (ki = 1; ki <= i__1; ++ki) {
92 ch1[(ki + ch1_dim2) * ch1_dim1 + 1] = cc1[(ki + cc1_dim2) * cc1_dim1
94 ch1[(ki + ch1_dim2) * ch1_dim1 + 2] = cc1[(ki + cc1_dim2) * cc1_dim1
99 for (j = 2; j <= i__1; ++j) {
102 for (ki = 1; ki <= i__2; ++ki) {
103 ch1[(ki + j * ch1_dim2) * ch1_dim1 + 1] = cc1[(ki + j * cc1_dim2)
104 * cc1_dim1 + 1] + cc1[(ki + jc * cc1_dim2) * cc1_dim1 + 1]
106 ch1[(ki + jc * ch1_dim2) * ch1_dim1 + 1] = cc1[(ki + j * cc1_dim2)
107 * cc1_dim1 + 1] - cc1[(ki + jc * cc1_dim2) * cc1_dim1 +
109 ch1[(ki + j * ch1_dim2) * ch1_dim1 + 2] = cc1[(ki + j * cc1_dim2)
110 * cc1_dim1 + 2] + cc1[(ki + jc * cc1_dim2) * cc1_dim1 + 2]
112 ch1[(ki + jc * ch1_dim2) * ch1_dim1 + 2] = cc1[(ki + j * cc1_dim2)
113 * cc1_dim1 + 2] - cc1[(ki + jc * cc1_dim2) * cc1_dim1 +
120 for (j = 2; j <= i__1; ++j) {
122 for (ki = 1; ki <= i__2; ++ki) {
123 cc1[(ki + cc1_dim2) * cc1_dim1 + 1] += ch1[(ki + j * ch1_dim2) *
125 cc1[(ki + cc1_dim2) * cc1_dim1 + 2] += ch1[(ki + j * ch1_dim2) *
132 for (l = 2; l <= i__1; ++l) {
135 for (ki = 1; ki <= i__2; ++ki) {
136 cc1[(ki + l * cc1_dim2) * cc1_dim1 + 1] = ch1[(ki + ch1_dim2) *
137 ch1_dim1 + 1] + wa[(l - 1 + wa_dim2) * wa_dim1 + 1] * ch1[
138 (ki + (ch1_dim2 << 1)) * ch1_dim1 + 1];
139 cc1[(ki + lc * cc1_dim2) * cc1_dim1 + 1] = -wa[(l - 1 + (wa_dim2
140 << 1)) * wa_dim1 + 1] * ch1[(ki + *ip * ch1_dim2) *
142 cc1[(ki + l * cc1_dim2) * cc1_dim1 + 2] = ch1[(ki + ch1_dim2) *
143 ch1_dim1 + 2] + wa[(l - 1 + wa_dim2) * wa_dim1 + 1] * ch1[
144 (ki + (ch1_dim2 << 1)) * ch1_dim1 + 2];
145 cc1[(ki + lc * cc1_dim2) * cc1_dim1 + 2] = -wa[(l - 1 + (wa_dim2
146 << 1)) * wa_dim1 + 1] * ch1[(ki + *ip * ch1_dim2) *
151 for (j = 3; j <= i__2; ++j) {
153 idlj = (l - 1) * (j - 1) % *ip;
154 war = wa[(idlj + wa_dim2) * wa_dim1 + 1];
155 wai = -wa[(idlj + (wa_dim2 << 1)) * wa_dim1 + 1];
157 for (ki = 1; ki <= i__3; ++ki) {
158 cc1[(ki + l * cc1_dim2) * cc1_dim1 + 1] += war * ch1[(ki + j *
159 ch1_dim2) * ch1_dim1 + 1];
160 cc1[(ki + lc * cc1_dim2) * cc1_dim1 + 1] += wai * ch1[(ki +
161 jc * ch1_dim2) * ch1_dim1 + 1];
162 cc1[(ki + l * cc1_dim2) * cc1_dim1 + 2] += war * ch1[(ki + j *
163 ch1_dim2) * ch1_dim1 + 2];
164 cc1[(ki + lc * cc1_dim2) * cc1_dim1 + 2] += wai * ch1[(ki +
165 jc * ch1_dim2) * ch1_dim1 + 2];
180 for (ki = 1; ki <= i__1; ++ki) {
181 cc1[(ki + cc1_dim2) * cc1_dim1 + 1] = sn * cc1[(ki + cc1_dim2) *
183 cc1[(ki + cc1_dim2) * cc1_dim1 + 2] = sn * cc1[(ki + cc1_dim2) *
188 for (j = 2; j <= i__1; ++j) {
191 for (ki = 1; ki <= i__2; ++ki) {
192 chold1 = sn * (cc1[(ki + j * cc1_dim2) * cc1_dim1 + 1] - cc1[(ki
193 + jc * cc1_dim2) * cc1_dim1 + 2]);
194 chold2 = sn * (cc1[(ki + j * cc1_dim2) * cc1_dim1 + 1] + cc1[(ki
195 + jc * cc1_dim2) * cc1_dim1 + 2]);
196 cc1[(ki + j * cc1_dim2) * cc1_dim1 + 1] = chold1;
197 cc1[(ki + jc * cc1_dim2) * cc1_dim1 + 2] = sn * (cc1[(ki + j *
198 cc1_dim2) * cc1_dim1 + 2] - cc1[(ki + jc * cc1_dim2) *
200 cc1[(ki + j * cc1_dim2) * cc1_dim1 + 2] = sn * (cc1[(ki + j *
201 cc1_dim2) * cc1_dim1 + 2] + cc1[(ki + jc * cc1_dim2) *
203 cc1[(ki + jc * cc1_dim2) * cc1_dim1 + 1] = chold2;
211 for (ki = 1; ki <= i__1; ++ki) {
212 ch1[(ki + ch1_dim2) * ch1_dim1 + 1] = sn * cc1[(ki + cc1_dim2) *
214 ch1[(ki + ch1_dim2) * ch1_dim1 + 2] = sn * cc1[(ki + cc1_dim2) *
219 for (j = 2; j <= i__1; ++j) {
222 for (ki = 1; ki <= i__2; ++ki) {
223 ch1[(ki + j * ch1_dim2) * ch1_dim1 + 1] = sn * (cc1[(ki + j *
224 cc1_dim2) * cc1_dim1 + 1] - cc1[(ki + jc * cc1_dim2) *
226 ch1[(ki + j * ch1_dim2) * ch1_dim1 + 2] = sn * (cc1[(ki + j *
227 cc1_dim2) * cc1_dim1 + 2] + cc1[(ki + jc * cc1_dim2) *
229 ch1[(ki + jc * ch1_dim2) * ch1_dim1 + 1] = sn * (cc1[(ki + j *
230 cc1_dim2) * cc1_dim1 + 1] + cc1[(ki + jc * cc1_dim2) *
232 ch1[(ki + jc * ch1_dim2) * ch1_dim1 + 2] = sn * (cc1[(ki + j *
233 cc1_dim2) * cc1_dim1 + 2] - cc1[(ki + jc * cc1_dim2) *
242 for (ki = 1; ki <= i__1; ++ki) {
243 ch1[(ki + ch1_dim2) * ch1_dim1 + 1] = cc1[(ki + cc1_dim2) * cc1_dim1
245 ch1[(ki + ch1_dim2) * ch1_dim1 + 2] = cc1[(ki + cc1_dim2) * cc1_dim1
250 for (j = 2; j <= i__1; ++j) {
253 for (ki = 1; ki <= i__2; ++ki) {
254 ch1[(ki + j * ch1_dim2) * ch1_dim1 + 1] = cc1[(ki + j * cc1_dim2)
255 * cc1_dim1 + 1] - cc1[(ki + jc * cc1_dim2) * cc1_dim1 + 2]
257 ch1[(ki + j * ch1_dim2) * ch1_dim1 + 2] = cc1[(ki + j * cc1_dim2)
258 * cc1_dim1 + 2] + cc1[(ki + jc * cc1_dim2) * cc1_dim1 + 1]
260 ch1[(ki + jc * ch1_dim2) * ch1_dim1 + 1] = cc1[(ki + j * cc1_dim2)
261 * cc1_dim1 + 1] + cc1[(ki + jc * cc1_dim2) * cc1_dim1 +
263 ch1[(ki + jc * ch1_dim2) * ch1_dim1 + 2] = cc1[(ki + j * cc1_dim2)
264 * cc1_dim1 + 2] - cc1[(ki + jc * cc1_dim2) * cc1_dim1 +
271 for (i__ = 1; i__ <= i__1; ++i__) {
273 for (k = 1; k <= i__2; ++k) {
274 cc[(k + (i__ * cc_dim3 + 1) * cc_dim2) * cc_dim1 + 1] = ch[(k + (
275 i__ + ch_dim3) * ch_dim2) * ch_dim1 + 1];
276 cc[(k + (i__ * cc_dim3 + 1) * cc_dim2) * cc_dim1 + 2] = ch[(k + (
277 i__ + ch_dim3) * ch_dim2) * ch_dim1 + 2];
283 for (j = 2; j <= i__1; ++j) {
285 for (k = 1; k <= i__2; ++k) {
286 cc[(k + (j + cc_dim3) * cc_dim2) * cc_dim1 + 1] = ch[(k + (j *
287 ch_dim3 + 1) * ch_dim2) * ch_dim1 + 1];
288 cc[(k + (j + cc_dim3) * cc_dim2) * cc_dim1 + 2] = ch[(k + (j *
289 ch_dim3 + 1) * ch_dim2) * ch_dim1 + 2];
295 for (j = 2; j <= i__1; ++j) {
297 for (i__ = 2; i__ <= i__2; ++i__) {
299 for (k = 1; k <= i__3; ++k) {
300 cc[(k + (j + i__ * cc_dim3) * cc_dim2) * cc_dim1 + 1] = wa[
301 i__ + (j - 1 + wa_dim2) * wa_dim1] * ch[(k + (i__ + j
302 * ch_dim3) * ch_dim2) * ch_dim1 + 1] + wa[i__ + (j -
303 1 + (wa_dim2 << 1)) * wa_dim1] * ch[(k + (i__ + j *
304 ch_dim3) * ch_dim2) * ch_dim1 + 2];
305 cc[(k + (j + i__ * cc_dim3) * cc_dim2) * cc_dim1 + 2] = wa[
306 i__ + (j - 1 + wa_dim2) * wa_dim1] * ch[(k + (i__ + j
307 * ch_dim3) * ch_dim2) * ch_dim1 + 2] - wa[i__ + (j -
308 1 + (wa_dim2 << 1)) * wa_dim1] * ch[(k + (i__ + j *
309 ch_dim3) * ch_dim2) * ch_dim1 + 1];