LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ izamax()

integer function izamax ( integer  n,
complex*16, dimension(*)  zx,
integer  incx 
)

IZAMAX

Purpose:
    IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
Parameters
[in]N
          N is INTEGER
         number of elements in input vector(s)
[in]ZX
          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
[in]INCX
          INCX is INTEGER
         storage spacing between elements of ZX
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
     jack dongarra, 1/15/85.
     modified 3/93 to return if incx .le. 0.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 70 of file izamax.f.

71*
72* -- Reference BLAS level1 routine --
73* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
74* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
75*
76* .. Scalar Arguments ..
77 INTEGER INCX,N
78* ..
79* .. Array Arguments ..
80 COMPLEX*16 ZX(*)
81* ..
82*
83* =====================================================================
84*
85* .. Local Scalars ..
86 DOUBLE PRECISION DMAX
87 INTEGER I,IX
88* ..
89* .. External Functions ..
90 DOUBLE PRECISION DCABS1
91 EXTERNAL dcabs1
92* ..
93 izamax = 0
94 IF (n.LT.1 .OR. incx.LE.0) RETURN
95 izamax = 1
96 IF (n.EQ.1) RETURN
97 IF (incx.EQ.1) THEN
98*
99* code for increment equal to 1
100*
101 dmax = dcabs1(zx(1))
102 DO i = 2,n
103 IF (dcabs1(zx(i)).GT.dmax) THEN
104 izamax = i
105 dmax = dcabs1(zx(i))
106 END IF
107 END DO
108 ELSE
109*
110* code for increment not equal to 1
111*
112 ix = 1
113 dmax = dcabs1(zx(1))
114 ix = ix + incx
115 DO i = 2,n
116 IF (dcabs1(zx(ix)).GT.dmax) THEN
117 izamax = i
118 dmax = dcabs1(zx(ix))
119 END IF
120 ix = ix + incx
121 END DO
122 END IF
123 RETURN
124*
125* End of IZAMAX
126*
double precision function dcabs1(z)
DCABS1
Definition dcabs1.f:47
integer function izamax(n, zx, incx)
IZAMAX
Definition izamax.f:71
Here is the call graph for this function:
Here is the caller graph for this function: