Developer Reference for Intel® oneAPI Math Kernel Library for C
p?lassq
Updates a sum of squares represented in scaled form.
Syntax
voidpslassq ( MKL_INT*n , float*x , MKL_INT*ix , MKL_INT*jx , MKL_INT*descx , MKL_INT*incx , float*scale , float*sumsq );
voidpdlassq ( MKL_INT*n , double*x , MKL_INT*ix , MKL_INT*jx , MKL_INT*descx , MKL_INT*incx , double*scale , double*sumsq );
voidpclassq ( MKL_INT*n , MKL_Complex8*x , MKL_INT*ix , MKL_INT*jx , MKL_INT*descx , MKL_INT*incx , float*scale , float*sumsq );
voidpzlassq ( 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
pslassq pdlassq pclassq pzlassq The p?lassq routine function returns the values scl and smsq such that
scl2 * smsq = x12 + … + xn2 + scale2 * sumsq ,
where
x i = sub( X ) = X ( ix + ( jx -1)* m_x + ( i - 1)* incx ) for pslassq/pdlassq ,
x i = sub( X ) = abs( X ( ix + ( jx -1)* m_x + ( i - 1)* incx ) for pclassq/pzlassq .
For real routines 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 routines functions pclassq/pzlassq the value of sumsq is assumed to be at least unity and the value of ssq will then satisfy
1.0 ≤ ssq ≤ sumsq +2 n
Value scale is assumed to be non-negative and scl returns the value
For all routines 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 routines functions p?lassq make only one pass through the vector sub( X ).
Input Parameters
- n
-
(global) INTEGER . The length of the distributed vector sub( x ).
- x
-
REAL for pslassq DOUBLE PRECISION for pdlassq COMPLEX for pclassq COMPLEX*16 for pzlassq .
The array that stores the vector for which a scaled sum of squares is computed:
x(ix + (jx-1)*m_x + (i - 1)*incx), 1 ≤ i ≤ n . x[ix + (jx-1)*m_x + i*incx], 0 ≤ i < n .
- ix
-
(global) INTEGER .
The row index in the global matrix X indicating the first row of sub( X ).
- jx
-
(global) INTEGER .
The column index in the global matrix X indicating the first column of sub( X ).
- descx
-
(global and local) INTEGER array of 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 . The argument incx must not equal zero.
- scale
-
(local). REAL for pslassq/pclassq DOUBLE PRECISION for pdlassq/pzlassq . On entry, the value scale in the equation above.
- sumsq
-
(local) REAL for pslassq/pclassq DOUBLE PRECISION for pdlassq/pzlassq . 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.