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

◆ pb_dfillpad()

subroutine pb_dfillpad ( integer  ictxt,
integer  m,
integer  n,
double precision, dimension( * )  a,
integer  lda,
integer  ipre,
integer  ipost,
double precision  chkval 
)

Definition at line 9078 of file pdblastst.f.

9079*
9080* -- PBLAS test routine (version 2.0) --
9081* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
9082* and University of California, Berkeley.
9083* April 1, 1998
9084*
9085* .. Scalar Arguments ..
9086 INTEGER ICTXT, IPOST, IPRE, LDA, M, N
9087 DOUBLE PRECISION CHKVAL
9088* ..
9089* .. Array Arguments ..
9090 DOUBLE PRECISION A( * )
9091* ..
9092*
9093* Purpose
9094* =======
9095*
9096* PB_DFILLPAD surrounds a two dimensional local array with a guard-zone
9097* initialized to the value CHKVAL. The user may later call the routine
9098* PB_DCHEKPAD to discover if the guardzone has been violated. There are
9099* three guardzones. The first is a buffer of size IPRE that is before
9100* the start of the array. The second is the buffer of size IPOST which
9101* is after the end of the array to be padded. Finally, there is a guard
9102* zone inside every column of the array to be padded, in the elements
9103* of A(M+1:LDA, J).
9104*
9105* Arguments
9106* =========
9107*
9108* ICTXT (local input) INTEGER
9109* On entry, ICTXT specifies the BLACS context handle, indica-
9110* ting the global context of the operation. The context itself
9111* is global, but the value of ICTXT is local.
9112*
9113* M (local input) INTEGER
9114* On entry, M specifies the number of rows in the local array
9115* A. M must be at least zero.
9116*
9117* N (local input) INTEGER
9118* On entry, N specifies the number of columns in the local ar-
9119* ray A. N must be at least zero.
9120*
9121* A (local input/local output) DOUBLE PRECISION array
9122* On entry, A is an array of dimension (LDA,N). On exit, this
9123* array is the padded array.
9124*
9125* LDA (local input) INTEGER
9126* On entry, LDA specifies the leading dimension of the local
9127* array to be padded. LDA must be at least MAX( 1, M ).
9128*
9129* IPRE (local input) INTEGER
9130* On entry, IPRE specifies the size of the guard zone to put
9131* before the start of the padded array.
9132*
9133* IPOST (local input) INTEGER
9134* On entry, IPOST specifies the size of the guard zone to put
9135* after the end of the padded array.
9136*
9137* CHKVAL (local input) DOUBLE PRECISION
9138* On entry, CHKVAL specifies the value to pad the array with.
9139*
9140* -- Written on April 1, 1998 by
9141* R. Clint Whaley, University of Tennessee, Knoxville 37996, USA.
9142*
9143* =====================================================================
9144*
9145* .. Local Scalars ..
9146 INTEGER I, J, K
9147* ..
9148* .. Executable Statements ..
9149*
9150* Put check buffer in front of A
9151*
9152 IF( ipre.GT.0 ) THEN
9153 DO 10 i = 1, ipre
9154 a( i ) = chkval
9155 10 CONTINUE
9156 ELSE
9157 WRITE( *, fmt = '(A)' )
9158 $ 'WARNING no pre-guardzone in PB_DFILLPAD'
9159 END IF
9160*
9161* Put check buffer in back of A
9162*
9163 IF( ipost.GT.0 ) THEN
9164 j = ipre+lda*n+1
9165 DO 20 i = j, j+ipost-1
9166 a( i ) = chkval
9167 20 CONTINUE
9168 ELSE
9169 WRITE( *, fmt = '(A)' )
9170 $ 'WARNING no post-guardzone in PB_DFILLPAD'
9171 END IF
9172*
9173* Put check buffer in all (LDA-M) gaps
9174*
9175 IF( lda.GT.m ) THEN
9176 k = ipre + m + 1
9177 DO 40 j = 1, n
9178 DO 30 i = k, k + ( lda - m ) - 1
9179 a( i ) = chkval
9180 30 CONTINUE
9181 k = k + lda
9182 40 CONTINUE
9183 END IF
9184*
9185 RETURN
9186*
9187* End of PB_DFILLPAD
9188*
Here is the caller graph for this function: