Blame thirdparty/superlu/SuperLU_4.1/TESTING/MATGEN/zlacgv.c
|
kusano |
7d535a |
#include "f2c.h"
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
/* Subroutine */ int zlacgv_(integer *n, doublecomplex *x, integer *incx)
|
|
kusano |
7d535a |
{
|
|
kusano |
7d535a |
/* -- LAPACK auxiliary routine (version 2.0) --
|
|
kusano |
7d535a |
Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
|
|
kusano |
7d535a |
Courant Institute, Argonne National Lab, and Rice University
|
|
kusano |
7d535a |
October 31, 1992
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Purpose
|
|
kusano |
7d535a |
=======
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
ZLACGV conjugates a complex vector of length N.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Arguments
|
|
kusano |
7d535a |
=========
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
N (input) INTEGER
|
|
kusano |
7d535a |
The length of the vector X. N >= 0.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
X (input/output) COMPLEX*16 array, dimension
|
|
kusano |
7d535a |
(1+(N-1)*abs(INCX))
|
|
kusano |
7d535a |
On entry, the vector of length N to be conjugated.
|
|
kusano |
7d535a |
On exit, X is overwritten with conjg(X).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
INCX (input) INTEGER
|
|
kusano |
7d535a |
The spacing between successive elements of X.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
=====================================================================
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Parameter adjustments
|
|
kusano |
7d535a |
Function Body */
|
|
kusano |
7d535a |
/* System generated locals */
|
|
kusano |
7d535a |
integer i__1, i__2;
|
|
kusano |
7d535a |
doublecomplex z__1;
|
|
kusano |
7d535a |
/* Builtin functions */
|
|
kusano |
7d535a |
void d_cnjg(doublecomplex *, doublecomplex *);
|
|
kusano |
7d535a |
/* Local variables */
|
|
kusano |
7d535a |
static integer ioff, i;
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#define X(I) x[(I)-1]
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
if (*incx == 1) {
|
|
kusano |
7d535a |
i__1 = *n;
|
|
kusano |
7d535a |
for (i = 1; i <= *n; ++i) {
|
|
kusano |
7d535a |
i__2 = i;
|
|
kusano |
7d535a |
d_cnjg(&z__1, &X(i));
|
|
kusano |
7d535a |
X(i).r = z__1.r, X(i).i = z__1.i;
|
|
kusano |
7d535a |
/* L10: */
|
|
kusano |
7d535a |
}
|
|
kusano |
7d535a |
} else {
|
|
kusano |
7d535a |
ioff = 1;
|
|
kusano |
7d535a |
if (*incx < 0) {
|
|
kusano |
7d535a |
ioff = 1 - (*n - 1) * *incx;
|
|
kusano |
7d535a |
}
|
|
kusano |
7d535a |
i__1 = *n;
|
|
kusano |
7d535a |
for (i = 1; i <= *n; ++i) {
|
|
kusano |
7d535a |
i__2 = ioff;
|
|
kusano |
7d535a |
d_cnjg(&z__1, &X(ioff));
|
|
kusano |
7d535a |
X(ioff).r = z__1.r, X(ioff).i = z__1.i;
|
|
kusano |
7d535a |
ioff += *incx;
|
|
kusano |
7d535a |
/* L20: */
|
|
kusano |
7d535a |
}
|
|
kusano |
7d535a |
}
|
|
kusano |
7d535a |
return 0;
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
/* End of ZLACGV */
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
} /* zlacgv_ */
|
|
kusano |
7d535a |
|