p?max1

Finds the index of the element whose real part has maximum absolute value (similar to the Level 1 PBLAS p?amax, but using the absolute value to the real part).

Syntax

Fortran:

call pcmax1(n, amax, indx, x, ix, jx, descx, incx)

call pzmax1(n, amax, indx, x, ix, jx, descx, incx)

C:

void pcmax1 (MKL_INT *n , MKL_Complex8 *amax , MKL_INT *indx , MKL_Complex8 *x , MKL_INT *ix , MKL_INT *jx , MKL_INT *descx , MKL_INT *incx );

void pzmax1 (MKL_INT *n , MKL_Complex16 *amax , MKL_INT *indx , MKL_Complex16 *x , MKL_INT *ix , MKL_INT *jx , MKL_INT *descx , MKL_INT *incx );

Include Files

  • C: mkl_scalapack.h

Description

The p?max1 routine computes the global index of the maximum element in absolute value of a distributed vector sub(x). The global index is returned in indx and the value is returned in amax, where sub(x) denotes X(ix:ix+n-1, jx) if incx = 1, X(ix, jx:jx+n-1) if incx = m_x.

Input Parameters

n

(global) pointer to INTEGER. The number of components of the distributed vector sub(x). n 0.

x

(local)

COMPLEX for pcmax1.

COMPLEX*16 for pzmax1

Array containing the local pieces of a distributed matrix of dimension of at least ((jx-1)*m_x+ix+(n-1)*abs(incx)). This array contains the entries of the distributed vector sub (x).

ix

(global) INTEGER.The row index in the global array X indicating the first row of sub(x).

jx

(global) INTEGER. The column index in the global array X indicating the first column of sub(x)

descx

(global and local) INTEGER. Array, size (dlen_). The array descriptor for the distributed matrix X.

incx

(global) INTEGER.The global increment for the elements of X. Only two values of incx are supported in this version, namely 1 and m_x. incx must not be zero.

Output Parameters

amax

(global output) pointer to REAL.The absolute value of the largest entry of the distributed vector sub(x) only in the scope of sub(x).

indx

(global output) pointer to INTEGER.The global index of the element of the distributed vector sub(x) whose real part has maximum absolute value.

For more complete information about compiler optimizations, see our Optimization Notice.