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

◆ pb_initmuladd()

subroutine pb_initmuladd ( integer, dimension( * )  muladd0,
integer, dimension( * )  jmp,
integer, dimension( 4, * )  imuladd 
)

Definition at line 4790 of file pblastim.f.

4791*
4792* -- PBLAS test routine (version 2.0) --
4793* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
4794* and University of California, Berkeley.
4795* April 1, 1998
4796*
4797* .. Array Arguments ..
4798 INTEGER IMULADD( 4, * ), JMP( * ), MULADD0( * )
4799* ..
4800*
4801* Purpose
4802* =======
4803*
4804* PB_INITMULADD initializes the constants a's and c's corresponding to
4805* the jump values (JMP) used by the matrix generator.
4806*
4807* Arguments
4808* =========
4809*
4810* MULADD0 (local input) INTEGER array
4811* On entry, MULADD0 is an array of dimension 4 containing the
4812* encoded initial constants a and c to jump from X( n ) to
4813* X( n+1 ) = a*X( n ) + c in the random sequence. MULADD0(1:2)
4814* contains respectively the 16-lower and 16-higher bits of the
4815* constant a, and MULADD0(3:4) contains the 16-lower and
4816* 16-higher bits of the constant c.
4817*
4818* JMP (local input) INTEGER array
4819* On entry, JMP is an array of dimension JMP_LEN containing the
4820* different jump values used by the matrix generator.
4821*
4822* IMULADD (local output) INTEGER array
4823* On entry, IMULADD is an array of dimension ( 4, JMP_LEN ). On
4824* exit, the jth column of this array contains the encoded ini-
4825* tial constants a_j and c_j to jump from X( n ) to X(n+JMP(j))
4826* (= a_j*X( n ) + c_j) in the random sequence. IMULADD(1:2,j)
4827* contains respectively the 16-lower and 16-higher bits of the
4828* constant a_j, and IMULADD(3:4,j) contains the 16-lower and
4829* 16-higher bits of the constant c_j.
4830*
4831* -- Written on April 1, 1998 by
4832* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
4833*
4834* =====================================================================
4835*
4836* .. Parameters ..
4837 INTEGER JMP_1, JMP_COL, JMP_IMBV, JMP_INBV, JMP_LEN,
4838 $ JMP_MB, JMP_NB, JMP_NPIMBLOC, JMP_NPMB,
4839 $ JMP_NQINBLOC, JMP_NQNB, JMP_ROW
4840 parameter( jmp_1 = 1, jmp_row = 2, jmp_col = 3,
4841 $ jmp_mb = 4, jmp_imbv = 5, jmp_npmb = 6,
4842 $ jmp_npimbloc = 7, jmp_nb = 8, jmp_inbv = 9,
4843 $ jmp_nqnb = 10, jmp_nqinbloc = 11,
4844 $ jmp_len = 11 )
4845* ..
4846*
4847* .. Local Arrays ..
4848 INTEGER ITMP1( 2 ), ITMP2( 2 )
4849* ..
4850* .. External Subroutines ..
4851 EXTERNAL pb_jump
4852* ..
4853* .. Executable Statements ..
4854*
4855 itmp2( 1 ) = 100
4856 itmp2( 2 ) = 0
4857*
4858* Compute IMULADD for all JMP values
4859*
4860 CALL pb_jump( jmp( jmp_1 ), muladd0, itmp2, itmp1,
4861 $ imuladd( 1, jmp_1 ) )
4862*
4863 CALL pb_jump( jmp( jmp_row ), muladd0, itmp1, itmp2,
4864 $ imuladd( 1, jmp_row ) )
4865 CALL pb_jump( jmp( jmp_col ), muladd0, itmp1, itmp2,
4866 $ imuladd( 1, jmp_col ) )
4867*
4868* Compute constants a and c to jump JMP( * ) numbers in the
4869* sequence for column- or row-major ordering of the sequence.
4870*
4871 CALL pb_jump( jmp( jmp_imbv ), imuladd( 1, jmp_row ), itmp1,
4872 $ itmp2, imuladd( 1, jmp_imbv ) )
4873 CALL pb_jump( jmp( jmp_mb ), imuladd( 1, jmp_row ), itmp1,
4874 $ itmp2, imuladd( 1, jmp_mb ) )
4875 CALL pb_jump( jmp( jmp_npmb ), imuladd( 1, jmp_row ), itmp1,
4876 $ itmp2, imuladd( 1, jmp_npmb ) )
4877 CALL pb_jump( jmp( jmp_npimbloc ), imuladd( 1, jmp_row ), itmp1,
4878 $ itmp2, imuladd( 1, jmp_npimbloc ) )
4879*
4880 CALL pb_jump( jmp( jmp_inbv ), imuladd( 1, jmp_col ), itmp1,
4881 $ itmp2, imuladd( 1, jmp_inbv ) )
4882 CALL pb_jump( jmp( jmp_nb ), imuladd( 1, jmp_col ), itmp1,
4883 $ itmp2, imuladd( 1, jmp_nb ) )
4884 CALL pb_jump( jmp( jmp_nqnb ), imuladd( 1, jmp_col ), itmp1,
4885 $ itmp2, imuladd( 1, jmp_nqnb ) )
4886 CALL pb_jump( jmp( jmp_nqinbloc ), imuladd( 1, jmp_col ), itmp1,
4887 $ itmp2, imuladd( 1, jmp_nqinbloc ) )
4888*
4889 RETURN
4890*
4891* End of PB_INITMULADD
4892*
subroutine pb_jump(k, muladd, irann, iranm, ima)
Definition pblastst.f:4648