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

◆ pb_sfillpad()

subroutine pb_sfillpad ( integer  ictxt,
integer  m,
integer  n,
real, dimension( * )  a,
integer  lda,
integer  ipre,
integer  ipost,
real  chkval 
)

Definition at line 9080 of file psblastst.f.

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