Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

i?amax

Finds the index of the element with maximum absolute value.

Syntax

index
=
isamax
(
n
,
x
,
incx
)
index
=
idamax
(
n
,
x
,
incx
)
index
=
icamax
(
n
,
x
,
incx
)
index
=
izamax
(
n
,
x
,
incx
)
index
=
iamax
(
x
)
Include Files
  • mkl.fi
    ,
    blas.f90
Description
Given a vector
x
, the
i?amax
functions return the position of the vector element
x
(
i
)
that has the largest absolute value for real flavors, or the largest sum
|Re(
x
[
i
])|+|Im(
x
[
i
])|
for complex flavors.
If either
n
or
incx
are not positive, the routine returns
0
.
If more than one vector element is found with the same largest absolute value, the index of the first one encountered is returned.
If the vector contains
NaN
values, then the routine returns the index of the first
NaN
.
Input Parameters
n
INTEGER
.
Specifies the number of elements in vector
x
.
x
REAL
for
isamax
DOUBLE PRECISION
for
idamax
COMPLEX
for
icamax
DOUBLE COMPLEX
for
izamax
Array, size at least
(1+(
n
-1)*abs(
incx
))
.
incx
INTEGER
.
Specifies the increment for the elements of
x
.
Output Parameters
index
INTEGER
. Contains the position of vector element that has the largest absolute value such that
x
(
index
)
has the largest absolute value.
BLAS 95 Interface Notes
Functions and routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see BLAS 95 Interface Conventions.
Specific details for the function
iamax
interface are the following:
x
Holds the vector with the number of elements
n
.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804