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

◆ pb_cfillpad()

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

Definition at line 9759 of file pcblastst.f.

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