SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ pzerrasum()

subroutine pzerrasum ( double precision  errbnd,
integer  n,
double precision  usclr,
complex*16, dimension( * )  x,
integer  incx,
double precision  prec 
)

Definition at line 3557 of file pzblas1tst.f.

3558*
3559* -- PBLAS test routine (version 2.0) --
3560* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
3561* and University of California, Berkeley.
3562* April 1, 1998
3563*
3564* .. Scalar Arguments ..
3565 INTEGER INCX, N
3566 DOUBLE PRECISION ERRBND, PREC, USCLR
3567* ..
3568* .. Array Arguments ..
3569 COMPLEX*16 X( * )
3570* ..
3571*
3572* Purpose
3573* =======
3574*
3575* PZERRASUM serially computes the sum of absolute values of the vector
3576* X and returns a scaled relative acceptable error bound on the result.
3577*
3578* Arguments
3579* =========
3580*
3581* ERRBND (global output) DOUBLE PRECISION
3582* On exit, ERRBND specifies a scaled relative acceptable error
3583* bound. In this case the error bound is just the absolute sum
3584* multiplied by a constant proportional to the machine preci-
3585* sion.
3586*
3587* N (global input) INTEGER
3588* On entry, N specifies the length of the vector operand.
3589*
3590* USCLR (global output) DOUBLE PRECISION
3591* On exit, USCLR specifies the sum of absolute values of the
3592* vector X.
3593*
3594* X (global input) COMPLEX*16 array
3595* On entry, X is an array of dimension at least
3596* ( 1 + ( n - 1 )*abs( INCX ) ). Before entry, the incremen-
3597* ted array X must contain the vector x.
3598*
3599* INCX (global input) INTEGER.
3600* On entry, INCX specifies the increment for the elements of X.
3601* INCX must not be zero.
3602*
3603* PREC (global input) DOUBLE PRECISION
3604* On entry, PREC specifies the machine precision.
3605*
3606* -- Written on April 1, 1998 by
3607* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
3608*
3609* =====================================================================
3610*
3611* .. Parameters ..
3612 DOUBLE PRECISION TWO, ZERO
3613 parameter( two = 2.0d+0, zero = 0.0d+0 )
3614* ..
3615* .. Local Scalars ..
3616 INTEGER IX
3617 DOUBLE PRECISION ADDBND
3618* ..
3619* .. Intrinsic Functions ..
3620 INTRINSIC abs, dble, dimag
3621* ..
3622* .. Executable Statements ..
3623*
3624 ix = 1
3625 usclr = zero
3626 addbnd = two * two * two * prec
3627*
3628 DO 10 ix = 1, 1 + ( n - 1 )*incx, incx
3629 usclr = usclr + abs( dble( x( ix ) ) ) +
3630 $ abs( dimag( x( ix ) ) )
3631 10 CONTINUE
3632*
3633 errbnd = addbnd * usclr
3634*
3635 RETURN
3636*
3637* End of PZERRASUM
3638*
Here is the caller graph for this function: