1: #region Translated by Jose Antonio De Santiago-Castillo.
2:
3: //Translated by Jose Antonio De Santiago-Castillo.
4: //E-mail:JAntonioDeSantiago@gmail.com
5: //Web: www.DotNumerics.com
6: //
7: //Fortran to C# Translation.
8: //Translated by:
9: //F2CSharp Version 0.71 (November 10, 2009)
10: //Code Optimizations: None
11: //
12: #endregion
13:
14: using System;
15: using DotNumerics.FortranLibrary;
16:
17: namespace DotNumerics.CSLapack
18: {
19: /// <summary>
20: /// -- LAPACK auxiliary routine (version 3.1) --
21: /// Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
22: /// November 2006
23: /// Purpose
24: /// =======
25: ///
26: /// DLARFX applies a real elementary reflector H to a real m by n
27: /// matrix C, from either the left or the right. H is represented in the
28: /// form
29: ///
30: /// H = I - tau * v * v'
31: ///
32: /// where tau is a real scalar and v is a real vector.
33: ///
34: /// If tau = 0, then H is taken to be the unit matrix
35: ///
36: /// This version uses inline code if H has order .LT. 11.
37: ///
38: ///</summary>
39: public class DLARFX
40: {
41:
42:
43: #region Dependencies
44:
45: LSAME _lsame; DGEMV _dgemv; DGER _dger;
46:
47: #endregion
48:
49:
50: #region Fields
51:
52: const double ZERO = 0.0E+0; const double ONE = 1.0E+0; int J = 0; double SUM = 0; double T1 = 0; double T10 = 0;
53: double T2 = 0;double T3 = 0; double T4 = 0; double T5 = 0; double T6 = 0; double T7 = 0; double T8 = 0; double T9 = 0;
54: double V1 = 0;double V10 = 0; double V2 = 0; double V3 = 0; double V4 = 0; double V5 = 0; double V6 = 0; double V7 = 0;
55: double V8 = 0;double V9 = 0;
56:
57: #endregion
58:
59: public DLARFX(LSAME lsame, DGEMV dgemv, DGER dger)
60: {
61:
62:
63: #region Set Dependencies
64:
65: this._lsame = lsame; this._dgemv = dgemv; this._dger = dger;
66:
67: #endregion
68:
69: }
70:
71: public DLARFX()
72: {
73:
74:
75: #region Dependencies (Initialization)
76:
77: LSAME lsame = new LSAME();
78: XERBLA xerbla = new XERBLA();
79: DGEMV dgemv = new DGEMV(lsame, xerbla);
80: DGER dger = new DGER(xerbla);
81:
82: #endregion
83:
84:
85: #region Set Dependencies
86:
87: this._lsame = lsame; this._dgemv = dgemv; this._dger = dger;
88:
89: #endregion
90:
91: }
92: /// <summary>
93: /// Purpose
94: /// =======
95: ///
96: /// DLARFX applies a real elementary reflector H to a real m by n
97: /// matrix C, from either the left or the right. H is represented in the
98: /// form
99: ///
100: /// H = I - tau * v * v'
101: ///
102: /// where tau is a real scalar and v is a real vector.
103: ///
104: /// If tau = 0, then H is taken to be the unit matrix
105: ///
106: /// This version uses inline code if H has order .LT. 11.
107: ///
108: ///</summary>
109: /// <param name="SIDE">
110: /// (input) CHARACTER*1
111: /// = 'L': form H * C
112: /// = 'R': form C * H
113: ///</param>
114: /// <param name="M">
115: /// (input) INTEGER
116: /// The number of rows of the matrix C.
117: ///</param>
118: /// <param name="N">
119: /// (input) INTEGER
120: /// The number of columns of the matrix C.
121: ///</param>
122: /// <param name="V">
123: /// (input) DOUBLE PRECISION array, dimension (M) if SIDE = 'L'
124: /// or (N) if SIDE = 'R'
125: /// The vector v in the representation of H.
126: ///</param>
127: /// <param name="TAU">
128: /// (input) DOUBLE PRECISION
129: /// The value tau in the representation of H.
130: ///</param>
131: /// <param name="C">
132: /// (input/output) DOUBLE PRECISION array, dimension (LDC,N)
133: /// On entry, the m by n matrix C.
134: /// On exit, C is overwritten by the matrix H * C if SIDE = 'L',
135: /// or C * H if SIDE = 'R'.
136: ///</param>
137: /// <param name="LDC">
138: /// (input) INTEGER
139: /// The leading dimension of the array C. LDA .GE. (1,M).
140: ///</param>
141: /// <param name="WORK">
142: /// (workspace) DOUBLE PRECISION array, dimension
143: /// (N) if SIDE = 'L'
144: /// or (M) if SIDE = 'R'
145: /// WORK is not referenced if H has order .LT. 11.
146: ///</param>
147: public void Run(string SIDE, int M, int N, double[] V, int offset_v, double TAU, ref double[] C, int offset_c
148: , int LDC, ref double[] WORK, int offset_work)
149: {
150:
151: #region Array Index Correction
152:
153: int o_v = -1 + offset_v; int o_c = -1 - LDC + offset_c; int o_work = -1 + offset_work;
154:
155: #endregion
156:
157:
158: #region Strings
159:
160: SIDE = SIDE.Substring(0, 1);
161:
162: #endregion
163:
164:
165: #region Prolog
166:
167: // *
168: // * -- LAPACK auxiliary routine (version 3.1) --
169: // * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
170: // * November 2006
171: // *
172: // * .. Scalar Arguments ..
173: // * ..
174: // * .. Array Arguments ..
175: // * ..
176: // *
177: // * Purpose
178: // * =======
179: // *
180: // * DLARFX applies a real elementary reflector H to a real m by n
181: // * matrix C, from either the left or the right. H is represented in the
182: // * form
183: // *
184: // * H = I - tau * v * v'
185: // *
186: // * where tau is a real scalar and v is a real vector.
187: // *
188: // * If tau = 0, then H is taken to be the unit matrix
189: // *
190: // * This version uses inline code if H has order < 11.
191: // *
192: // * Arguments
193: // * =========
194: // *
195: // * SIDE (input) CHARACTER*1
196: // * = 'L': form H * C
197: // * = 'R': form C * H
198: // *
199: // * M (input) INTEGER
200: // * The number of rows of the matrix C.
201: // *
202: // * N (input) INTEGER
203: // * The number of columns of the matrix C.
204: // *
205: // * V (input) DOUBLE PRECISION array, dimension (M) if SIDE = 'L'
206: // * or (N) if SIDE = 'R'
207: // * The vector v in the representation of H.
208: // *
209: // * TAU (input) DOUBLE PRECISION
210: // * The value tau in the representation of H.
211: // *
212: // * C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
213: // * On entry, the m by n matrix C.
214: // * On exit, C is overwritten by the matrix H * C if SIDE = 'L',
215: // * or C * H if SIDE = 'R'.
216: // *
217: // * LDC (input) INTEGER
218: // * The leading dimension of the array C. LDA >= (1,M).
219: // *
220: // * WORK (workspace) DOUBLE PRECISION array, dimension
221: // * (N) if SIDE = 'L'
222: // * or (M) if SIDE = 'R'
223: // * WORK is not referenced if H has order < 11.
224: // *
225: // * =====================================================================
226: // *
227: // * .. Parameters ..
228: // * ..
229: // * .. Local Scalars ..
230: // * ..
231: // * .. External Functions ..
232: // * ..
233: // * .. External Subroutines ..
234: // * ..
235: // * .. Executable Statements ..
236: // *
237:
238: #endregion
239:
240:
241: #region Body
242:
243: if (TAU == ZERO) return;
244: if (this._lsame.Run(SIDE, "L"))
245: {
246: // *
247: // * Form H * C, where H has order m.
248: // *
249: switch (M)
250: {
251: case 1: goto LABEL10;
252: case 2: goto LABEL30;
253: case 3: goto LABEL50;
254: case 4: goto LABEL70;
255: case 5: goto LABEL90;
256: case 6: goto LABEL110;
257: case 7: goto LABEL130;
258: case 8: goto LABEL150;
259: case 9: goto LABEL170;
260: case 10: goto LABEL190;
261: }
262: // *
263: // * Code for general M
264: // *
265: // * w := C'*v
266: // *
267: this._dgemv.Run("Transpose", M, N, ONE, C, offset_c, LDC
268: , V, offset_v, 1, ZERO, ref WORK, offset_work, 1);
269: // *
270: // * C := C - tau * v * w'
271: // *
272: this._dger.Run(M, N, - TAU, V, offset_v, 1, WORK, offset_work
273: , 1, ref C, offset_c, LDC);
274: goto LABEL410;
275: LABEL10:;
276: // *
277: // * Special code for 1 x 1 Householder
278: // *
279: T1 = ONE - TAU * V[1 + o_v] * V[1 + o_v];
280: for (J = 1; J <= N; J++)
281: {
282: C[1+J * LDC + o_c] = T1 * C[1+J * LDC + o_c];
283: }
284: goto LABEL410;
285: LABEL30:;
286: // *
287: // * Special code for 2 x 2 Householder
288: // *
289: V1 = V[1 + o_v];
290: T1 = TAU * V1;
291: V2 = V[2 + o_v];
292: T2 = TAU * V2;
293: for (J = 1; J <= N; J++)
294: {
295: SUM = V1 * C[1+J * LDC + o_c] + V2 * C[2+J * LDC + o_c];
296: C[1+J * LDC + o_c] = C[1+J * LDC + o_c] - SUM * T1;
297: C[2+J * LDC + o_c] = C[2+J * LDC + o_c] - SUM * T2;
298: }
299: goto LABEL410;
300: LABEL50:;
301: // *
302: // * Special code for 3 x 3 Householder
303: // *
304: V1 = V[1 + o_v];
305: T1 = TAU * V1;
306: V2 = V[2 + o_v];
307: T2 = TAU * V2;
308: V3 = V[3 + o_v];
309: T3 = TAU * V3;
310: for (J = 1; J <= N; J++)
311: {
312: SUM = V1 * C[1+J * LDC + o_c] + V2 * C[2+J * LDC + o_c] + V3 * C[3+J * LDC + o_c];
313: C[1+J * LDC + o_c] = C[1+J * LDC + o_c] - SUM * T1;
314: C[2+J * LDC + o_c] = C[2+J * LDC + o_c] - SUM * T2;
315: C[3+J * LDC + o_c] = C[3+J * LDC + o_c] - SUM * T3;
316: }
317: goto LABEL410;
318: LABEL70:;
319: // *
320: // * Special code for 4 x 4 Householder
321: // *
322: V1 = V[1 + o_v];
323: T1 = TAU * V1;
324: V2 = V[2 + o_v];
325: T2 = TAU * V2;
326: V3 = V[3 + o_v];
327: T3 = TAU * V3;
328: V4 = V[4 + o_v];
329: T4 = TAU * V4;
330: for (J = 1; J <= N; J++)
331: {
332: SUM = V1 * C[1+J * LDC + o_c] + V2 * C[2+J * LDC + o_c] + V3 * C[3+J * LDC + o_c] + V4 * C[4+J * LDC + o_c];
333: C[1+J * LDC + o_c] = C[1+J * LDC + o_c] - SUM * T1;
334: C[2+J * LDC + o_c] = C[2+J * LDC + o_c] - SUM * T2;
335: C[3+J * LDC + o_c] = C[3+J * LDC + o_c] - SUM * T3;
336: C[4+J * LDC + o_c] = C[4+J * LDC + o_c] - SUM * T4;
337: }
338: goto LABEL410;
339: LABEL90:;
340: // *
341: // * Special code for 5 x 5 Householder
342: // *
343: V1 = V[1 + o_v];
344: T1 = TAU * V1;
345: V2 = V[2 + o_v];
346: T2 = TAU * V2;
347: V3 = V[3 + o_v];
348: T3 = TAU * V3;
349: V4 = V[4 + o_v];
350: T4 = TAU * V4;
351: V5 = V[5 + o_v];
352: T5 = TAU * V5;
353: for (J = 1; J <= N; J++)
354: {
355: SUM = V1 * C[1+J * LDC + o_c] + V2 * C[2+J * LDC + o_c] + V3 * C[3+J * LDC + o_c] + V4 * C[4+J * LDC + o_c] + V5 * C[5+J * LDC + o_c];
356: C[1+J * LDC + o_c] = C[1+J * LDC + o_c] - SUM * T1;
357: C[2+J * LDC + o_c] = C[2+J * LDC + o_c] - SUM * T2;
358: C[3+J * LDC + o_c] = C[3+J * LDC + o_c] - SUM * T3;
359: C[4+J * LDC + o_c] = C[4+J * LDC + o_c] - SUM * T4;
360: C[5+J * LDC + o_c] = C[5+J * LDC + o_c] - SUM * T5;
361: }
362: goto LABEL410;
363: LABEL110:;
364: // *
365: // * Special code for 6 x 6 Householder
366: // *
367: V1 = V[1 + o_v];
368: T1 = TAU * V1;
369: V2 = V[2 + o_v];
370: T2 = TAU * V2;
371: V3 = V[3 + o_v];
372: T3 = TAU * V3;
373: V4 = V[4 + o_v];
374: T4 = TAU * V4;
375: V5 = V[5 + o_v];
376: T5 = TAU * V5;
377: V6 = V[6 + o_v];
378: T6 = TAU * V6;
379: for (J = 1; J <= N; J++)
380: {
381: SUM = V1 * C[1+J * LDC + o_c] + V2 * C[2+J * LDC + o_c] + V3 * C[3+J * LDC + o_c] + V4 * C[4+J * LDC + o_c] + V5 * C[5+J * LDC + o_c] + V6 * C[6+J * LDC + o_c];
382: C[1+J * LDC + o_c] = C[1+J * LDC + o_c] - SUM * T1;
383: C[2+J * LDC + o_c] = C[2+J * LDC + o_c] - SUM * T2;
384: C[3+J * LDC + o_c] = C[3+J * LDC + o_c] - SUM * T3;
385: C[4+J * LDC + o_c] = C[4+J * LDC + o_c] - SUM * T4;
386: C[5+J * LDC + o_c] = C[5+J * LDC + o_c] - SUM * T5;
387: C[6+J * LDC + o_c] = C[6+J * LDC + o_c] - SUM * T6;
388: }
389: goto LABEL410;
390: LABEL130:;
391: // *
392: // * Special code for 7 x 7 Householder
393: // *
394: V1 = V[1 + o_v];
395: T1 = TAU * V1;
396: V2 = V[2 + o_v];
397: T2 = TAU * V2;
398: V3 = V[3 + o_v];
399: T3 = TAU * V3;
400: V4 = V[4 + o_v];
401: T4 = TAU * V4;
402: V5 = V[5 + o_v];
403: T5 = TAU * V5;
404: V6 = V[6 + o_v];
405: T6 = TAU * V6;
406: V7 = V[7 + o_v];
407: T7 = TAU * V7;
408: for (J = 1; J <= N; J++)
409: {
410: SUM = V1 * C[1+J * LDC + o_c] + V2 * C[2+J * LDC + o_c] + V3 * C[3+J * LDC + o_c] + V4 * C[4+J * LDC + o_c] + V5 * C[5+J * LDC + o_c] + V6 * C[6+J * LDC + o_c] + V7 * C[7+J * LDC + o_c];
411: C[1+J * LDC + o_c] = C[1+J * LDC + o_c] - SUM * T1;
412: C[2+J * LDC + o_c] = C[2+J * LDC + o_c] - SUM * T2;
413: C[3+J * LDC + o_c] = C[3+J * LDC + o_c] - SUM * T3;
414: C[4+J * LDC + o_c] = C[4+J * LDC + o_c] - SUM * T4;
415: C[5+J * LDC + o_c] = C[5+J * LDC + o_c] - SUM * T5;
416: C[6+J * LDC + o_c] = C[6+J * LDC + o_c] - SUM * T6;
417: C[7+J * LDC + o_c] = C[7+J * LDC + o_c] - SUM * T7;
418: }
419: goto LABEL410;
420: LABEL150:;
421: // *
422: // * Special code for 8 x 8 Householder
423: // *
424: V1 = V[1 + o_v];
425: T1 = TAU * V1;
426: V2 = V[2 + o_v];
427: T2 = TAU * V2;
428: V3 = V[3 + o_v];
429: T3 = TAU * V3;
430: V4 = V[4 + o_v];
431: T4 = TAU * V4;
432: V5 = V[5 + o_v];
433: T5 = TAU * V5;
434: V6 = V[6 + o_v];
435: T6 = TAU * V6;
436: V7 = V[7 + o_v];
437: T7 = TAU * V7;
438: V8 = V[8 + o_v];
439: T8 = TAU * V8;
440: for (J = 1; J <= N; J++)
441: {
442: SUM = V1 * C[1+J * LDC + o_c] + V2 * C[2+J * LDC + o_c] + V3 * C[3+J * LDC + o_c] + V4 * C[4+J * LDC + o_c] + V5 * C[5+J * LDC + o_c] + V6 * C[6+J * LDC + o_c] + V7 * C[7+J * LDC + o_c] + V8 * C[8+J * LDC + o_c];
443: C[1+J * LDC + o_c] = C[1+J * LDC + o_c] - SUM * T1;
444: C[2+J * LDC + o_c] = C[2+J * LDC + o_c] - SUM * T2;
445: C[3+J * LDC + o_c] = C[3+J * LDC + o_c] - SUM * T3;
446: C[4+J * LDC + o_c] = C[4+J * LDC + o_c] - SUM * T4;
447: C[5+J * LDC + o_c] = C[5+J * LDC + o_c] - SUM * T5;
448: C[6+J * LDC + o_c] = C[6+J * LDC + o_c] - SUM * T6;
449: C[7+J * LDC + o_c] = C[7+J * LDC + o_c] - SUM * T7;
450: C[8+J * LDC + o_c] = C[8+J * LDC + o_c] - SUM * T8;
451: }
452: goto LABEL410;
453: LABEL170:;
454: // *
455: // * Special code for 9 x 9 Householder
456: // *
457: V1 = V[1 + o_v];
458: T1 = TAU * V1;
459: V2 = V[2 + o_v];
460: T2 = TAU * V2;
461: V3 = V[3 + o_v];
462: T3 = TAU * V3;
463: V4 = V[4 + o_v];
464: T4 = TAU * V4;
465: V5 = V[5 + o_v];
466: T5 = TAU * V5;
467: V6 = V[6 + o_v];
468: T6 = TAU * V6;
469: V7 = V[7 + o_v];
470: T7 = TAU * V7;
471: V8 = V[8 + o_v];
472: T8 = TAU * V8;
473: V9 = V[9 + o_v];
474: T9 = TAU * V9;
475: for (J = 1; J <= N; J++)
476: {
477: SUM = V1 * C[1+J * LDC + o_c] + V2 * C[2+J * LDC + o_c] + V3 * C[3+J * LDC + o_c] + V4 * C[4+J * LDC + o_c] + V5 * C[5+J * LDC + o_c] + V6 * C[6+J * LDC + o_c] + V7 * C[7+J * LDC + o_c] + V8 * C[8+J * LDC + o_c] + V9 * C[9+J * LDC + o_c];
478: C[1+J * LDC + o_c] = C[1+J * LDC + o_c] - SUM * T1;
479: C[2+J * LDC + o_c] = C[2+J * LDC + o_c] - SUM * T2;
480: C[3+J * LDC + o_c] = C[3+J * LDC + o_c] - SUM * T3;
481: C[4+J * LDC + o_c] = C[4+J * LDC + o_c] - SUM * T4;
482: C[5+J * LDC + o_c] = C[5+J * LDC + o_c] - SUM * T5;
483: C[6+J * LDC + o_c] = C[6+J * LDC + o_c] - SUM * T6;
484: C[7+J * LDC + o_c] = C[7+J * LDC + o_c] - SUM * T7;
485: C[8+J * LDC + o_c] = C[8+J * LDC + o_c] - SUM * T8;
486: C[9+J * LDC + o_c] = C[9+J * LDC + o_c] - SUM * T9;
487: }
488: goto LABEL410;
489: LABEL190:;
490: // *
491: // * Special code for 10 x 10 Householder
492: // *
493: V1 = V[1 + o_v];
494: T1 = TAU * V1;
495: V2 = V[2 + o_v];
496: T2 = TAU * V2;
497: V3 = V[3 + o_v];
498: T3 = TAU * V3;
499: V4 = V[4 + o_v];
500: T4 = TAU * V4;
501: V5 = V[5 + o_v];
502: T5 = TAU * V5;
503: V6 = V[6 + o_v];
504: T6 = TAU * V6;
505: V7 = V[7 + o_v];
506: T7 = TAU * V7;
507: V8 = V[8 + o_v];
508: T8 = TAU * V8;
509: V9 = V[9 + o_v];
510: T9 = TAU * V9;
511: V10 = V[10 + o_v];
512: T10 = TAU * V10;
513: for (J = 1; J <= N; J++)
514: {
515: SUM = V1 * C[1+J * LDC + o_c] + V2 * C[2+J * LDC + o_c] + V3 * C[3+J * LDC + o_c] + V4 * C[4+J * LDC + o_c] + V5 * C[5+J * LDC + o_c] + V6 * C[6+J * LDC + o_c] + V7 * C[7+J * LDC + o_c] + V8 * C[8+J * LDC + o_c] + V9 * C[9+J * LDC + o_c] + V10 * C[10+J * LDC + o_c];
516: C[1+J * LDC + o_c] = C[1+J * LDC + o_c] - SUM * T1;
517: C[2+J * LDC + o_c] = C[2+J * LDC + o_c] - SUM * T2;
518: C[3+J * LDC + o_c] = C[3+J * LDC + o_c] - SUM * T3;
519: C[4+J * LDC + o_c] = C[4+J * LDC + o_c] - SUM * T4;
520: C[5+J * LDC + o_c] = C[5+J * LDC + o_c] - SUM * T5;
521: C[6+J * LDC + o_c] = C[6+J * LDC + o_c] - SUM * T6;
522: C[7+J * LDC + o_c] = C[7+J * LDC + o_c] - SUM * T7;
523: C[8+J * LDC + o_c] = C[8+J * LDC + o_c] - SUM * T8;
524: C[9+J * LDC + o_c] = C[9+J * LDC + o_c] - SUM * T9;
525: C[10+J * LDC + o_c] = C[10+J * LDC + o_c] - SUM * T10;
526: }
527: goto LABEL410;
528: }
529: else
530: {
531: // *
532: // * Form C * H, where H has order n.
533: // *
534: switch (N)
535: {
536: case 1: goto LABEL210;
537: case 2: goto LABEL230;
538: case 3: goto LABEL250;
539: case 4: goto LABEL270;
540: case 5: goto LABEL290;
541: case 6: goto LABEL310;
542: case 7: goto LABEL330;
543: case 8: goto LABEL350;
544: case 9: goto LABEL370;
545: case 10: goto LABEL390;
546: }
547: // *
548: // * Code for general N
549: // *
550: // * w := C * v
551: // *
552: this._dgemv.Run("No transpose", M, N, ONE, C, offset_c, LDC
553: , V, offset_v, 1, ZERO, ref WORK, offset_work, 1);
554: // *
555: // * C := C - tau * w * v'
556: // *
557: this._dger.Run(M, N, - TAU, WORK, offset_work, 1, V, offset_v
558: , 1, ref C, offset_c, LDC);
559: goto LABEL410;
560: LABEL210:;
561: // *
562: // * Special code for 1 x 1 Householder
563: // *
564: T1 = ONE - TAU * V[1 + o_v] * V[1 + o_v];
565: for (J = 1; J <= M; J++)
566: {
567: C[J+1 * LDC + o_c] = T1 * C[J+1 * LDC + o_c];
568: }
569: goto LABEL410;
570: LABEL230:;
571: // *
572: // * Special code for 2 x 2 Householder
573: // *
574: V1 = V[1 + o_v];
575: T1 = TAU * V1;
576: V2 = V[2 + o_v];
577: T2 = TAU * V2;
578: for (J = 1; J <= M; J++)
579: {
580: SUM = V1 * C[J+1 * LDC + o_c] + V2 * C[J+2 * LDC + o_c];
581: C[J+1 * LDC + o_c] = C[J+1 * LDC + o_c] - SUM * T1;
582: C[J+2 * LDC + o_c] = C[J+2 * LDC + o_c] - SUM * T2;
583: }
584: goto LABEL410;
585: LABEL250:;
586: // *
587: // * Special code for 3 x 3 Householder
588: // *
589: V1 = V[1 + o_v];
590: T1 = TAU * V1;
591: V2 = V[2 + o_v];
592: T2 = TAU * V2;
593: V3 = V[3 + o_v];
594: T3 = TAU * V3;
595: for (J = 1; J <= M; J++)
596: {
597: SUM = V1 * C[J+1 * LDC + o_c] + V2 * C[J+2 * LDC + o_c] + V3 * C[J+3 * LDC + o_c];
598: C[J+1 * LDC + o_c] = C[J+1 * LDC + o_c] - SUM * T1;
599: C[J+2 * LDC + o_c] = C[J+2 * LDC + o_c] - SUM * T2;
600: C[J+3 * LDC + o_c] = C[J+3 * LDC + o_c] - SUM * T3;
601: }
602: goto LABEL410;
603: LABEL270:;
604: // *
605: // * Special code for 4 x 4 Householder
606: // *
607: V1 = V[1 + o_v];
608: T1 = TAU * V1;
609: V2 = V[2 + o_v];
610: T2 = TAU * V2;
611: V3 = V[3 + o_v];
612: T3 = TAU * V3;
613: V4 = V[4 + o_v];
614: T4 = TAU * V4;
615: for (J = 1; J <= M; J++)
616: {
617: SUM = V1 * C[J+1 * LDC + o_c] + V2 * C[J+2 * LDC + o_c] + V3 * C[J+3 * LDC + o_c] + V4 * C[J+4 * LDC + o_c];
618: C[J+1 * LDC + o_c] = C[J+1 * LDC + o_c] - SUM * T1;
619: C[J+2 * LDC + o_c] = C[J+2 * LDC + o_c] - SUM * T2;
620: C[J+3 * LDC + o_c] = C[J+3 * LDC + o_c] - SUM * T3;
621: C[J+4 * LDC + o_c] = C[J+4 * LDC + o_c] - SUM * T4;
622: }
623: goto LABEL410;
624: LABEL290:;
625: // *
626: // * Special code for 5 x 5 Householder
627: // *
628: V1 = V[1 + o_v];
629: T1 = TAU * V1;
630: V2 = V[2 + o_v];
631: T2 = TAU * V2;
632: V3 = V[3 + o_v];
633: T3 = TAU * V3;
634: V4 = V[4 + o_v];
635: T4 = TAU * V4;
636: V5 = V[5 + o_v];
637: T5 = TAU * V5;
638: for (J = 1; J <= M; J++)
639: {
640: SUM = V1 * C[J+1 * LDC + o_c] + V2 * C[J+2 * LDC + o_c] + V3 * C[J+3 * LDC + o_c] + V4 * C[J+4 * LDC + o_c] + V5 * C[J+5 * LDC + o_c];
641: C[J+1 * LDC + o_c] = C[J+1 * LDC + o_c] - SUM * T1;
642: C[J+2 * LDC + o_c] = C[J+2 * LDC + o_c] - SUM * T2;
643: C[J+3 * LDC + o_c] = C[J+3 * LDC + o_c] - SUM * T3;
644: C[J+4 * LDC + o_c] = C[J+4 * LDC + o_c] - SUM * T4;
645: C[J+5 * LDC + o_c] = C[J+5 * LDC + o_c] - SUM * T5;
646: }
647: goto LABEL410;
648: LABEL310:;
649: // *
650: // * Special code for 6 x 6 Householder
651: // *
652: V1 = V[1 + o_v];
653: T1 = TAU * V1;
654: V2 = V[2 + o_v];
655: T2 = TAU * V2;
656: V3 = V[3 + o_v];
657: T3 = TAU * V3;
658: V4 = V[4 + o_v];
659: T4 = TAU * V4;
660: V5 = V[5 + o_v];
661: T5 = TAU * V5;
662: V6 = V[6 + o_v];
663: T6 = TAU * V6;
664: for (J = 1; J <= M; J++)
665: {
666: SUM = V1 * C[J+1 * LDC + o_c] + V2 * C[J+2 * LDC + o_c] + V3 * C[J+3 * LDC + o_c] + V4 * C[J+4 * LDC + o_c] + V5 * C[J+5 * LDC + o_c] + V6 * C[J+6 * LDC + o_c];
667: C[J+1 * LDC + o_c] = C[J+1 * LDC + o_c] - SUM * T1;
668: C[J+2 * LDC + o_c] = C[J+2 * LDC + o_c] - SUM * T2;
669: C[J+3 * LDC + o_c] = C[J+3 * LDC + o_c] - SUM * T3;
670: C[J+4 * LDC + o_c] = C[J+4 * LDC + o_c] - SUM * T4;
671: C[J+5 * LDC + o_c] = C[J+5 * LDC + o_c] - SUM * T5;
672: C[J+6 * LDC + o_c] = C[J+6 * LDC + o_c] - SUM * T6;
673: }
674: goto LABEL410;
675: LABEL330:;
676: // *
677: // * Special code for 7 x 7 Householder
678: // *
679: V1 = V[1 + o_v];
680: T1 = TAU * V1;
681: V2 = V[2 + o_v];
682: T2 = TAU * V2;
683: V3 = V[3 + o_v];
684: T3 = TAU * V3;
685: V4 = V[4 + o_v];
686: T4 = TAU * V4;
687: V5 = V[5 + o_v];
688: T5 = TAU * V5;
689: V6 = V[6 + o_v];
690: T6 = TAU * V6;
691: V7 = V[7 + o_v];
692: T7 = TAU * V7;
693: for (J = 1; J <= M; J++)
694: {
695: SUM = V1 * C[J+1 * LDC + o_c] + V2 * C[J+2 * LDC + o_c] + V3 * C[J+3 * LDC + o_c] + V4 * C[J+4 * LDC + o_c] + V5 * C[J+5 * LDC + o_c] + V6 * C[J+6 * LDC + o_c] + V7 * C[J+7 * LDC + o_c];
696: C[J+1 * LDC + o_c] = C[J+1 * LDC + o_c] - SUM * T1;
697: C[J+2 * LDC + o_c] = C[J+2 * LDC + o_c] - SUM * T2;
698: C[J+3 * LDC + o_c] = C[J+3 * LDC + o_c] - SUM * T3;
699: C[J+4 * LDC + o_c] = C[J+4 * LDC + o_c] - SUM * T4;
700: C[J+5 * LDC + o_c] = C[J+5 * LDC + o_c] - SUM * T5;
701: C[J+6 * LDC + o_c] = C[J+6 * LDC + o_c] - SUM * T6;
702: C[J+7 * LDC + o_c] = C[J+7 * LDC + o_c] - SUM * T7;
703: }
704: goto LABEL410;
705: LABEL350:;
706: // *
707: // * Special code for 8 x 8 Householder
708: // *
709: V1 = V[1 + o_v];
710: T1 = TAU * V1;
711: V2 = V[2 + o_v];
712: T2 = TAU * V2;
713: V3 = V[3 + o_v];
714: T3 = TAU * V3;
715: V4 = V[4 + o_v];
716: T4 = TAU * V4;
717: V5 = V[5 + o_v];
718: T5 = TAU * V5;
719: V6 = V[6 + o_v];
720: T6 = TAU * V6;
721: V7 = V[7 + o_v];
722: T7 = TAU * V7;
723: V8 = V[8 + o_v];
724: T8 = TAU * V8;
725: for (J = 1; J <= M; J++)
726: {
727: SUM = V1 * C[J+1 * LDC + o_c] + V2 * C[J+2 * LDC + o_c] + V3 * C[J+3 * LDC + o_c] + V4 * C[J+4 * LDC + o_c] + V5 * C[J+5 * LDC + o_c] + V6 * C[J+6 * LDC + o_c] + V7 * C[J+7 * LDC + o_c] + V8 * C[J+8 * LDC + o_c];
728: C[J+1 * LDC + o_c] = C[J+1 * LDC + o_c] - SUM * T1;
729: C[J+2 * LDC + o_c] = C[J+2 * LDC + o_c] - SUM * T2;
730: C[J+3 * LDC + o_c] = C[J+3 * LDC + o_c] - SUM * T3;
731: C[J+4 * LDC + o_c] = C[J+4 * LDC + o_c] - SUM * T4;
732: C[J+5 * LDC + o_c] = C[J+5 * LDC + o_c] - SUM * T5;
733: C[J+6 * LDC + o_c] = C[J+6 * LDC + o_c] - SUM * T6;
734: C[J+7 * LDC + o_c] = C[J+7 * LDC + o_c] - SUM * T7;
735: C[J+8 * LDC + o_c] = C[J+8 * LDC + o_c] - SUM * T8;
736: }
737: goto LABEL410;
738: LABEL370:;
739: // *
740: // * Special code for 9 x 9 Householder
741: // *
742: V1 = V[1 + o_v];
743: T1 = TAU * V1;
744: V2 = V[2 + o_v];
745: T2 = TAU * V2;
746: V3 = V[3 + o_v];
747: T3 = TAU * V3;
748: V4 = V[4 + o_v];
749: T4 = TAU * V4;
750: V5 = V[5 + o_v];
751: T5 = TAU * V5;
752: V6 = V[6 + o_v];
753: T6 = TAU * V6;
754: V7 = V[7 + o_v];
755: T7 = TAU * V7;
756: V8 = V[8 + o_v];
757: T8 = TAU * V8;
758: V9 = V[9 + o_v];
759: T9 = TAU * V9;
760: for (J = 1; J <= M; J++)
761: {
762: SUM = V1 * C[J+1 * LDC + o_c] + V2 * C[J+2 * LDC + o_c] + V3 * C[J+3 * LDC + o_c] + V4 * C[J+4 * LDC + o_c] + V5 * C[J+5 * LDC + o_c] + V6 * C[J+6 * LDC + o_c] + V7 * C[J+7 * LDC + o_c] + V8 * C[J+8 * LDC + o_c] + V9 * C[J+9 * LDC + o_c];
763: C[J+1 * LDC + o_c] = C[J+1 * LDC + o_c] - SUM * T1;
764: C[J+2 * LDC + o_c] = C[J+2 * LDC + o_c] - SUM * T2;
765: C[J+3 * LDC + o_c] = C[J+3 * LDC + o_c] - SUM * T3;
766: C[J+4 * LDC + o_c] = C[J+4 * LDC + o_c] - SUM * T4;
767: C[J+5 * LDC + o_c] = C[J+5 * LDC + o_c] - SUM * T5;
768: C[J+6 * LDC + o_c] = C[J+6 * LDC + o_c] - SUM * T6;
769: C[J+7 * LDC + o_c] = C[J+7 * LDC + o_c] - SUM * T7;
770: C[J+8 * LDC + o_c] = C[J+8 * LDC + o_c] - SUM * T8;
771: C[J+9 * LDC + o_c] = C[J+9 * LDC + o_c] - SUM * T9;
772: }
773: goto LABEL410;
774: LABEL390:;
775: // *
776: // * Special code for 10 x 10 Householder
777: // *
778: V1 = V[1 + o_v];
779: T1 = TAU * V1;
780: V2 = V[2 + o_v];
781: T2 = TAU * V2;
782: V3 = V[3 + o_v];
783: T3 = TAU * V3;
784: V4 = V[4 + o_v];
785: T4 = TAU * V4;
786: V5 = V[5 + o_v];
787: T5 = TAU * V5;
788: V6 = V[6 + o_v];
789: T6 = TAU * V6;
790: V7 = V[7 + o_v];
791: T7 = TAU * V7;
792: V8 = V[8 + o_v];
793: T8 = TAU * V8;
794: V9 = V[9 + o_v];
795: T9 = TAU * V9;
796: V10 = V[10 + o_v];
797: T10 = TAU * V10;
798: for (J = 1; J <= M; J++)
799: {
800: SUM = V1 * C[J+1 * LDC + o_c] + V2 * C[J+2 * LDC + o_c] + V3 * C[J+3 * LDC + o_c] + V4 * C[J+4 * LDC + o_c] + V5 * C[J+5 * LDC + o_c] + V6 * C[J+6 * LDC + o_c] + V7 * C[J+7 * LDC + o_c] + V8 * C[J+8 * LDC + o_c] + V9 * C[J+9 * LDC + o_c] + V10 * C[J+10 * LDC + o_c];
801: C[J+1 * LDC + o_c] = C[J+1 * LDC + o_c] - SUM * T1;
802: C[J+2 * LDC + o_c] = C[J+2 * LDC + o_c] - SUM * T2;
803: C[J+3 * LDC + o_c] = C[J+3 * LDC + o_c] - SUM * T3;
804: C[J+4 * LDC + o_c] = C[J+4 * LDC + o_c] - SUM * T4;
805: C[J+5 * LDC + o_c] = C[J+5 * LDC + o_c] - SUM * T5;
806: C[J+6 * LDC + o_c] = C[J+6 * LDC + o_c] - SUM * T6;
807: C[J+7 * LDC + o_c] = C[J+7 * LDC + o_c] - SUM * T7;
808: C[J+8 * LDC + o_c] = C[J+8 * LDC + o_c] - SUM * T8;
809: C[J+9 * LDC + o_c] = C[J+9 * LDC + o_c] - SUM * T9;
810: C[J+10 * LDC + o_c] = C[J+10 * LDC + o_c] - SUM * T10;
811: }
812: goto LABEL410;
813: }
814: LABEL410:;
815: return;
816: // *
817: // * End of DLARFX
818: // *
819:
820: #endregion
821:
822: }
823: }
824: }