p?rscl

Multiplies a vector by the reciprocal of a real scalar.

Syntax

Fortran:

call psrscl(n, sa, sx, ix, jx, descx, incx)

call pdrscl(n, sa, sx, ix, jx, descx, incx)

call pcsrscl(n, sa, sx, ix, jx, descx, incx)

call pzdrscl(n, sa, sx, ix, jx, descx, incx)

C:

void psrscl (MKL_INT *n , float *sa , float *sx , MKL_INT *ix , MKL_INT *jx , MKL_INT *descx , MKL_INT *incx );

void pdrscl (MKL_INT *n , double *sa , double *sx , MKL_INT *ix , MKL_INT *jx , MKL_INT *descx , MKL_INT *incx );

void pcsrscl (MKL_INT *n , float *sa , MKL_Complex8 *sx , MKL_INT *ix , MKL_INT *jx , MKL_INT *descx , MKL_INT *incx );

void pzdrscl (MKL_INT *n , double *sa , MKL_Complex16 *sx , MKL_INT *ix , MKL_INT *jx , MKL_INT *descx , MKL_INT *incx );

Include Files

• C: mkl_scalapack.h

Description

The p?rscl routine multiplies an n-element real/complex vector `sub(x)` by the real scalar `1/a`. This is done without overflow or underflow as long as the final result `sub(x)/a` does not overflow or underflow.

`sub(x)` denotes `x(ix:ix+n-1, jx:jx)`, if `incx = 1`,

and `x(ix:ix, jx:jx+n-1)`, if `incx = m_x`.

Input Parameters

n

(global) INTEGER.

The number of components of the distributed vector sub(x). `n ≥ 0`.

sa

REAL for psrscl/pcsrscl

DOUBLE PRECISION for pdrscl/pzdrscl.

The scalar a that is used to divide each component of the vector x. This parameter must be 0.

sx

REAL forpsrscl

DOUBLE PRECISION for pdrscl

COMPLEX for pcsrscl

COMPLEX*16 for pzdrscl.

Array containing the local pieces of a distributed matrix of size 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 of the submatrix of the distributed matrix X to operate on.

jx

(global) INTEGER.

The column index of the submatrix of the distributed matrix X to operate on.

descx

(global and local) INTEGER.

Array of size 9. The array descriptor for the distributed matrix X.

incx

(global) INTEGER.

The increment for the elements of X. This version supports only two values of incx, namely 1 and m_x.

Output Parameters

sx

On exit, the result `x/a`.

Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.