C_LAPACK: Fixes to make it compile with MSVC (#3605)
[platform/upstream/openblas.git] / lapack-netlib / SRC / slarfx.c
1 #include <math.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <stdio.h>
5 #include <complex.h>
6 #ifdef complex
7 #undef complex
8 #endif
9 #ifdef I
10 #undef I
11 #endif
12
13 #if defined(_WIN64)
14 typedef long long BLASLONG;
15 typedef unsigned long long BLASULONG;
16 #else
17 typedef long BLASLONG;
18 typedef unsigned long BLASULONG;
19 #endif
20
21 #ifdef LAPACK_ILP64
22 typedef BLASLONG blasint;
23 #if defined(_WIN64)
24 #define blasabs(x) llabs(x)
25 #else
26 #define blasabs(x) labs(x)
27 #endif
28 #else
29 typedef int blasint;
30 #define blasabs(x) abs(x)
31 #endif
32
33 typedef blasint integer;
34
35 typedef unsigned int uinteger;
36 typedef char *address;
37 typedef short int shortint;
38 typedef float real;
39 typedef double doublereal;
40 typedef struct { real r, i; } complex;
41 typedef struct { doublereal r, i; } doublecomplex;
42 #ifdef _MSC_VER
43 static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
44 static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
45 static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
46 static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
47 #else
48 static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
49 static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
50 static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
51 static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
52 #endif
53 #define pCf(z) (*_pCf(z))
54 #define pCd(z) (*_pCd(z))
55 typedef int logical;
56 typedef short int shortlogical;
57 typedef char logical1;
58 typedef char integer1;
59
60 #define TRUE_ (1)
61 #define FALSE_ (0)
62
63 /* Extern is for use with -E */
64 #ifndef Extern
65 #define Extern extern
66 #endif
67
68 /* I/O stuff */
69
70 typedef int flag;
71 typedef int ftnlen;
72 typedef int ftnint;
73
74 /*external read, write*/
75 typedef struct
76 {       flag cierr;
77         ftnint ciunit;
78         flag ciend;
79         char *cifmt;
80         ftnint cirec;
81 } cilist;
82
83 /*internal read, write*/
84 typedef struct
85 {       flag icierr;
86         char *iciunit;
87         flag iciend;
88         char *icifmt;
89         ftnint icirlen;
90         ftnint icirnum;
91 } icilist;
92
93 /*open*/
94 typedef struct
95 {       flag oerr;
96         ftnint ounit;
97         char *ofnm;
98         ftnlen ofnmlen;
99         char *osta;
100         char *oacc;
101         char *ofm;
102         ftnint orl;
103         char *oblnk;
104 } olist;
105
106 /*close*/
107 typedef struct
108 {       flag cerr;
109         ftnint cunit;
110         char *csta;
111 } cllist;
112
113 /*rewind, backspace, endfile*/
114 typedef struct
115 {       flag aerr;
116         ftnint aunit;
117 } alist;
118
119 /* inquire */
120 typedef struct
121 {       flag inerr;
122         ftnint inunit;
123         char *infile;
124         ftnlen infilen;
125         ftnint  *inex;  /*parameters in standard's order*/
126         ftnint  *inopen;
127         ftnint  *innum;
128         ftnint  *innamed;
129         char    *inname;
130         ftnlen  innamlen;
131         char    *inacc;
132         ftnlen  inacclen;
133         char    *inseq;
134         ftnlen  inseqlen;
135         char    *indir;
136         ftnlen  indirlen;
137         char    *infmt;
138         ftnlen  infmtlen;
139         char    *inform;
140         ftnint  informlen;
141         char    *inunf;
142         ftnlen  inunflen;
143         ftnint  *inrecl;
144         ftnint  *innrec;
145         char    *inblank;
146         ftnlen  inblanklen;
147 } inlist;
148
149 #define VOID void
150
151 union Multitype {       /* for multiple entry points */
152         integer1 g;
153         shortint h;
154         integer i;
155         /* longint j; */
156         real r;
157         doublereal d;
158         complex c;
159         doublecomplex z;
160         };
161
162 typedef union Multitype Multitype;
163
164 struct Vardesc {        /* for Namelist */
165         char *name;
166         char *addr;
167         ftnlen *dims;
168         int  type;
169         };
170 typedef struct Vardesc Vardesc;
171
172 struct Namelist {
173         char *name;
174         Vardesc **vars;
175         int nvars;
176         };
177 typedef struct Namelist Namelist;
178
179 #define abs(x) ((x) >= 0 ? (x) : -(x))
180 #define dabs(x) (fabs(x))
181 #define f2cmin(a,b) ((a) <= (b) ? (a) : (b))
182 #define f2cmax(a,b) ((a) >= (b) ? (a) : (b))
183 #define dmin(a,b) (f2cmin(a,b))
184 #define dmax(a,b) (f2cmax(a,b))
185 #define bit_test(a,b)   ((a) >> (b) & 1)
186 #define bit_clear(a,b)  ((a) & ~((uinteger)1 << (b)))
187 #define bit_set(a,b)    ((a) |  ((uinteger)1 << (b)))
188
189 #define abort_() { sig_die("Fortran abort routine called", 1); }
190 #define c_abs(z) (cabsf(Cf(z)))
191 #define c_cos(R,Z) { pCf(R)=ccos(Cf(Z)); }
192 #ifdef _MSC_VER
193 #define c_div(c, a, b) {Cf(c)._Val[0] = (Cf(a)._Val[0]/Cf(b)._Val[0]); Cf(c)._Val[1]=(Cf(a)._Val[1]/Cf(b)._Val[1]);}
194 #define z_div(c, a, b) {Cd(c)._Val[0] = (Cd(a)._Val[0]/Cd(b)._Val[0]); Cd(c)._Val[1]=(Cd(a)._Val[1]/df(b)._Val[1]);}
195 #else
196 #define c_div(c, a, b) {pCf(c) = Cf(a)/Cf(b);}
197 #define z_div(c, a, b) {pCd(c) = Cd(a)/Cd(b);}
198 #endif
199 #define c_exp(R, Z) {pCf(R) = cexpf(Cf(Z));}
200 #define c_log(R, Z) {pCf(R) = clogf(Cf(Z));}
201 #define c_sin(R, Z) {pCf(R) = csinf(Cf(Z));}
202 //#define c_sqrt(R, Z) {*(R) = csqrtf(Cf(Z));}
203 #define c_sqrt(R, Z) {pCf(R) = csqrtf(Cf(Z));}
204 #define d_abs(x) (fabs(*(x)))
205 #define d_acos(x) (acos(*(x)))
206 #define d_asin(x) (asin(*(x)))
207 #define d_atan(x) (atan(*(x)))
208 #define d_atn2(x, y) (atan2(*(x),*(y)))
209 #define d_cnjg(R, Z) { pCd(R) = conj(Cd(Z)); }
210 #define r_cnjg(R, Z) { pCf(R) = conjf(Cf(Z)); }
211 #define d_cos(x) (cos(*(x)))
212 #define d_cosh(x) (cosh(*(x)))
213 #define d_dim(__a, __b) ( *(__a) > *(__b) ? *(__a) - *(__b) : 0.0 )
214 #define d_exp(x) (exp(*(x)))
215 #define d_imag(z) (cimag(Cd(z)))
216 #define r_imag(z) (cimagf(Cf(z)))
217 #define d_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
218 #define r_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
219 #define d_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
220 #define r_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
221 #define d_log(x) (log(*(x)))
222 #define d_mod(x, y) (fmod(*(x), *(y)))
223 #define u_nint(__x) ((__x)>=0 ? floor((__x) + .5) : -floor(.5 - (__x)))
224 #define d_nint(x) u_nint(*(x))
225 #define u_sign(__a,__b) ((__b) >= 0 ? ((__a) >= 0 ? (__a) : -(__a)) : -((__a) >= 0 ? (__a) : -(__a)))
226 #define d_sign(a,b) u_sign(*(a),*(b))
227 #define r_sign(a,b) u_sign(*(a),*(b))
228 #define d_sin(x) (sin(*(x)))
229 #define d_sinh(x) (sinh(*(x)))
230 #define d_sqrt(x) (sqrt(*(x)))
231 #define d_tan(x) (tan(*(x)))
232 #define d_tanh(x) (tanh(*(x)))
233 #define i_abs(x) abs(*(x))
234 #define i_dnnt(x) ((integer)u_nint(*(x)))
235 #define i_len(s, n) (n)
236 #define i_nint(x) ((integer)u_nint(*(x)))
237 #define i_sign(a,b) ((integer)u_sign((integer)*(a),(integer)*(b)))
238 #define pow_dd(ap, bp) ( pow(*(ap), *(bp)))
239 #define pow_si(B,E) spow_ui(*(B),*(E))
240 #define pow_ri(B,E) spow_ui(*(B),*(E))
241 #define pow_di(B,E) dpow_ui(*(B),*(E))
242 #define pow_zi(p, a, b) {pCd(p) = zpow_ui(Cd(a), *(b));}
243 #define pow_ci(p, a, b) {pCf(p) = cpow_ui(Cf(a), *(b));}
244 #define pow_zz(R,A,B) {pCd(R) = cpow(Cd(A),*(B));}
245 #define s_cat(lpp, rpp, rnp, np, llp) {         ftnlen i, nc, ll; char *f__rp, *lp;     ll = (llp); lp = (lpp);         for(i=0; i < (int)*(np); ++i) {                 nc = ll;                if((rnp)[i] < nc) nc = (rnp)[i];                ll -= nc;               f__rp = (rpp)[i];               while(--nc >= 0) *lp++ = *(f__rp)++;         }  while(--ll >= 0) *lp++ = ' '; }
246 #define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
247 #define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
248 #define sig_die(s, kill) { exit(1); }
249 #define s_stop(s, n) {exit(0);}
250 static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
251 #define z_abs(z) (cabs(Cd(z)))
252 #define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
253 #define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
254 #define myexit_() break;
255 #define mycycle() continue;
256 #define myceiling(w) {ceil(w)}
257 #define myhuge(w) {HUGE_VAL}
258 //#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
259 #define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
260
261 /* procedure parameter types for -A and -C++ */
262
263 #define F2C_proc_par_types 1
264 #ifdef __cplusplus
265 typedef logical (*L_fp)(...);
266 #else
267 typedef logical (*L_fp)();
268 #endif
269
270 static float spow_ui(float x, integer n) {
271         float pow=1.0; unsigned long int u;
272         if(n != 0) {
273                 if(n < 0) n = -n, x = 1/x;
274                 for(u = n; ; ) {
275                         if(u & 01) pow *= x;
276                         if(u >>= 1) x *= x;
277                         else break;
278                 }
279         }
280         return pow;
281 }
282 static double dpow_ui(double x, integer n) {
283         double pow=1.0; unsigned long int u;
284         if(n != 0) {
285                 if(n < 0) n = -n, x = 1/x;
286                 for(u = n; ; ) {
287                         if(u & 01) pow *= x;
288                         if(u >>= 1) x *= x;
289                         else break;
290                 }
291         }
292         return pow;
293 }
294 #ifdef _MSC_VER
295 static _Fcomplex cpow_ui(complex x, integer n) {
296         complex pow={1.0,0.0}; unsigned long int u;
297                 if(n != 0) {
298                 if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
299                 for(u = n; ; ) {
300                         if(u & 01) pow.r *= x.r, pow.i *= x.i;
301                         if(u >>= 1) x.r *= x.r, x.i *= x.i;
302                         else break;
303                 }
304         }
305         _Fcomplex p={pow.r, pow.i};
306         return p;
307 }
308 #else
309 static _Complex float cpow_ui(_Complex float x, integer n) {
310         _Complex float pow=1.0; unsigned long int u;
311         if(n != 0) {
312                 if(n < 0) n = -n, x = 1/x;
313                 for(u = n; ; ) {
314                         if(u & 01) pow *= x;
315                         if(u >>= 1) x *= x;
316                         else break;
317                 }
318         }
319         return pow;
320 }
321 #endif
322 #ifdef _MSC_VER
323 static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
324         _Dcomplex pow={1.0,0.0}; unsigned long int u;
325         if(n != 0) {
326                 if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
327                 for(u = n; ; ) {
328                         if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
329                         if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
330                         else break;
331                 }
332         }
333         _Dcomplex p = {pow._Val[0], pow._Val[1]};
334         return p;
335 }
336 #else
337 static _Complex double zpow_ui(_Complex double x, integer n) {
338         _Complex double pow=1.0; unsigned long int u;
339         if(n != 0) {
340                 if(n < 0) n = -n, x = 1/x;
341                 for(u = n; ; ) {
342                         if(u & 01) pow *= x;
343                         if(u >>= 1) x *= x;
344                         else break;
345                 }
346         }
347         return pow;
348 }
349 #endif
350 static integer pow_ii(integer x, integer n) {
351         integer pow; unsigned long int u;
352         if (n <= 0) {
353                 if (n == 0 || x == 1) pow = 1;
354                 else if (x != -1) pow = x == 0 ? 1/x : 0;
355                 else n = -n;
356         }
357         if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
358                 u = n;
359                 for(pow = 1; ; ) {
360                         if(u & 01) pow *= x;
361                         if(u >>= 1) x *= x;
362                         else break;
363                 }
364         }
365         return pow;
366 }
367 static integer dmaxloc_(double *w, integer s, integer e, integer *n)
368 {
369         double m; integer i, mi;
370         for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
371                 if (w[i-1]>m) mi=i ,m=w[i-1];
372         return mi-s+1;
373 }
374 static integer smaxloc_(float *w, integer s, integer e, integer *n)
375 {
376         float m; integer i, mi;
377         for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
378                 if (w[i-1]>m) mi=i ,m=w[i-1];
379         return mi-s+1;
380 }
381 static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
382         integer n = *n_, incx = *incx_, incy = *incy_, i;
383 #ifdef _MSC_VER
384         _Fcomplex zdotc = {0.0, 0.0};
385         if (incx == 1 && incy == 1) {
386                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
387                         zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
388                         zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
389                 }
390         } else {
391                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
392                         zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
393                         zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
394                 }
395         }
396         pCf(z) = zdotc;
397 }
398 #else
399         _Complex float zdotc = 0.0;
400         if (incx == 1 && incy == 1) {
401                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
402                         zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
403                 }
404         } else {
405                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
406                         zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
407                 }
408         }
409         pCf(z) = zdotc;
410 }
411 #endif
412 static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
413         integer n = *n_, incx = *incx_, incy = *incy_, i;
414 #ifdef _MSC_VER
415         _Dcomplex zdotc = {0.0, 0.0};
416         if (incx == 1 && incy == 1) {
417                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
418                         zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
419                         zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
420                 }
421         } else {
422                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
423                         zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
424                         zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
425                 }
426         }
427         pCd(z) = zdotc;
428 }
429 #else
430         _Complex double zdotc = 0.0;
431         if (incx == 1 && incy == 1) {
432                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
433                         zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
434                 }
435         } else {
436                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
437                         zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
438                 }
439         }
440         pCd(z) = zdotc;
441 }
442 #endif  
443 static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
444         integer n = *n_, incx = *incx_, incy = *incy_, i;
445 #ifdef _MSC_VER
446         _Fcomplex zdotc = {0.0, 0.0};
447         if (incx == 1 && incy == 1) {
448                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
449                         zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
450                         zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
451                 }
452         } else {
453                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
454                         zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
455                         zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
456                 }
457         }
458         pCf(z) = zdotc;
459 }
460 #else
461         _Complex float zdotc = 0.0;
462         if (incx == 1 && incy == 1) {
463                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
464                         zdotc += Cf(&x[i]) * Cf(&y[i]);
465                 }
466         } else {
467                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
468                         zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
469                 }
470         }
471         pCf(z) = zdotc;
472 }
473 #endif
474 static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
475         integer n = *n_, incx = *incx_, incy = *incy_, i;
476 #ifdef _MSC_VER
477         _Dcomplex zdotc = {0.0, 0.0};
478         if (incx == 1 && incy == 1) {
479                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
480                         zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
481                         zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
482                 }
483         } else {
484                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
485                         zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
486                         zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
487                 }
488         }
489         pCd(z) = zdotc;
490 }
491 #else
492         _Complex double zdotc = 0.0;
493         if (incx == 1 && incy == 1) {
494                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
495                         zdotc += Cd(&x[i]) * Cd(&y[i]);
496                 }
497         } else {
498                 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
499                         zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
500                 }
501         }
502         pCd(z) = zdotc;
503 }
504 #endif
505 /*  -- translated by f2c (version 20000121).
506    You must link the resulting object file with the libraries:
507         -lf2c -lm   (in that order)
508 */
509
510
511
512
513 /* Table of constant values */
514
515 static integer c__1 = 1;
516
517 /* > \brief \b SLARFX applies an elementary reflector to a general rectangular matrix, with loop unrolling whe
518 n the reflector has order â‰¤ 10. */
519
520 /*  =========== DOCUMENTATION =========== */
521
522 /* Online html documentation available at */
523 /*            http://www.netlib.org/lapack/explore-html/ */
524
525 /* > \htmlonly */
526 /* > Download SLARFX + dependencies */
527 /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slarfx.
528 f"> */
529 /* > [TGZ]</a> */
530 /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slarfx.
531 f"> */
532 /* > [ZIP]</a> */
533 /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slarfx.
534 f"> */
535 /* > [TXT]</a> */
536 /* > \endhtmlonly */
537
538 /*  Definition: */
539 /*  =========== */
540
541 /*       SUBROUTINE SLARFX( SIDE, M, N, V, TAU, C, LDC, WORK ) */
542
543 /*       CHARACTER          SIDE */
544 /*       INTEGER            LDC, M, N */
545 /*       REAL               TAU */
546 /*       REAL               C( LDC, * ), V( * ), WORK( * ) */
547
548
549 /* > \par Purpose: */
550 /*  ============= */
551 /* > */
552 /* > \verbatim */
553 /* > */
554 /* > SLARFX applies a real elementary reflector H to a real m by n */
555 /* > matrix C, from either the left or the right. H is represented in the */
556 /* > form */
557 /* > */
558 /* >       H = I - tau * v * v**T */
559 /* > */
560 /* > where tau is a real scalar and v is a real vector. */
561 /* > */
562 /* > If tau = 0, then H is taken to be the unit matrix */
563 /* > */
564 /* > This version uses inline code if H has order < 11. */
565 /* > \endverbatim */
566
567 /*  Arguments: */
568 /*  ========== */
569
570 /* > \param[in] SIDE */
571 /* > \verbatim */
572 /* >          SIDE is CHARACTER*1 */
573 /* >          = 'L': form  H * C */
574 /* >          = 'R': form  C * H */
575 /* > \endverbatim */
576 /* > */
577 /* > \param[in] M */
578 /* > \verbatim */
579 /* >          M is INTEGER */
580 /* >          The number of rows of the matrix C. */
581 /* > \endverbatim */
582 /* > */
583 /* > \param[in] N */
584 /* > \verbatim */
585 /* >          N is INTEGER */
586 /* >          The number of columns of the matrix C. */
587 /* > \endverbatim */
588 /* > */
589 /* > \param[in] V */
590 /* > \verbatim */
591 /* >          V is REAL array, dimension (M) if SIDE = 'L' */
592 /* >                                     or (N) if SIDE = 'R' */
593 /* >          The vector v in the representation of H. */
594 /* > \endverbatim */
595 /* > */
596 /* > \param[in] TAU */
597 /* > \verbatim */
598 /* >          TAU is REAL */
599 /* >          The value tau in the representation of H. */
600 /* > \endverbatim */
601 /* > */
602 /* > \param[in,out] C */
603 /* > \verbatim */
604 /* >          C is REAL array, dimension (LDC,N) */
605 /* >          On entry, the m by n matrix C. */
606 /* >          On exit, C is overwritten by the matrix H * C if SIDE = 'L', */
607 /* >          or C * H if SIDE = 'R'. */
608 /* > \endverbatim */
609 /* > */
610 /* > \param[in] LDC */
611 /* > \verbatim */
612 /* >          LDC is INTEGER */
613 /* >          The leading dimension of the array C. LDC >= (1,M). */
614 /* > \endverbatim */
615 /* > */
616 /* > \param[out] WORK */
617 /* > \verbatim */
618 /* >          WORK is REAL array, dimension */
619 /* >                      (N) if SIDE = 'L' */
620 /* >                      or (M) if SIDE = 'R' */
621 /* >          WORK is not referenced if H has order < 11. */
622 /* > \endverbatim */
623
624 /*  Authors: */
625 /*  ======== */
626
627 /* > \author Univ. of Tennessee */
628 /* > \author Univ. of California Berkeley */
629 /* > \author Univ. of Colorado Denver */
630 /* > \author NAG Ltd. */
631
632 /* > \date December 2016 */
633
634 /* > \ingroup realOTHERauxiliary */
635
636 /*  ===================================================================== */
637 /* Subroutine */ int slarfx_(char *side, integer *m, integer *n, real *v, 
638         real *tau, real *c__, integer *ldc, real *work)
639 {
640     /* System generated locals */
641     integer c_dim1, c_offset, i__1;
642
643     /* Local variables */
644     integer j;
645     extern logical lsame_(char *, char *);
646     extern /* Subroutine */ int slarf_(char *, integer *, integer *, real *, 
647             integer *, real *, real *, integer *, real *);
648     real t1, t2, t3, t4, t5, t6, t7, t8, t9, v1, v2, v3, v4, v5, v6, v7, v8, 
649             v9, t10, v10, sum;
650
651
652 /*  -- LAPACK auxiliary routine (version 3.7.0) -- */
653 /*  -- LAPACK is a software package provided by Univ. of Tennessee,    -- */
654 /*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */
655 /*     December 2016 */
656
657
658 /*  ===================================================================== */
659
660
661     /* Parameter adjustments */
662     --v;
663     c_dim1 = *ldc;
664     c_offset = 1 + c_dim1 * 1;
665     c__ -= c_offset;
666     --work;
667
668     /* Function Body */
669     if (*tau == 0.f) {
670         return 0;
671     }
672     if (lsame_(side, "L")) {
673
674 /*        Form  H * C, where H has order m. */
675
676         switch (*m) {
677             case 1:  goto L10;
678             case 2:  goto L30;
679             case 3:  goto L50;
680             case 4:  goto L70;
681             case 5:  goto L90;
682             case 6:  goto L110;
683             case 7:  goto L130;
684             case 8:  goto L150;
685             case 9:  goto L170;
686             case 10:  goto L190;
687         }
688
689 /*        Code for general M */
690
691         slarf_(side, m, n, &v[1], &c__1, tau, &c__[c_offset], ldc, &work[1]);
692         goto L410;
693 L10:
694
695 /*        Special code for 1 x 1 Householder */
696
697         t1 = 1.f - *tau * v[1] * v[1];
698         i__1 = *n;
699         for (j = 1; j <= i__1; ++j) {
700             c__[j * c_dim1 + 1] = t1 * c__[j * c_dim1 + 1];
701 /* L20: */
702         }
703         goto L410;
704 L30:
705
706 /*        Special code for 2 x 2 Householder */
707
708         v1 = v[1];
709         t1 = *tau * v1;
710         v2 = v[2];
711         t2 = *tau * v2;
712         i__1 = *n;
713         for (j = 1; j <= i__1; ++j) {
714             sum = v1 * c__[j * c_dim1 + 1] + v2 * c__[j * c_dim1 + 2];
715             c__[j * c_dim1 + 1] -= sum * t1;
716             c__[j * c_dim1 + 2] -= sum * t2;
717 /* L40: */
718         }
719         goto L410;
720 L50:
721
722 /*        Special code for 3 x 3 Householder */
723
724         v1 = v[1];
725         t1 = *tau * v1;
726         v2 = v[2];
727         t2 = *tau * v2;
728         v3 = v[3];
729         t3 = *tau * v3;
730         i__1 = *n;
731         for (j = 1; j <= i__1; ++j) {
732             sum = v1 * c__[j * c_dim1 + 1] + v2 * c__[j * c_dim1 + 2] + v3 * 
733                     c__[j * c_dim1 + 3];
734             c__[j * c_dim1 + 1] -= sum * t1;
735             c__[j * c_dim1 + 2] -= sum * t2;
736             c__[j * c_dim1 + 3] -= sum * t3;
737 /* L60: */
738         }
739         goto L410;
740 L70:
741
742 /*        Special code for 4 x 4 Householder */
743
744         v1 = v[1];
745         t1 = *tau * v1;
746         v2 = v[2];
747         t2 = *tau * v2;
748         v3 = v[3];
749         t3 = *tau * v3;
750         v4 = v[4];
751         t4 = *tau * v4;
752         i__1 = *n;
753         for (j = 1; j <= i__1; ++j) {
754             sum = v1 * c__[j * c_dim1 + 1] + v2 * c__[j * c_dim1 + 2] + v3 * 
755                     c__[j * c_dim1 + 3] + v4 * c__[j * c_dim1 + 4];
756             c__[j * c_dim1 + 1] -= sum * t1;
757             c__[j * c_dim1 + 2] -= sum * t2;
758             c__[j * c_dim1 + 3] -= sum * t3;
759             c__[j * c_dim1 + 4] -= sum * t4;
760 /* L80: */
761         }
762         goto L410;
763 L90:
764
765 /*        Special code for 5 x 5 Householder */
766
767         v1 = v[1];
768         t1 = *tau * v1;
769         v2 = v[2];
770         t2 = *tau * v2;
771         v3 = v[3];
772         t3 = *tau * v3;
773         v4 = v[4];
774         t4 = *tau * v4;
775         v5 = v[5];
776         t5 = *tau * v5;
777         i__1 = *n;
778         for (j = 1; j <= i__1; ++j) {
779             sum = v1 * c__[j * c_dim1 + 1] + v2 * c__[j * c_dim1 + 2] + v3 * 
780                     c__[j * c_dim1 + 3] + v4 * c__[j * c_dim1 + 4] + v5 * c__[
781                     j * c_dim1 + 5];
782             c__[j * c_dim1 + 1] -= sum * t1;
783             c__[j * c_dim1 + 2] -= sum * t2;
784             c__[j * c_dim1 + 3] -= sum * t3;
785             c__[j * c_dim1 + 4] -= sum * t4;
786             c__[j * c_dim1 + 5] -= sum * t5;
787 /* L100: */
788         }
789         goto L410;
790 L110:
791
792 /*        Special code for 6 x 6 Householder */
793
794         v1 = v[1];
795         t1 = *tau * v1;
796         v2 = v[2];
797         t2 = *tau * v2;
798         v3 = v[3];
799         t3 = *tau * v3;
800         v4 = v[4];
801         t4 = *tau * v4;
802         v5 = v[5];
803         t5 = *tau * v5;
804         v6 = v[6];
805         t6 = *tau * v6;
806         i__1 = *n;
807         for (j = 1; j <= i__1; ++j) {
808             sum = v1 * c__[j * c_dim1 + 1] + v2 * c__[j * c_dim1 + 2] + v3 * 
809                     c__[j * c_dim1 + 3] + v4 * c__[j * c_dim1 + 4] + v5 * c__[
810                     j * c_dim1 + 5] + v6 * c__[j * c_dim1 + 6];
811             c__[j * c_dim1 + 1] -= sum * t1;
812             c__[j * c_dim1 + 2] -= sum * t2;
813             c__[j * c_dim1 + 3] -= sum * t3;
814             c__[j * c_dim1 + 4] -= sum * t4;
815             c__[j * c_dim1 + 5] -= sum * t5;
816             c__[j * c_dim1 + 6] -= sum * t6;
817 /* L120: */
818         }
819         goto L410;
820 L130:
821
822 /*        Special code for 7 x 7 Householder */
823
824         v1 = v[1];
825         t1 = *tau * v1;
826         v2 = v[2];
827         t2 = *tau * v2;
828         v3 = v[3];
829         t3 = *tau * v3;
830         v4 = v[4];
831         t4 = *tau * v4;
832         v5 = v[5];
833         t5 = *tau * v5;
834         v6 = v[6];
835         t6 = *tau * v6;
836         v7 = v[7];
837         t7 = *tau * v7;
838         i__1 = *n;
839         for (j = 1; j <= i__1; ++j) {
840             sum = v1 * c__[j * c_dim1 + 1] + v2 * c__[j * c_dim1 + 2] + v3 * 
841                     c__[j * c_dim1 + 3] + v4 * c__[j * c_dim1 + 4] + v5 * c__[
842                     j * c_dim1 + 5] + v6 * c__[j * c_dim1 + 6] + v7 * c__[j * 
843                     c_dim1 + 7];
844             c__[j * c_dim1 + 1] -= sum * t1;
845             c__[j * c_dim1 + 2] -= sum * t2;
846             c__[j * c_dim1 + 3] -= sum * t3;
847             c__[j * c_dim1 + 4] -= sum * t4;
848             c__[j * c_dim1 + 5] -= sum * t5;
849             c__[j * c_dim1 + 6] -= sum * t6;
850             c__[j * c_dim1 + 7] -= sum * t7;
851 /* L140: */
852         }
853         goto L410;
854 L150:
855
856 /*        Special code for 8 x 8 Householder */
857
858         v1 = v[1];
859         t1 = *tau * v1;
860         v2 = v[2];
861         t2 = *tau * v2;
862         v3 = v[3];
863         t3 = *tau * v3;
864         v4 = v[4];
865         t4 = *tau * v4;
866         v5 = v[5];
867         t5 = *tau * v5;
868         v6 = v[6];
869         t6 = *tau * v6;
870         v7 = v[7];
871         t7 = *tau * v7;
872         v8 = v[8];
873         t8 = *tau * v8;
874         i__1 = *n;
875         for (j = 1; j <= i__1; ++j) {
876             sum = v1 * c__[j * c_dim1 + 1] + v2 * c__[j * c_dim1 + 2] + v3 * 
877                     c__[j * c_dim1 + 3] + v4 * c__[j * c_dim1 + 4] + v5 * c__[
878                     j * c_dim1 + 5] + v6 * c__[j * c_dim1 + 6] + v7 * c__[j * 
879                     c_dim1 + 7] + v8 * c__[j * c_dim1 + 8];
880             c__[j * c_dim1 + 1] -= sum * t1;
881             c__[j * c_dim1 + 2] -= sum * t2;
882             c__[j * c_dim1 + 3] -= sum * t3;
883             c__[j * c_dim1 + 4] -= sum * t4;
884             c__[j * c_dim1 + 5] -= sum * t5;
885             c__[j * c_dim1 + 6] -= sum * t6;
886             c__[j * c_dim1 + 7] -= sum * t7;
887             c__[j * c_dim1 + 8] -= sum * t8;
888 /* L160: */
889         }
890         goto L410;
891 L170:
892
893 /*        Special code for 9 x 9 Householder */
894
895         v1 = v[1];
896         t1 = *tau * v1;
897         v2 = v[2];
898         t2 = *tau * v2;
899         v3 = v[3];
900         t3 = *tau * v3;
901         v4 = v[4];
902         t4 = *tau * v4;
903         v5 = v[5];
904         t5 = *tau * v5;
905         v6 = v[6];
906         t6 = *tau * v6;
907         v7 = v[7];
908         t7 = *tau * v7;
909         v8 = v[8];
910         t8 = *tau * v8;
911         v9 = v[9];
912         t9 = *tau * v9;
913         i__1 = *n;
914         for (j = 1; j <= i__1; ++j) {
915             sum = v1 * c__[j * c_dim1 + 1] + v2 * c__[j * c_dim1 + 2] + v3 * 
916                     c__[j * c_dim1 + 3] + v4 * c__[j * c_dim1 + 4] + v5 * c__[
917                     j * c_dim1 + 5] + v6 * c__[j * c_dim1 + 6] + v7 * c__[j * 
918                     c_dim1 + 7] + v8 * c__[j * c_dim1 + 8] + v9 * c__[j * 
919                     c_dim1 + 9];
920             c__[j * c_dim1 + 1] -= sum * t1;
921             c__[j * c_dim1 + 2] -= sum * t2;
922             c__[j * c_dim1 + 3] -= sum * t3;
923             c__[j * c_dim1 + 4] -= sum * t4;
924             c__[j * c_dim1 + 5] -= sum * t5;
925             c__[j * c_dim1 + 6] -= sum * t6;
926             c__[j * c_dim1 + 7] -= sum * t7;
927             c__[j * c_dim1 + 8] -= sum * t8;
928             c__[j * c_dim1 + 9] -= sum * t9;
929 /* L180: */
930         }
931         goto L410;
932 L190:
933
934 /*        Special code for 10 x 10 Householder */
935
936         v1 = v[1];
937         t1 = *tau * v1;
938         v2 = v[2];
939         t2 = *tau * v2;
940         v3 = v[3];
941         t3 = *tau * v3;
942         v4 = v[4];
943         t4 = *tau * v4;
944         v5 = v[5];
945         t5 = *tau * v5;
946         v6 = v[6];
947         t6 = *tau * v6;
948         v7 = v[7];
949         t7 = *tau * v7;
950         v8 = v[8];
951         t8 = *tau * v8;
952         v9 = v[9];
953         t9 = *tau * v9;
954         v10 = v[10];
955         t10 = *tau * v10;
956         i__1 = *n;
957         for (j = 1; j <= i__1; ++j) {
958             sum = v1 * c__[j * c_dim1 + 1] + v2 * c__[j * c_dim1 + 2] + v3 * 
959                     c__[j * c_dim1 + 3] + v4 * c__[j * c_dim1 + 4] + v5 * c__[
960                     j * c_dim1 + 5] + v6 * c__[j * c_dim1 + 6] + v7 * c__[j * 
961                     c_dim1 + 7] + v8 * c__[j * c_dim1 + 8] + v9 * c__[j * 
962                     c_dim1 + 9] + v10 * c__[j * c_dim1 + 10];
963             c__[j * c_dim1 + 1] -= sum * t1;
964             c__[j * c_dim1 + 2] -= sum * t2;
965             c__[j * c_dim1 + 3] -= sum * t3;
966             c__[j * c_dim1 + 4] -= sum * t4;
967             c__[j * c_dim1 + 5] -= sum * t5;
968             c__[j * c_dim1 + 6] -= sum * t6;
969             c__[j * c_dim1 + 7] -= sum * t7;
970             c__[j * c_dim1 + 8] -= sum * t8;
971             c__[j * c_dim1 + 9] -= sum * t9;
972             c__[j * c_dim1 + 10] -= sum * t10;
973 /* L200: */
974         }
975         goto L410;
976     } else {
977
978 /*        Form  C * H, where H has order n. */
979
980         switch (*n) {
981             case 1:  goto L210;
982             case 2:  goto L230;
983             case 3:  goto L250;
984             case 4:  goto L270;
985             case 5:  goto L290;
986             case 6:  goto L310;
987             case 7:  goto L330;
988             case 8:  goto L350;
989             case 9:  goto L370;
990             case 10:  goto L390;
991         }
992
993 /*        Code for general N */
994
995         slarf_(side, m, n, &v[1], &c__1, tau, &c__[c_offset], ldc, &work[1]);
996         goto L410;
997 L210:
998
999 /*        Special code for 1 x 1 Householder */
1000
1001         t1 = 1.f - *tau * v[1] * v[1];
1002         i__1 = *m;
1003         for (j = 1; j <= i__1; ++j) {
1004             c__[j + c_dim1] = t1 * c__[j + c_dim1];
1005 /* L220: */
1006         }
1007         goto L410;
1008 L230:
1009
1010 /*        Special code for 2 x 2 Householder */
1011
1012         v1 = v[1];
1013         t1 = *tau * v1;
1014         v2 = v[2];
1015         t2 = *tau * v2;
1016         i__1 = *m;
1017         for (j = 1; j <= i__1; ++j) {
1018             sum = v1 * c__[j + c_dim1] + v2 * c__[j + (c_dim1 << 1)];
1019             c__[j + c_dim1] -= sum * t1;
1020             c__[j + (c_dim1 << 1)] -= sum * t2;
1021 /* L240: */
1022         }
1023         goto L410;
1024 L250:
1025
1026 /*        Special code for 3 x 3 Householder */
1027
1028         v1 = v[1];
1029         t1 = *tau * v1;
1030         v2 = v[2];
1031         t2 = *tau * v2;
1032         v3 = v[3];
1033         t3 = *tau * v3;
1034         i__1 = *m;
1035         for (j = 1; j <= i__1; ++j) {
1036             sum = v1 * c__[j + c_dim1] + v2 * c__[j + (c_dim1 << 1)] + v3 * 
1037                     c__[j + c_dim1 * 3];
1038             c__[j + c_dim1] -= sum * t1;
1039             c__[j + (c_dim1 << 1)] -= sum * t2;
1040             c__[j + c_dim1 * 3] -= sum * t3;
1041 /* L260: */
1042         }
1043         goto L410;
1044 L270:
1045
1046 /*        Special code for 4 x 4 Householder */
1047
1048         v1 = v[1];
1049         t1 = *tau * v1;
1050         v2 = v[2];
1051         t2 = *tau * v2;
1052         v3 = v[3];
1053         t3 = *tau * v3;
1054         v4 = v[4];
1055         t4 = *tau * v4;
1056         i__1 = *m;
1057         for (j = 1; j <= i__1; ++j) {
1058             sum = v1 * c__[j + c_dim1] + v2 * c__[j + (c_dim1 << 1)] + v3 * 
1059                     c__[j + c_dim1 * 3] + v4 * c__[j + (c_dim1 << 2)];
1060             c__[j + c_dim1] -= sum * t1;
1061             c__[j + (c_dim1 << 1)] -= sum * t2;
1062             c__[j + c_dim1 * 3] -= sum * t3;
1063             c__[j + (c_dim1 << 2)] -= sum * t4;
1064 /* L280: */
1065         }
1066         goto L410;
1067 L290:
1068
1069 /*        Special code for 5 x 5 Householder */
1070
1071         v1 = v[1];
1072         t1 = *tau * v1;
1073         v2 = v[2];
1074         t2 = *tau * v2;
1075         v3 = v[3];
1076         t3 = *tau * v3;
1077         v4 = v[4];
1078         t4 = *tau * v4;
1079         v5 = v[5];
1080         t5 = *tau * v5;
1081         i__1 = *m;
1082         for (j = 1; j <= i__1; ++j) {
1083             sum = v1 * c__[j + c_dim1] + v2 * c__[j + (c_dim1 << 1)] + v3 * 
1084                     c__[j + c_dim1 * 3] + v4 * c__[j + (c_dim1 << 2)] + v5 * 
1085                     c__[j + c_dim1 * 5];
1086             c__[j + c_dim1] -= sum * t1;
1087             c__[j + (c_dim1 << 1)] -= sum * t2;
1088             c__[j + c_dim1 * 3] -= sum * t3;
1089             c__[j + (c_dim1 << 2)] -= sum * t4;
1090             c__[j + c_dim1 * 5] -= sum * t5;
1091 /* L300: */
1092         }
1093         goto L410;
1094 L310:
1095
1096 /*        Special code for 6 x 6 Householder */
1097
1098         v1 = v[1];
1099         t1 = *tau * v1;
1100         v2 = v[2];
1101         t2 = *tau * v2;
1102         v3 = v[3];
1103         t3 = *tau * v3;
1104         v4 = v[4];
1105         t4 = *tau * v4;
1106         v5 = v[5];
1107         t5 = *tau * v5;
1108         v6 = v[6];
1109         t6 = *tau * v6;
1110         i__1 = *m;
1111         for (j = 1; j <= i__1; ++j) {
1112             sum = v1 * c__[j + c_dim1] + v2 * c__[j + (c_dim1 << 1)] + v3 * 
1113                     c__[j + c_dim1 * 3] + v4 * c__[j + (c_dim1 << 2)] + v5 * 
1114                     c__[j + c_dim1 * 5] + v6 * c__[j + c_dim1 * 6];
1115             c__[j + c_dim1] -= sum * t1;
1116             c__[j + (c_dim1 << 1)] -= sum * t2;
1117             c__[j + c_dim1 * 3] -= sum * t3;
1118             c__[j + (c_dim1 << 2)] -= sum * t4;
1119             c__[j + c_dim1 * 5] -= sum * t5;
1120             c__[j + c_dim1 * 6] -= sum * t6;
1121 /* L320: */
1122         }
1123         goto L410;
1124 L330:
1125
1126 /*        Special code for 7 x 7 Householder */
1127
1128         v1 = v[1];
1129         t1 = *tau * v1;
1130         v2 = v[2];
1131         t2 = *tau * v2;
1132         v3 = v[3];
1133         t3 = *tau * v3;
1134         v4 = v[4];
1135         t4 = *tau * v4;
1136         v5 = v[5];
1137         t5 = *tau * v5;
1138         v6 = v[6];
1139         t6 = *tau * v6;
1140         v7 = v[7];
1141         t7 = *tau * v7;
1142         i__1 = *m;
1143         for (j = 1; j <= i__1; ++j) {
1144             sum = v1 * c__[j + c_dim1] + v2 * c__[j + (c_dim1 << 1)] + v3 * 
1145                     c__[j + c_dim1 * 3] + v4 * c__[j + (c_dim1 << 2)] + v5 * 
1146                     c__[j + c_dim1 * 5] + v6 * c__[j + c_dim1 * 6] + v7 * c__[
1147                     j + c_dim1 * 7];
1148             c__[j + c_dim1] -= sum * t1;
1149             c__[j + (c_dim1 << 1)] -= sum * t2;
1150             c__[j + c_dim1 * 3] -= sum * t3;
1151             c__[j + (c_dim1 << 2)] -= sum * t4;
1152             c__[j + c_dim1 * 5] -= sum * t5;
1153             c__[j + c_dim1 * 6] -= sum * t6;
1154             c__[j + c_dim1 * 7] -= sum * t7;
1155 /* L340: */
1156         }
1157         goto L410;
1158 L350:
1159
1160 /*        Special code for 8 x 8 Householder */
1161
1162         v1 = v[1];
1163         t1 = *tau * v1;
1164         v2 = v[2];
1165         t2 = *tau * v2;
1166         v3 = v[3];
1167         t3 = *tau * v3;
1168         v4 = v[4];
1169         t4 = *tau * v4;
1170         v5 = v[5];
1171         t5 = *tau * v5;
1172         v6 = v[6];
1173         t6 = *tau * v6;
1174         v7 = v[7];
1175         t7 = *tau * v7;
1176         v8 = v[8];
1177         t8 = *tau * v8;
1178         i__1 = *m;
1179         for (j = 1; j <= i__1; ++j) {
1180             sum = v1 * c__[j + c_dim1] + v2 * c__[j + (c_dim1 << 1)] + v3 * 
1181                     c__[j + c_dim1 * 3] + v4 * c__[j + (c_dim1 << 2)] + v5 * 
1182                     c__[j + c_dim1 * 5] + v6 * c__[j + c_dim1 * 6] + v7 * c__[
1183                     j + c_dim1 * 7] + v8 * c__[j + (c_dim1 << 3)];
1184             c__[j + c_dim1] -= sum * t1;
1185             c__[j + (c_dim1 << 1)] -= sum * t2;
1186             c__[j + c_dim1 * 3] -= sum * t3;
1187             c__[j + (c_dim1 << 2)] -= sum * t4;
1188             c__[j + c_dim1 * 5] -= sum * t5;
1189             c__[j + c_dim1 * 6] -= sum * t6;
1190             c__[j + c_dim1 * 7] -= sum * t7;
1191             c__[j + (c_dim1 << 3)] -= sum * t8;
1192 /* L360: */
1193         }
1194         goto L410;
1195 L370:
1196
1197 /*        Special code for 9 x 9 Householder */
1198
1199         v1 = v[1];
1200         t1 = *tau * v1;
1201         v2 = v[2];
1202         t2 = *tau * v2;
1203         v3 = v[3];
1204         t3 = *tau * v3;
1205         v4 = v[4];
1206         t4 = *tau * v4;
1207         v5 = v[5];
1208         t5 = *tau * v5;
1209         v6 = v[6];
1210         t6 = *tau * v6;
1211         v7 = v[7];
1212         t7 = *tau * v7;
1213         v8 = v[8];
1214         t8 = *tau * v8;
1215         v9 = v[9];
1216         t9 = *tau * v9;
1217         i__1 = *m;
1218         for (j = 1; j <= i__1; ++j) {
1219             sum = v1 * c__[j + c_dim1] + v2 * c__[j + (c_dim1 << 1)] + v3 * 
1220                     c__[j + c_dim1 * 3] + v4 * c__[j + (c_dim1 << 2)] + v5 * 
1221                     c__[j + c_dim1 * 5] + v6 * c__[j + c_dim1 * 6] + v7 * c__[
1222                     j + c_dim1 * 7] + v8 * c__[j + (c_dim1 << 3)] + v9 * c__[
1223                     j + c_dim1 * 9];
1224             c__[j + c_dim1] -= sum * t1;
1225             c__[j + (c_dim1 << 1)] -= sum * t2;
1226             c__[j + c_dim1 * 3] -= sum * t3;
1227             c__[j + (c_dim1 << 2)] -= sum * t4;
1228             c__[j + c_dim1 * 5] -= sum * t5;
1229             c__[j + c_dim1 * 6] -= sum * t6;
1230             c__[j + c_dim1 * 7] -= sum * t7;
1231             c__[j + (c_dim1 << 3)] -= sum * t8;
1232             c__[j + c_dim1 * 9] -= sum * t9;
1233 /* L380: */
1234         }
1235         goto L410;
1236 L390:
1237
1238 /*        Special code for 10 x 10 Householder */
1239
1240         v1 = v[1];
1241         t1 = *tau * v1;
1242         v2 = v[2];
1243         t2 = *tau * v2;
1244         v3 = v[3];
1245         t3 = *tau * v3;
1246         v4 = v[4];
1247         t4 = *tau * v4;
1248         v5 = v[5];
1249         t5 = *tau * v5;
1250         v6 = v[6];
1251         t6 = *tau * v6;
1252         v7 = v[7];
1253         t7 = *tau * v7;
1254         v8 = v[8];
1255         t8 = *tau * v8;
1256         v9 = v[9];
1257         t9 = *tau * v9;
1258         v10 = v[10];
1259         t10 = *tau * v10;
1260         i__1 = *m;
1261         for (j = 1; j <= i__1; ++j) {
1262             sum = v1 * c__[j + c_dim1] + v2 * c__[j + (c_dim1 << 1)] + v3 * 
1263                     c__[j + c_dim1 * 3] + v4 * c__[j + (c_dim1 << 2)] + v5 * 
1264                     c__[j + c_dim1 * 5] + v6 * c__[j + c_dim1 * 6] + v7 * c__[
1265                     j + c_dim1 * 7] + v8 * c__[j + (c_dim1 << 3)] + v9 * c__[
1266                     j + c_dim1 * 9] + v10 * c__[j + c_dim1 * 10];
1267             c__[j + c_dim1] -= sum * t1;
1268             c__[j + (c_dim1 << 1)] -= sum * t2;
1269             c__[j + c_dim1 * 3] -= sum * t3;
1270             c__[j + (c_dim1 << 2)] -= sum * t4;
1271             c__[j + c_dim1 * 5] -= sum * t5;
1272             c__[j + c_dim1 * 6] -= sum * t6;
1273             c__[j + c_dim1 * 7] -= sum * t7;
1274             c__[j + (c_dim1 << 3)] -= sum * t8;
1275             c__[j + c_dim1 * 9] -= sum * t9;
1276             c__[j + c_dim1 * 10] -= sum * t10;
1277 /* L400: */
1278         }
1279         goto L410;
1280     }
1281 L410:
1282     return 0;
1283
1284 /*     End of SLARFX */
1285
1286 } /* slarfx_ */
1287