LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
integer function icamax ( integer  N,
complex, dimension(*)  CX,
integer  INCX 
)

ICAMAX

Purpose:
    ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
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 3/93 to return if incx .le. 0.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 53 of file icamax.f.

53 *
54 * -- Reference BLAS level1 routine (version 3.6.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 2015
58 *
59 * .. Scalar Arguments ..
60  INTEGER incx,n
61 * ..
62 * .. Array Arguments ..
63  COMPLEX cx(*)
64 * ..
65 *
66 * =====================================================================
67 *
68 * .. Local Scalars ..
69  REAL smax
70  INTEGER i,ix
71 * ..
72 * .. External Functions ..
73  REAL scabs1
74  EXTERNAL scabs1
75 * ..
76  icamax = 0
77  IF (n.LT.1 .OR. incx.LE.0) RETURN
78  icamax = 1
79  IF (n.EQ.1) RETURN
80  IF (incx.EQ.1) THEN
81 *
82 * code for increment equal to 1
83 *
84  smax = scabs1(cx(1))
85  DO i = 2,n
86  IF (scabs1(cx(i)).GT.smax) THEN
87  icamax = i
88  smax = scabs1(cx(i))
89  END IF
90  END DO
91  ELSE
92 *
93 * code for increment not equal to 1
94 *
95  ix = 1
96  smax = scabs1(cx(1))
97  ix = ix + incx
98  DO i = 2,n
99  IF (scabs1(cx(ix)).GT.smax) THEN
100  icamax = i
101  smax = scabs1(cx(ix))
102  END IF
103  ix = ix + incx
104  END DO
105  END IF
106  RETURN
integer function icamax(N, CX, INCX)
ICAMAX
Definition: icamax.f:53
real function scabs1(Z)
SCABS1
Definition: scabs1.f:40

Here is the caller graph for this function: