00001 /* clacgv.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 clacgv_(integer *n, complex *x, integer *incx) 00017 { 00018 /* System generated locals */ 00019 integer i__1, i__2; 00020 complex q__1; 00021 00022 /* Builtin functions */ 00023 void r_cnjg(complex *, complex *); 00024 00025 /* Local variables */ 00026 integer i__, ioff; 00027 00028 00029 /* -- LAPACK auxiliary routine (version 3.2) -- */ 00030 /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */ 00031 /* November 2006 */ 00032 00033 /* .. Scalar Arguments .. */ 00034 /* .. */ 00035 /* .. Array Arguments .. */ 00036 /* .. */ 00037 00038 /* Purpose */ 00039 /* ======= */ 00040 00041 /* CLACGV conjugates a complex vector of length N. */ 00042 00043 /* Arguments */ 00044 /* ========= */ 00045 00046 /* N (input) INTEGER */ 00047 /* The length of the vector X. N >= 0. */ 00048 00049 /* X (input/output) COMPLEX array, dimension */ 00050 /* (1+(N-1)*abs(INCX)) */ 00051 /* On entry, the vector of length N to be conjugated. */ 00052 /* On exit, X is overwritten with conjg(X). */ 00053 00054 /* INCX (input) INTEGER */ 00055 /* The spacing between successive elements of X. */ 00056 00057 /* ===================================================================== */ 00058 00059 /* .. Local Scalars .. */ 00060 /* .. */ 00061 /* .. Intrinsic Functions .. */ 00062 /* .. */ 00063 /* .. Executable Statements .. */ 00064 00065 /* Parameter adjustments */ 00066 --x; 00067 00068 /* Function Body */ 00069 if (*incx == 1) { 00070 i__1 = *n; 00071 for (i__ = 1; i__ <= i__1; ++i__) { 00072 i__2 = i__; 00073 r_cnjg(&q__1, &x[i__]); 00074 x[i__2].r = q__1.r, x[i__2].i = q__1.i; 00075 /* L10: */ 00076 } 00077 } else { 00078 ioff = 1; 00079 if (*incx < 0) { 00080 ioff = 1 - (*n - 1) * *incx; 00081 } 00082 i__1 = *n; 00083 for (i__ = 1; i__ <= i__1; ++i__) { 00084 i__2 = ioff; 00085 r_cnjg(&q__1, &x[ioff]); 00086 x[i__2].r = q__1.r, x[i__2].i = q__1.i; 00087 ioff += *incx; 00088 /* L20: */ 00089 } 00090 } 00091 return 0; 00092 00093 /* End of CLACGV */ 00094 00095 } /* clacgv_ */