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

◆ pzerraxpy()

subroutine pzerraxpy ( double precision  errbnd,
complex*16  psclr,
complex*16  x,
complex*16  y,
double precision  prec 
)

Definition at line 3776 of file pzblas1tst.f.

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