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

◆ pb_zfillpad()

subroutine pb_zfillpad ( integer  ictxt,
integer  m,
integer  n,
complex*16, dimension( * )  a,
integer  lda,
integer  ipre,
integer  ipost,
complex*16  chkval 
)

Definition at line 9761 of file pzblastst.f.

9762*
9763* -- PBLAS test routine (version 2.0) --
9764* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
9765* and University of California, Berkeley.
9766* April 1, 1998
9767*
9768* .. Scalar Arguments ..
9769 INTEGER ICTXT, IPOST, IPRE, LDA, M, N
9770 COMPLEX*16 CHKVAL
9771* ..
9772* .. Array Arguments ..
9773 COMPLEX*16 A( * )
9774* ..
9775*
9776* Purpose
9777* =======
9778*
9779* PB_ZFILLPAD surrounds a two dimensional local array with a guard-zone
9780* initialized to the value CHKVAL. The user may later call the routine
9781* PB_ZCHEKPAD to discover if the guardzone has been violated. There are
9782* three guardzones. The first is a buffer of size IPRE that is before
9783* the start of the array. The second is the buffer of size IPOST which
9784* is after the end of the array to be padded. Finally, there is a guard
9785* zone inside every column of the array to be padded, in the elements
9786* of A(M+1:LDA, J).
9787*
9788* Arguments
9789* =========
9790*
9791* ICTXT (local input) INTEGER
9792* On entry, ICTXT specifies the BLACS context handle, indica-
9793* ting the global context of the operation. The context itself
9794* is global, but the value of ICTXT is local.
9795*
9796* M (local input) INTEGER
9797* On entry, M specifies the number of rows in the local array
9798* A. M must be at least zero.
9799*
9800* N (local input) INTEGER
9801* On entry, N specifies the number of columns in the local ar-
9802* ray A. N must be at least zero.
9803*
9804* A (local input/local output) COMPLEX*16 array
9805* On entry, A is an array of dimension (LDA,N). On exit, this
9806* array is the padded array.
9807*
9808* LDA (local input) INTEGER
9809* On entry, LDA specifies the leading dimension of the local
9810* array to be padded. LDA must be at least MAX( 1, M ).
9811*
9812* IPRE (local input) INTEGER
9813* On entry, IPRE specifies the size of the guard zone to put
9814* before the start of the padded array.
9815*
9816* IPOST (local input) INTEGER
9817* On entry, IPOST specifies the size of the guard zone to put
9818* after the end of the padded array.
9819*
9820* CHKVAL (local input) COMPLEX*16
9821* On entry, CHKVAL specifies the value to pad the array with.
9822*
9823* -- Written on April 1, 1998 by
9824* R. Clint Whaley, University of Tennessee, Knoxville 37996, USA.
9825*
9826* =====================================================================
9827*
9828* .. Local Scalars ..
9829 INTEGER I, J, K
9830* ..
9831* .. Executable Statements ..
9832*
9833* Put check buffer in front of A
9834*
9835 IF( ipre.GT.0 ) THEN
9836 DO 10 i = 1, ipre
9837 a( i ) = chkval
9838 10 CONTINUE
9839 ELSE
9840 WRITE( *, fmt = '(A)' )
9841 $ 'WARNING no pre-guardzone in PB_ZFILLPAD'
9842 END IF
9843*
9844* Put check buffer in back of A
9845*
9846 IF( ipost.GT.0 ) THEN
9847 j = ipre+lda*n+1
9848 DO 20 i = j, j+ipost-1
9849 a( i ) = chkval
9850 20 CONTINUE
9851 ELSE
9852 WRITE( *, fmt = '(A)' )
9853 $ 'WARNING no post-guardzone in PB_ZFILLPAD'
9854 END IF
9855*
9856* Put check buffer in all (LDA-M) gaps
9857*
9858 IF( lda.GT.m ) THEN
9859 k = ipre + m + 1
9860 DO 40 j = 1, n
9861 DO 30 i = k, k + ( lda - m ) - 1
9862 a( i ) = chkval
9863 30 CONTINUE
9864 k = k + lda
9865 40 CONTINUE
9866 END IF
9867*
9868 RETURN
9869*
9870* End of PB_ZFILLPAD
9871*
Here is the caller graph for this function: