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

◆ pb_jump()

subroutine pb_jump ( integer  k,
integer, dimension( 4 )  muladd,
integer, dimension( 2 )  irann,
integer, dimension( 2 )  iranm,
integer, dimension( 4 )  ima 
)

Definition at line 5242 of file pblastim.f.

5243*
5244* -- PBLAS test routine (version 2.0) --
5245* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
5246* and University of California, Berkeley.
5247* April 1, 1998
5248*
5249* .. Scalar Arguments ..
5250 INTEGER K
5251* ..
5252* .. Array Arguments ..
5253 INTEGER IMA( 4 ), IRANM( 2 ), IRANN( 2 ), MULADD( 4 )
5254* ..
5255*
5256* Purpose
5257* =======
5258*
5259* PB_JUMP computes the constants A and C to jump K numbers in the ran-
5260* dom sequence:
5261*
5262* X( n+K ) = A * X( n ) + C.
5263*
5264* The constants encoded in MULADD specify how to jump from entry in the
5265* sequence to the next.
5266*
5267* Arguments
5268* =========
5269*
5270* K (local input) INTEGER
5271* On entry, K specifies the number of entries of the sequence
5272* to jump over. When K is less or equal than zero, A and C are
5273* not computed, and IRANM is set to IRANN corresponding to a
5274* jump of size zero.
5275*
5276* MULADD (local input) INTEGER array
5277* On entry, MULADD is an array of dimension 4 containing the
5278* encoded constants a and c to jump from X( n ) to X( n+1 )
5279* ( = a*X( n )+c) in the random sequence. MULADD(1:2) contains
5280* respectively the 16-lower and 16-higher bits of the constant
5281* a, and MULADD(3:4) contains the 16-lower and 16-higher bits
5282* of the constant c.
5283*
5284* IRANN (local input) INTEGER array
5285* On entry, IRANN is an array of dimension 2. This array con-
5286* tains respectively the 16-lower and 16-higher bits of the en-
5287* coding of X( n ).
5288*
5289* IRANM (local output) INTEGER array
5290* On entry, IRANM is an array of dimension 2. On exit, this
5291* array contains respectively the 16-lower and 16-higher bits
5292* of the encoding of X( n+K ).
5293*
5294* IMA (local output) INTEGER array
5295* On entry, IMA is an array of dimension 4. On exit, when K is
5296* greater than zero, this array contains the encoded constants
5297* A and C to jump from X( n ) to X( n+K ) in the random se-
5298* quence. IMA(1:2) contains respectively the 16-lower and
5299* 16-higher bits of the constant A, and IMA(3:4) contains the
5300* 16-lower and 16-higher bits of the constant C. When K is
5301* less or equal than zero, this array is not referenced.
5302*
5303* -- Written on April 1, 1998 by
5304* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
5305*
5306* =====================================================================
5307*
5308* .. Local Scalars ..
5309 INTEGER I
5310* ..
5311* .. Local Arrays ..
5312 INTEGER J( 2 )
5313* ..
5314* .. External Subroutines ..
5315 EXTERNAL pb_ladd, pb_lmul
5316* ..
5317* .. Executable Statements ..
5318*
5319 IF( k.GT.0 ) THEN
5320*
5321 ima( 1 ) = muladd( 1 )
5322 ima( 2 ) = muladd( 2 )
5323 ima( 3 ) = muladd( 3 )
5324 ima( 4 ) = muladd( 4 )
5325*
5326 DO 10 i = 1, k - 1
5327*
5328 CALL pb_lmul( ima, muladd, j )
5329*
5330 ima( 1 ) = j( 1 )
5331 ima( 2 ) = j( 2 )
5332*
5333 CALL pb_lmul( ima( 3 ), muladd, j )
5334 CALL pb_ladd( muladd( 3 ), j, ima( 3 ) )
5335*
5336 10 CONTINUE
5337*
5338 CALL pb_lmul( irann, ima, j )
5339 CALL pb_ladd( j, ima( 3 ), iranm )
5340*
5341 ELSE
5342*
5343 iranm( 1 ) = irann( 1 )
5344 iranm( 2 ) = irann( 2 )
5345*
5346 END IF
5347*
5348 RETURN
5349*
5350* End of PB_JUMP
5351*
subroutine pb_ladd(j, k, i)
Definition pblastst.f:4480
subroutine pb_lmul(k, j, i)
Definition pblastst.f:4559