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

◆ pderrasum()

subroutine pderrasum ( double precision  errbnd,
integer  n,
double precision  usclr,
double precision, dimension( * )  x,
integer  incx,
double precision  prec 
)

Definition at line 3163 of file pdblas1tst.f.

3164*
3165* -- PBLAS test routine (version 2.0) --
3166* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
3167* and University of California, Berkeley.
3168* April 1, 1998
3169*
3170* .. Scalar Arguments ..
3171 INTEGER INCX, N
3172 DOUBLE PRECISION ERRBND, PREC, USCLR
3173* ..
3174* .. Array Arguments ..
3175 DOUBLE PRECISION X( * )
3176* ..
3177*
3178* Purpose
3179* =======
3180*
3181* PDERRASUM serially computes the sum of absolute values of the vector
3182* X and returns a scaled relative acceptable error bound on the result.
3183*
3184* Arguments
3185* =========
3186*
3187* ERRBND (global output) DOUBLE PRECISION
3188* On exit, ERRBND specifies a scaled relative acceptable error
3189* bound. In this case the error bound is just the absolute sum
3190* multiplied by a constant proportional to the machine preci-
3191* sion.
3192*
3193* N (global input) INTEGER
3194* On entry, N specifies the length of the vector operand.
3195*
3196* USCLR (global output) DOUBLE PRECISION
3197* On exit, USCLR specifies the sum of absolute values of the
3198* vector X.
3199*
3200* X (global input) DOUBLE PRECISION array
3201* On entry, X is an array of dimension at least
3202* ( 1 + ( n - 1 )*abs( INCX ) ). Before entry, the incremen-
3203* ted array X must contain the vector x.
3204*
3205* INCX (global input) INTEGER.
3206* On entry, INCX specifies the increment for the elements of X.
3207* INCX must not be zero.
3208*
3209* PREC (global input) DOUBLE PRECISION
3210* On entry, PREC specifies the machine precision.
3211*
3212* -- Written on April 1, 1998 by
3213* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
3214*
3215* =====================================================================
3216*
3217* .. Parameters ..
3218 DOUBLE PRECISION TWO, ZERO
3219 parameter( two = 2.0d+0, zero = 0.0d+0 )
3220* ..
3221* .. Local Scalars ..
3222 INTEGER IX
3223 DOUBLE PRECISION ADDBND
3224* ..
3225* .. Intrinsic Functions ..
3226 INTRINSIC abs
3227* ..
3228* .. Executable Statements ..
3229*
3230 ix = 1
3231 usclr = zero
3232 addbnd = two * two * two * prec
3233*
3234 DO 10 ix = 1, 1 + ( n - 1 )*incx, incx
3235 usclr = usclr + abs( x( ix ) )
3236 10 CONTINUE
3237*
3238 errbnd = addbnd * usclr
3239*
3240 RETURN
3241*
3242* End of PDERRASUM
3243*
Here is the caller graph for this function: