PSLASSQ(l) | LAPACK auxiliary routine (version 1.5) | PSLASSQ(l) |
NAME¶
PSLASSQ - return the values scl and smsq such that ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,SYNOPSIS¶
- SUBROUTINE PSLASSQ(
- N, X, IX, JX, DESCX, INCX, SCALE, SUMSQ )
PURPOSE¶
PSLASSQ returns the values scl and smsq such that where x( i ) = sub( X ) = X( IX+(JX-1)*DESCX(M_)+(i-1)*INCX ). The value of sumsq is assumed to be non-negative and scl returns the valuescl = max( scale, abs( x( i ) ) ).
DTYPE_A = 1.
the BLACS process grid A is distribu-
ted over. The context itself is glo-
bal, but the handle (the integer
value) may vary.
array A.
array A.
the rows of the array.
the columns of the array.
row of the array A is distributed. CSRC_A (global) DESCA( CSRC_ ) The process column over which the
first column of the array A is
distributed.
array. LLD_A >= MAX(1,LOCr(M_A)). Let K be the number of rows or columns of a distributed matrix, and assume that its process grid has dimension p x q.
LOCr( M ) = NUMROC( M, MB_A, MYROW, RSRC_A, NPROW ),
LOCc( N ) = NUMROC( N, NB_A, MYCOL, CSRC_A, NPCOL ). An upper bound for these quantities may be computed by:
LOCr( M ) <= ceil( ceil(M/MB_A)/NPROW )*MB_A
LOCc( N ) <= ceil( ceil(N/NB_A)/NPCOL )*NB_A
ARGUMENTS¶
- N (global input) INTEGER
- The length of the distributed vector sub( X ).
- X (input) REAL
- The vector for which a scaled sum of squares is computed. x( i ) = X(IX+(JX-1)*M_X +(i-1)*INCX ), 1 <= i <= n.
- IX (global input) INTEGER
- The row index in the global array X indicating the first row of sub( X ).
- JX (global input) INTEGER
- The column index in the global array X indicating the first column of sub( X ).
- DESCX (global and local input) INTEGER array of dimension DLEN_.
- The array descriptor for the distributed matrix X.
- INCX (global input) 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.
- SCALE (local input/local output) REAL
- On entry, the value scale in the equation above. On exit, SCALE is overwritten with scl , the scaling factor for the sum of squares.
- SUMSQ (local input/local output) REAL
- On entry, the value sumsq in the equation above. On exit, SUMSQ is overwritten with smsq , the basic sum of squares from which scl has been factored out.
12 May 1997 | LAPACK version 1.5 |