Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

p?lassq

Updates a sum of squares represented in scaled form.

Syntax

void pslassq (MKL_INT *n , float *x , MKL_INT *ix , MKL_INT *jx , MKL_INT *descx , MKL_INT *incx , float *scale , float *sumsq );

void pdlassq (MKL_INT *n , double *x , MKL_INT *ix , MKL_INT *jx , MKL_INT *descx , MKL_INT *incx , double *scale , double *sumsq );

void pclassq (MKL_INT *n , MKL_Complex8 *x , MKL_INT *ix , MKL_INT *jx , MKL_INT *descx , MKL_INT *incx , float *scale , float *sumsq );

void pzlassq (MKL_INT *n , MKL_Complex16 *x , MKL_INT *ix , MKL_INT *jx , MKL_INT *descx , MKL_INT *incx , double *scale , double *sumsq );

Include Files
  • mkl_scalapack.h
Description

The p?lassqfunction returns the values scl and smsq such that

scl 2 * smsq = x12 + ... + xn2 + scale 2*sumsq,

where

xi= sub(X) = X(ix + (jx-1)*m_x + (i - 1)*incx) for pslassq/pdlassq ,

xi= sub(X) = abs(X(ix + (jx-1)*m_x + (i - 1)*incx) for pclassq/pzlassq.

For real functions pslassq/pdlassq the value of sumsq is assumed to be non-negative and scl returns the value

scl = max(scale, abs(xi)).

For complex functions pclassq/pzlassq the value of sumsq is assumed to be at least unity and the value of ssq will then satisfy

1.0 ssqsumsq +2n

Value scale is assumed to be non-negative and scl returns the value


For all functions p?lassq values scale and sumsq must be supplied in scale and sumsq respectively, and scale and sumsq are overwritten by scl and ssq respectively.

All functions p?lassq make only one pass through the vector sub(X).

Input Parameters
n

(global)

The length of the distributed vector sub(x ).

x

The array that stores the vector for which a scaled sum of squares is computed:

x[ix + (jx-1)*m_x + i*incx], 0 i < n.

ix

(global)

The row index in the global matrix X indicating the first row of sub(X).

jx

(global)

The column index in the global matrix X indicating the first column of sub(X).

descx

(global and local) array of size dlen_.

The array descriptor for the distributed matrix X.

incx

(global)

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

scale

(local).

On entry, the value scale in the equation above.

sumsq

(local)

On entry, the value sumsq in the equation above.

Output Parameters
scale

(local).

On exit, scale is overwritten with scl , the scaling factor for the sum of squares.

sumsq

(local).

On exit, sumsq is overwritten with the value smsq, the basic sum of squares from which scl has been factored out.

See Also