p?lassq
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?lassq
function
returns the values scl
and smsq
such that scl
2
* smsq
= x
1
2
+ ... + x
n
2
+ scale
2
*sumsq
,where
x= sub(
i
X
) = X
(ix
+ (jx
-1)*m_x
+ (i
- 1)*incx
) for pslassq/pdlassq
, x= sub(
i
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 valuescl
= max(scale
, abs(x
i
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
≤
ssq
≤
sumsq
+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 thevector 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 matrixXindicating the first row of sub(X).
- jx
- (global)The column index in the global matrixXindicating the first column of sub(X).
- descx
- (global and local) array of sizedlen_.The array descriptor for the distributed matrixX.
- incx
- (global)The global increment for the elements ofX. Only two values ofincxare supported in this version, namely 1 andm_x. The argumentincxmust not equal zero.
- scale
- (local).On entry, the valuescalein the equation above.
- sumsq
- (local)On entry, the valuesumsqin the equation above.
Output Parameters
- scale
- (local).On exit,scaleis overwritten withscl, the scaling factor for the sum of squares.
- sumsq
- (local).On exit,sumsqis overwritten with the valuesmsq,the basic sum of squares from whichsclhas been factored out.