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

◆ pcerraxpby()

subroutine pcerraxpby ( real  errbnd,
complex  alpha,
complex  x,
complex  beta,
complex  y,
real  prec 
)

Definition at line 6942 of file pcblastst.f.

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