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

◆ pzerraxpby()

subroutine pzerraxpby ( double precision  errbnd,
complex*16  alpha,
complex*16  x,
complex*16  beta,
complex*16  y,
double precision  prec 
)

Definition at line 6943 of file pzblastst.f.

6944*
6945* -- PBLAS test routine (version 2.0) --
6946* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
6947* and University of California, Berkeley.
6948* April 1, 1998
6949*
6950* .. Scalar Arguments ..
6951 DOUBLE PRECISION ERRBND, PREC
6952 COMPLEX*16 ALPHA, BETA, X, Y
6953* ..
6954*
6955* Purpose
6956* =======
6957*
6958* PZERRAXPBY serially computes y := beta*y + alpha * x and returns a
6959* scaled relative acceptable error bound on the result.
6960*
6961* Arguments
6962* =========
6963*
6964* ERRBND (global output) DOUBLE PRECISION
6965* On exit, ERRBND specifies the scaled relative acceptable er-
6966* ror bound.
6967*
6968* ALPHA (global input) COMPLEX*16
6969* On entry, ALPHA specifies the scalar alpha.
6970*
6971* X (global input) COMPLEX*16
6972* On entry, X specifies the scalar x to be scaled.
6973*
6974* BETA (global input) COMPLEX*16
6975* On entry, BETA specifies the scalar beta.
6976*
6977* Y (global input/global output) COMPLEX*16
6978* On entry, Y specifies the scalar y to be added. On exit, Y
6979* contains the resulting scalar y.
6980*
6981* PREC (global input) DOUBLE PRECISION
6982* On entry, PREC specifies the machine precision.
6983*
6984* -- Written on April 1, 1998 by
6985* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
6986*
6987* =====================================================================
6988*
6989* .. Parameters ..
6990 DOUBLE PRECISION ONE, TWO, ZERO
6991 parameter( one = 1.0d+0, two = 2.0d+0,
6992 $ zero = 0.0d+0 )
6993* ..
6994* .. Local Scalars ..
6995 DOUBLE PRECISION ADDBND, FACT, SUMINEG, SUMIPOS, SUMRNEG,
6996 $ SUMRPOS
6997 COMPLEX*16 TMP
6998* ..
6999* .. Intrinsic Functions ..
7000* ..
7001* .. Executable Statements ..
7002*
7003 sumipos = zero
7004 sumineg = zero
7005 sumrpos = zero
7006 sumrneg = zero
7007 fact = one + two * prec
7008 addbnd = two * two * two * prec
7009*
7010 tmp = alpha * x
7011 IF( dble( tmp ).GE.zero ) THEN
7012 sumrpos = sumrpos + dble( tmp ) * fact
7013 ELSE
7014 sumrneg = sumrneg - dble( tmp ) * fact
7015 END IF
7016 IF( dimag( tmp ).GE.zero ) THEN
7017 sumipos = sumipos + dimag( tmp ) * fact
7018 ELSE
7019 sumineg = sumineg - dimag( tmp ) * fact
7020 END IF
7021*
7022 tmp = beta * y
7023 IF( dble( tmp ).GE.zero ) THEN
7024 sumrpos = sumrpos + dble( tmp ) * fact
7025 ELSE
7026 sumrneg = sumrneg - dble( tmp ) * fact
7027 END IF
7028 IF( dimag( tmp ).GE.zero ) THEN
7029 sumipos = sumipos + dimag( tmp ) * fact
7030 ELSE
7031 sumineg = sumineg - dimag( tmp ) * fact
7032 END IF
7033*
7034 y = ( beta * y ) + ( alpha * x )
7035*
7036 errbnd = addbnd * max( max( sumrpos, sumrneg ),
7037 $ max( sumipos, sumineg ) )
7038*
7039 RETURN
7040*
7041* End of PZERRAXPBY
7042*
#define max(A, B)
Definition pcgemr.c:180
Here is the caller graph for this function: