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

◆ cgenmat()

subroutine cgenmat ( integer  m,
integer  n,
complex, dimension(lda,n)  a,
integer  lda,
integer  testnum,
integer  myrow,
integer  mycol 
)

Definition at line 9607 of file blacstest.f.

9608*
9609* -- BLACS tester (version 1.0) --
9610* University of Tennessee
9611* December 15, 1994
9612*
9613*
9614* .. Scalar Arguments ..
9615 INTEGER M, N, LDA, TESTNUM, MYROW, MYCOL
9616* ..
9617* .. Array Arguments ..
9618 COMPLEX A(LDA,N)
9619* ..
9620*
9621* Purpose
9622* =======
9623* CGENMAT: Generates an M-by-N matrix filled with random elements.
9624*
9625* Arguments
9626* =========
9627* M (input) INTEGER
9628* The number of rows of the matrix A. M >= 0.
9629*
9630* N (input) INTEGER
9631* The number of columns of the matrix A. N >= 0.
9632*
9633* A (output) @up@(doctype) array, dimension (LDA,N)
9634* The m by n matrix A. Fortran77 (column-major) storage
9635* assumed.
9636*
9637* LDA (input) INTEGER
9638* The leading dimension of the array A. LDA >= max(1, M).
9639*
9640* TESTNUM (input) INTEGER
9641* Unique number for this test case, used as a basis for
9642* the random seeds.
9643*
9644* ====================================================================
9645*
9646* .. External Functions ..
9647 INTEGER IBTNPROCS
9648 COMPLEX CBTRAN
9649 EXTERNAL cbtran, ibtnprocs
9650* ..
9651* .. Local Scalars ..
9652 INTEGER I, J, NPROCS, SRC
9653* ..
9654* .. Local Arrays ..
9655 INTEGER ISEED(4)
9656* ..
9657* .. Executable Statements ..
9658*
9659* ISEED's four values must be positive integers less than 4096,
9660* fourth one has to be odd. (see _LARND). Use some goofy
9661* functions to come up with seed values which together should
9662* be unique.
9663*
9664 nprocs = ibtnprocs()
9665 src = myrow * nprocs + mycol
9666 iseed(1) = mod( 1002 + testnum*5 + src*3, 4096 )
9667 iseed(2) = mod( 2027 + testnum*7 + src, 4096 )
9668 iseed(3) = mod( 1234 + testnum + src*3, 4096 )
9669 iseed(4) = mod( 4311 + testnum*10 + src*2, 4096 )
9670*
9671 DO 10 j = 1, n
9672 DO 10 i = 1, m
9673 a(i, j) = cbtran( iseed )
9674 10 CONTINUE
9675*
9676 RETURN
9677*
9678* End of CGENMAT.
9679*
complex function cbtran(iseed)
Definition blacstest.f:9683
integer function ibtnprocs()
Definition btprim.f:81
Here is the caller graph for this function: