00001 /* slartv.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 slartv_(integer *n, real *x, integer *incx, real *y, 00017 integer *incy, real *c__, real *s, integer *incc) 00018 { 00019 /* System generated locals */ 00020 integer i__1; 00021 00022 /* Local variables */ 00023 integer i__, ic, ix, iy; 00024 real xi, yi; 00025 00026 00027 /* -- LAPACK auxiliary routine (version 3.2) -- */ 00028 /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */ 00029 /* November 2006 */ 00030 00031 /* .. Scalar Arguments .. */ 00032 /* .. */ 00033 /* .. Array Arguments .. */ 00034 /* .. */ 00035 00036 /* Purpose */ 00037 /* ======= */ 00038 00039 /* SLARTV applies a vector of real plane rotations to elements of the */ 00040 /* real vectors x and y. For i = 1,2,...,n */ 00041 00042 /* ( x(i) ) := ( c(i) s(i) ) ( x(i) ) */ 00043 /* ( y(i) ) ( -s(i) c(i) ) ( y(i) ) */ 00044 00045 /* Arguments */ 00046 /* ========= */ 00047 00048 /* N (input) INTEGER */ 00049 /* The number of plane rotations to be applied. */ 00050 00051 /* X (input/output) REAL array, */ 00052 /* dimension (1+(N-1)*INCX) */ 00053 /* The vector x. */ 00054 00055 /* INCX (input) INTEGER */ 00056 /* The increment between elements of X. INCX > 0. */ 00057 00058 /* Y (input/output) REAL array, */ 00059 /* dimension (1+(N-1)*INCY) */ 00060 /* The vector y. */ 00061 00062 /* INCY (input) INTEGER */ 00063 /* The increment between elements of Y. INCY > 0. */ 00064 00065 /* C (input) REAL array, dimension (1+(N-1)*INCC) */ 00066 /* The cosines of the plane rotations. */ 00067 00068 /* S (input) REAL array, dimension (1+(N-1)*INCC) */ 00069 /* The sines of the plane rotations. */ 00070 00071 /* INCC (input) INTEGER */ 00072 /* The increment between elements of C and S. INCC > 0. */ 00073 00074 /* ===================================================================== */ 00075 00076 /* .. Local Scalars .. */ 00077 /* .. */ 00078 /* .. Executable Statements .. */ 00079 00080 /* Parameter adjustments */ 00081 --s; 00082 --c__; 00083 --y; 00084 --x; 00085 00086 /* Function Body */ 00087 ix = 1; 00088 iy = 1; 00089 ic = 1; 00090 i__1 = *n; 00091 for (i__ = 1; i__ <= i__1; ++i__) { 00092 xi = x[ix]; 00093 yi = y[iy]; 00094 x[ix] = c__[ic] * xi + s[ic] * yi; 00095 y[iy] = c__[ic] * yi - s[ic] * xi; 00096 ix += *incx; 00097 iy += *incy; 00098 ic += *incc; 00099 /* L10: */ 00100 } 00101 return 0; 00102 00103 /* End of SLARTV */ 00104 00105 } /* slartv_ */