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

◆ pcerraxpy()

subroutine pcerraxpy ( real  errbnd,
complex  psclr,
complex  x,
complex  y,
real  prec 
)

Definition at line 3777 of file pcblas1tst.f.

3778*
3779* -- PBLAS test routine (version 2.0) --
3780* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
3781* and University of California, Berkeley.
3782* April 1, 1998
3783*
3784* .. Scalar Arguments ..
3785 REAL ERRBND, PREC
3786 COMPLEX PSCLR, X, Y
3787* ..
3788*
3789* Purpose
3790* =======
3791*
3792* PCERRAXPY serially computes Y := Y + PSCLR * X and returns a scaled
3793* relative acceptable error bound on the result.
3794*
3795* Arguments
3796* =========
3797*
3798* ERRBND (global output) REAL
3799* On exit, ERRBND specifies the scaled relative acceptable er-
3800* ror bound.
3801*
3802* PSCLR (global input) COMPLEX
3803* On entry, PSCLR specifies the scale factor.
3804*
3805* X (global input) COMPLEX
3806* On entry, X specifies the scalar to be scaled.
3807*
3808* Y (global input/global output) COMPLEX
3809* On entry, Y specifies the scalar to be added. On exit, Y con-
3810* tains the resulting scalar.
3811*
3812* PREC (global input) REAL
3813* On entry, PREC specifies the machine precision.
3814*
3815* -- Written on April 1, 1998 by
3816* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
3817*
3818* =====================================================================
3819*
3820* .. Parameters ..
3821 REAL ONE, TWO, ZERO
3822 parameter( one = 1.0e+0, two = 2.0e+0,
3823 $ zero = 0.0e+0 )
3824* ..
3825* .. Local Scalars ..
3826 REAL ADDBND, FACT, SUMINEG, SUMIPOS, SUMRNEG,
3827 $ SUMRPOS
3828 COMPLEX TMP
3829* ..
3830* .. Intrinsic Functions ..
3831 INTRINSIC aimag, max, real
3832* ..
3833* .. Executable Statements ..
3834*
3835 sumipos = zero
3836 sumineg = zero
3837 sumrpos = zero
3838 sumrneg = zero
3839 fact = one + two * prec
3840 addbnd = two * two * two * prec
3841*
3842 tmp = psclr * x
3843 IF( real( tmp ).GE.zero ) THEN
3844 sumrpos = sumrpos + real( tmp ) * fact
3845 ELSE
3846 sumrneg = sumrneg - real( tmp ) * fact
3847 END IF
3848 IF( aimag( tmp ).GE.zero ) THEN
3849 sumipos = sumipos + aimag( tmp ) * fact
3850 ELSE
3851 sumineg = sumineg - aimag( tmp ) * fact
3852 END IF
3853*
3854 tmp = y
3855 IF( real( tmp ).GE.zero ) THEN
3856 sumrpos = sumrpos + real( tmp )
3857 ELSE
3858 sumrneg = sumrneg - real( tmp )
3859 END IF
3860 IF( aimag( tmp ).GE.zero ) THEN
3861 sumipos = sumipos + aimag( tmp )
3862 ELSE
3863 sumineg = sumineg - aimag( tmp )
3864 END IF
3865*
3866 y = y + ( psclr * x )
3867*
3868 errbnd = addbnd * max( max( sumrpos, sumrneg ),
3869 $ max( sumipos, sumineg ) )
3870*
3871 RETURN
3872*
3873* End of PCERRAXPY
3874*
#define max(A, B)
Definition pcgemr.c:180
Here is the caller graph for this function: