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

◆ pcerrasum()

subroutine pcerrasum ( real  errbnd,
integer  n,
real  usclr,
complex, dimension( * )  x,
integer  incx,
real  prec 
)

Definition at line 3558 of file pcblas1tst.f.

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