zlartv.c
Go to the documentation of this file.
00001 /* zlartv.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Subroutine */ int zlartv_(integer *n, doublecomplex *x, integer *incx, 
00017         doublecomplex *y, integer *incy, doublereal *c__, doublecomplex *s, 
00018         integer *incc)
00019 {
00020     /* System generated locals */
00021     integer i__1, i__2, i__3, i__4;
00022     doublecomplex z__1, z__2, z__3, z__4;
00023 
00024     /* Builtin functions */
00025     void d_cnjg(doublecomplex *, doublecomplex *);
00026 
00027     /* Local variables */
00028     integer i__, ic, ix, iy;
00029     doublecomplex xi, yi;
00030 
00031 
00032 /*  -- LAPACK auxiliary routine (version 3.2) -- */
00033 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00034 /*     November 2006 */
00035 
00036 /*     .. Scalar Arguments .. */
00037 /*     .. */
00038 /*     .. Array Arguments .. */
00039 /*     .. */
00040 
00041 /*  Purpose */
00042 /*  ======= */
00043 
00044 /*  ZLARTV applies a vector of complex plane rotations with real cosines */
00045 /*  to elements of the complex vectors x and y. For i = 1,2,...,n */
00046 
00047 /*     ( x(i) ) := (        c(i)   s(i) ) ( x(i) ) */
00048 /*     ( y(i) )    ( -conjg(s(i))  c(i) ) ( y(i) ) */
00049 
00050 /*  Arguments */
00051 /*  ========= */
00052 
00053 /*  N       (input) INTEGER */
00054 /*          The number of plane rotations to be applied. */
00055 
00056 /*  X       (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCX) */
00057 /*          The vector x. */
00058 
00059 /*  INCX    (input) INTEGER */
00060 /*          The increment between elements of X. INCX > 0. */
00061 
00062 /*  Y       (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCY) */
00063 /*          The vector y. */
00064 
00065 /*  INCY    (input) INTEGER */
00066 /*          The increment between elements of Y. INCY > 0. */
00067 
00068 /*  C       (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC) */
00069 /*          The cosines of the plane rotations. */
00070 
00071 /*  S       (input) COMPLEX*16 array, dimension (1+(N-1)*INCC) */
00072 /*          The sines of the plane rotations. */
00073 
00074 /*  INCC    (input) INTEGER */
00075 /*          The increment between elements of C and S. INCC > 0. */
00076 
00077 /*  ===================================================================== */
00078 
00079 /*     .. Local Scalars .. */
00080 /*     .. */
00081 /*     .. Intrinsic Functions .. */
00082 /*     .. */
00083 /*     .. Executable Statements .. */
00084 
00085     /* Parameter adjustments */
00086     --s;
00087     --c__;
00088     --y;
00089     --x;
00090 
00091     /* Function Body */
00092     ix = 1;
00093     iy = 1;
00094     ic = 1;
00095     i__1 = *n;
00096     for (i__ = 1; i__ <= i__1; ++i__) {
00097         i__2 = ix;
00098         xi.r = x[i__2].r, xi.i = x[i__2].i;
00099         i__2 = iy;
00100         yi.r = y[i__2].r, yi.i = y[i__2].i;
00101         i__2 = ix;
00102         i__3 = ic;
00103         z__2.r = c__[i__3] * xi.r, z__2.i = c__[i__3] * xi.i;
00104         i__4 = ic;
00105         z__3.r = s[i__4].r * yi.r - s[i__4].i * yi.i, z__3.i = s[i__4].r * 
00106                 yi.i + s[i__4].i * yi.r;
00107         z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
00108         x[i__2].r = z__1.r, x[i__2].i = z__1.i;
00109         i__2 = iy;
00110         i__3 = ic;
00111         z__2.r = c__[i__3] * yi.r, z__2.i = c__[i__3] * yi.i;
00112         d_cnjg(&z__4, &s[ic]);
00113         z__3.r = z__4.r * xi.r - z__4.i * xi.i, z__3.i = z__4.r * xi.i + 
00114                 z__4.i * xi.r;
00115         z__1.r = z__2.r - z__3.r, z__1.i = z__2.i - z__3.i;
00116         y[i__2].r = z__1.r, y[i__2].i = z__1.i;
00117         ix += *incx;
00118         iy += *incy;
00119         ic += *incc;
00120 /* L10: */
00121     }
00122     return 0;
00123 
00124 /*     End of ZLARTV */
00125 
00126 } /* zlartv_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:41