LAPACK  3.6.0
LAPACK: Linear Algebra PACKage
Collaboration diagram for complex:

Functions

subroutine caxpy (N, CA, CX, INCX, CY, INCY)
 CAXPY More...
 
subroutine ccopy (N, CX, INCX, CY, INCY)
 CCOPY More...
 
complex function cdotc (N, CX, INCX, CY, INCY)
 CDOTC More...
 
complex function cdotu (N, CX, INCX, CY, INCY)
 CDOTU More...
 
subroutine crotg (CA, CB, C, S)
 CROTG More...
 
subroutine cscal (N, CA, CX, INCX)
 CSCAL More...
 
subroutine csrot (N, CX, INCX, CY, INCY, C, S)
 CSROT More...
 
subroutine csscal (N, SA, CX, INCX)
 CSSCAL More...
 
subroutine cswap (N, CX, INCX, CY, INCY)
 CSWAP More...
 

Detailed Description

This is the group of complex LEVEL 1 BLAS routines.

Function Documentation

subroutine caxpy ( integer  N,
complex  CA,
complex, dimension(*)  CX,
integer  INCX,
complex, dimension(*)  CY,
integer  INCY 
)

CAXPY

Purpose:
    CAXPY constant times a vector plus a vector.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
     jack dongarra, linpack, 3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 53 of file caxpy.f.

53 *
54 * -- Reference BLAS level1 routine (version 3.4.0) --
55 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
56 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
57 * November 2011
58 *
59 * .. Scalar Arguments ..
60  COMPLEX ca
61  INTEGER incx,incy,n
62 * ..
63 * .. Array Arguments ..
64  COMPLEX cx(*),cy(*)
65 * ..
66 *
67 * =====================================================================
68 *
69 * .. Local Scalars ..
70  INTEGER i,ix,iy
71 * ..
72 * .. External Functions ..
73  REAL scabs1
74  EXTERNAL scabs1
75 * ..
76  IF (n.LE.0) RETURN
77  IF (scabs1(ca).EQ.0.0e+0) RETURN
78  IF (incx.EQ.1 .AND. incy.EQ.1) THEN
79 *
80 * code for both increments equal to 1
81 *
82  DO i = 1,n
83  cy(i) = cy(i) + ca*cx(i)
84  END DO
85  ELSE
86 *
87 * code for unequal increments or equal increments
88 * not equal to 1
89 *
90  ix = 1
91  iy = 1
92  IF (incx.LT.0) ix = (-n+1)*incx + 1
93  IF (incy.LT.0) iy = (-n+1)*incy + 1
94  DO i = 1,n
95  cy(iy) = cy(iy) + ca*cx(ix)
96  ix = ix + incx
97  iy = iy + incy
98  END DO
99  END IF
100 *
101  RETURN
real function scabs1(Z)
SCABS1
Definition: scabs1.f:40
subroutine ccopy ( integer  N,
complex, dimension(*)  CX,
integer  INCX,
complex, dimension(*)  CY,
integer  INCY 
)

CCOPY

Purpose:
    CCOPY copies a vector x to a vector y.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
     jack dongarra, linpack, 3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 52 of file ccopy.f.

52 *
53 * -- Reference BLAS level1 routine (version 3.4.0) --
54 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
55 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
56 * November 2011
57 *
58 * .. Scalar Arguments ..
59  INTEGER incx,incy,n
60 * ..
61 * .. Array Arguments ..
62  COMPLEX cx(*),cy(*)
63 * ..
64 *
65 * =====================================================================
66 *
67 * .. Local Scalars ..
68  INTEGER i,ix,iy
69 * ..
70  IF (n.LE.0) RETURN
71  IF (incx.EQ.1 .AND. incy.EQ.1) THEN
72 *
73 * code for both increments equal to 1
74 *
75  DO i = 1,n
76  cy(i) = cx(i)
77  END DO
78  ELSE
79 *
80 * code for unequal increments or equal increments
81 * not equal to 1
82 *
83  ix = 1
84  iy = 1
85  IF (incx.LT.0) ix = (-n+1)*incx + 1
86  IF (incy.LT.0) iy = (-n+1)*incy + 1
87  DO i = 1,n
88  cy(iy) = cx(ix)
89  ix = ix + incx
90  iy = iy + incy
91  END DO
92  END IF
93  RETURN
complex function cdotc ( integer  N,
complex, dimension(*)  CX,
integer  INCX,
complex, dimension(*)  CY,
integer  INCY 
)

CDOTC

Purpose:
 CDOTC forms the dot product of two complex vectors
      CDOTC = X^H * Y
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2015
Further Details:
     jack dongarra, linpack,  3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 54 of file cdotc.f.

54 *
55 * -- Reference BLAS level1 routine (version 3.6.0) --
56 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
57 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
58 * November 2015
59 *
60 * .. Scalar Arguments ..
61  INTEGER incx,incy,n
62 * ..
63 * .. Array Arguments ..
64  COMPLEX cx(*),cy(*)
65 * ..
66 *
67 * =====================================================================
68 *
69 * .. Local Scalars ..
70  COMPLEX ctemp
71  INTEGER i,ix,iy
72 * ..
73 * .. Intrinsic Functions ..
74  INTRINSIC conjg
75 * ..
76  ctemp = (0.0,0.0)
77  cdotc = (0.0,0.0)
78  IF (n.LE.0) RETURN
79  IF (incx.EQ.1 .AND. incy.EQ.1) THEN
80 *
81 * code for both increments equal to 1
82 *
83  DO i = 1,n
84  ctemp = ctemp + conjg(cx(i))*cy(i)
85  END DO
86  ELSE
87 *
88 * code for unequal increments or equal increments
89 * not equal to 1
90 *
91  ix = 1
92  iy = 1
93  IF (incx.LT.0) ix = (-n+1)*incx + 1
94  IF (incy.LT.0) iy = (-n+1)*incy + 1
95  DO i = 1,n
96  ctemp = ctemp + conjg(cx(ix))*cy(iy)
97  ix = ix + incx
98  iy = iy + incy
99  END DO
100  END IF
101  cdotc = ctemp
102  RETURN
complex function cdotc(N, CX, INCX, CY, INCY)
CDOTC
Definition: cdotc.f:54

Here is the caller graph for this function:

complex function cdotu ( integer  N,
complex, dimension(*)  CX,
integer  INCX,
complex, dimension(*)  CY,
integer  INCY 
)

CDOTU

Purpose:
 CDOTU forms the dot product of two complex vectors
      CDOTU = X^T * Y
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2015
Further Details:
     jack dongarra, linpack, 3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 54 of file cdotu.f.

54 *
55 * -- Reference BLAS level1 routine (version 3.6.0) --
56 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
57 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
58 * November 2015
59 *
60 * .. Scalar Arguments ..
61  INTEGER incx,incy,n
62 * ..
63 * .. Array Arguments ..
64  COMPLEX cx(*),cy(*)
65 * ..
66 *
67 * =====================================================================
68 *
69 * .. Local Scalars ..
70  COMPLEX ctemp
71  INTEGER i,ix,iy
72 * ..
73  ctemp = (0.0,0.0)
74  cdotu = (0.0,0.0)
75  IF (n.LE.0) RETURN
76  IF (incx.EQ.1 .AND. incy.EQ.1) THEN
77 *
78 * code for both increments equal to 1
79 *
80  DO i = 1,n
81  ctemp = ctemp + cx(i)*cy(i)
82  END DO
83  ELSE
84 *
85 * code for unequal increments or equal increments
86 * not equal to 1
87 *
88  ix = 1
89  iy = 1
90  IF (incx.LT.0) ix = (-n+1)*incx + 1
91  IF (incy.LT.0) iy = (-n+1)*incy + 1
92  DO i = 1,n
93  ctemp = ctemp + cx(ix)*cy(iy)
94  ix = ix + incx
95  iy = iy + incy
96  END DO
97  END IF
98  cdotu = ctemp
99  RETURN
complex function cdotu(N, CX, INCX, CY, INCY)
CDOTU
Definition: cdotu.f:54

Here is the caller graph for this function:

subroutine crotg ( complex  CA,
complex  CB,
real  C,
complex  S 
)

CROTG

Purpose:
 CROTG determines a complex Givens rotation.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 41 of file crotg.f.

41 *
42 * -- Reference BLAS level1 routine (version 3.4.0) --
43 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
44 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
45 * November 2011
46 *
47 * .. Scalar Arguments ..
48  COMPLEX ca,cb,s
49  REAL c
50 * ..
51 *
52 * =====================================================================
53 *
54 * .. Local Scalars ..
55  COMPLEX alpha
56  REAL norm,scale
57 * ..
58 * .. Intrinsic Functions ..
59  INTRINSIC cabs,conjg,sqrt
60 * ..
61  IF (cabs(ca).EQ.0.) THEN
62  c = 0.
63  s = (1.,0.)
64  ca = cb
65  ELSE
66  scale = cabs(ca) + cabs(cb)
67  norm = scale*sqrt((cabs(ca/scale))**2+ (cabs(cb/scale))**2)
68  alpha = ca/cabs(ca)
69  c = cabs(ca)/norm
70  s = alpha*conjg(cb)/norm
71  ca = alpha*norm
72  END IF
73  RETURN

Here is the caller graph for this function:

subroutine cscal ( integer  N,
complex  CA,
complex, dimension(*)  CX,
integer  INCX 
)

CSCAL

Purpose:
    CSCAL scales a vector by a constant.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
     jack dongarra, linpack,  3/11/78.
     modified 3/93 to return if incx .le. 0.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 54 of file cscal.f.

54 *
55 * -- Reference BLAS level1 routine (version 3.4.0) --
56 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
57 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
58 * November 2011
59 *
60 * .. Scalar Arguments ..
61  COMPLEX ca
62  INTEGER incx,n
63 * ..
64 * .. Array Arguments ..
65  COMPLEX cx(*)
66 * ..
67 *
68 * =====================================================================
69 *
70 * .. Local Scalars ..
71  INTEGER i,nincx
72 * ..
73  IF (n.LE.0 .OR. incx.LE.0) RETURN
74  IF (incx.EQ.1) THEN
75 *
76 * code for increment equal to 1
77 *
78  DO i = 1,n
79  cx(i) = ca*cx(i)
80  END DO
81  ELSE
82 *
83 * code for increment not equal to 1
84 *
85  nincx = n*incx
86  DO i = 1,nincx,incx
87  cx(i) = ca*cx(i)
88  END DO
89  END IF
90  RETURN
subroutine csrot ( integer  N,
complex, dimension( * )  CX,
integer  INCX,
complex, dimension( * )  CY,
integer  INCY,
real  C,
real  S 
)

CSROT

Purpose:
 CSROT applies a plane rotation, where the cos and sin (c and s) are real
 and the vectors cx and cy are complex.
 jack dongarra, linpack, 3/11/78.
Parameters
[in]N
          N is INTEGER
           On entry, N specifies the order of the vectors cx and cy.
           N must be at least zero.
[in,out]CX
          CX is COMPLEX array, dimension at least
           ( 1 + ( N - 1 )*abs( INCX ) ).
           Before entry, the incremented array CX must contain the n
           element vector cx. On exit, CX is overwritten by the updated
           vector cx.
[in]INCX
          INCX is INTEGER
           On entry, INCX specifies the increment for the elements of
           CX. INCX must not be zero.
[in,out]CY
          CY is COMPLEX array, dimension at least
           ( 1 + ( N - 1 )*abs( INCY ) ).
           Before entry, the incremented array CY must contain the n
           element vector cy. On exit, CY is overwritten by the updated
           vector cy.
[in]INCY
          INCY is INTEGER
           On entry, INCY specifies the increment for the elements of
           CY. INCY must not be zero.
[in]C
          C is REAL
           On entry, C specifies the cosine, cos.
[in]S
          S is REAL
           On entry, S specifies the sine, sin.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 100 of file csrot.f.

100 *
101 * -- Reference BLAS level1 routine (version 3.4.0) --
102 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
103 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
104 * November 2011
105 *
106 * .. Scalar Arguments ..
107  INTEGER incx, incy, n
108  REAL c, s
109 * ..
110 * .. Array Arguments ..
111  COMPLEX cx( * ), cy( * )
112 * ..
113 *
114 * =====================================================================
115 *
116 * .. Local Scalars ..
117  INTEGER i, ix, iy
118  COMPLEX ctemp
119 * ..
120 * .. Executable Statements ..
121 *
122  IF( n.LE.0 )
123  $ RETURN
124  IF( incx.EQ.1 .AND. incy.EQ.1 ) THEN
125 *
126 * code for both increments equal to 1
127 *
128  DO i = 1, n
129  ctemp = c*cx( i ) + s*cy( i )
130  cy( i ) = c*cy( i ) - s*cx( i )
131  cx( i ) = ctemp
132  END DO
133  ELSE
134 *
135 * code for unequal increments or equal increments not equal
136 * to 1
137 *
138  ix = 1
139  iy = 1
140  IF( incx.LT.0 )
141  $ ix = ( -n+1 )*incx + 1
142  IF( incy.LT.0 )
143  $ iy = ( -n+1 )*incy + 1
144  DO i = 1, n
145  ctemp = c*cx( ix ) + s*cy( iy )
146  cy( iy ) = c*cy( iy ) - s*cx( ix )
147  cx( ix ) = ctemp
148  ix = ix + incx
149  iy = iy + incy
150  END DO
151  END IF
152  RETURN

Here is the caller graph for this function:

subroutine csscal ( integer  N,
real  SA,
complex, dimension(*)  CX,
integer  INCX 
)

CSSCAL

Purpose:
    CSSCAL scales a complex vector by a real constant.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
     jack dongarra, linpack, 3/11/78.
     modified 3/93 to return if incx .le. 0.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 54 of file csscal.f.

54 *
55 * -- Reference BLAS level1 routine (version 3.4.0) --
56 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
57 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
58 * November 2011
59 *
60 * .. Scalar Arguments ..
61  REAL sa
62  INTEGER incx,n
63 * ..
64 * .. Array Arguments ..
65  COMPLEX cx(*)
66 * ..
67 *
68 * =====================================================================
69 *
70 * .. Local Scalars ..
71  INTEGER i,nincx
72 * ..
73 * .. Intrinsic Functions ..
74  INTRINSIC aimag,cmplx,real
75 * ..
76  IF (n.LE.0 .OR. incx.LE.0) RETURN
77  IF (incx.EQ.1) THEN
78 *
79 * code for increment equal to 1
80 *
81  DO i = 1,n
82  cx(i) = cmplx(sa*REAL(CX(I)),sa*aimag(cx(i)))
83  END DO
84  ELSE
85 *
86 * code for increment not equal to 1
87 *
88  nincx = n*incx
89  DO i = 1,nincx,incx
90  cx(i) = cmplx(sa*REAL(CX(I)),sa*aimag(cx(i)))
91  END DO
92  END IF
93  RETURN
subroutine cswap ( integer  N,
complex, dimension(*)  CX,
integer  INCX,
complex, dimension(*)  CY,
integer  INCY 
)

CSWAP

Purpose:
   CSWAP interchanges two vectors.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
     jack dongarra, linpack, 3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 52 of file cswap.f.

52 *
53 * -- Reference BLAS level1 routine (version 3.4.0) --
54 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
55 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
56 * November 2011
57 *
58 * .. Scalar Arguments ..
59  INTEGER incx,incy,n
60 * ..
61 * .. Array Arguments ..
62  COMPLEX cx(*),cy(*)
63 * ..
64 *
65 * =====================================================================
66 *
67 * .. Local Scalars ..
68  COMPLEX ctemp
69  INTEGER i,ix,iy
70 * ..
71  IF (n.LE.0) RETURN
72  IF (incx.EQ.1 .AND. incy.EQ.1) THEN
73 *
74 * code for both increments equal to 1
75  DO i = 1,n
76  ctemp = cx(i)
77  cx(i) = cy(i)
78  cy(i) = ctemp
79  END DO
80  ELSE
81 *
82 * code for unequal increments or equal increments not equal
83 * to 1
84 *
85  ix = 1
86  iy = 1
87  IF (incx.LT.0) ix = (-n+1)*incx + 1
88  IF (incy.LT.0) iy = (-n+1)*incy + 1
89  DO i = 1,n
90  ctemp = cx(ix)
91  cx(ix) = cy(iy)
92  cy(iy) = ctemp
93  ix = ix + incx
94  iy = iy + incy
95  END DO
96  END IF
97  RETURN