PCSRSCL(l)
β¨ PCSRSCL β¨ (the l manual page, LAPACK auxiliary routine, version 1.5)
okay bestie, gather round, because today we're talking about PCSRSCL and honestly? she's lowkey a queen π
πΈ NAME πΈ
PCSRSCL β she multiplies an N-element complex distributed vector sub( X ) by the real scalar 1/a. that's it. that's the job. slay.
π SYNOPSIS π
SUBROUTINE PCSRSCL( N, SA, SX, IX, JX, DESCX, INCX )
INTEGER IX, INCX, JX, N
REAL SA
INTEGER DESCX( * )
COMPLEX SX( * )
π¦ PURPOSE π¦
PCSRSCL multiplies an N-element complex distributed vector sub( X ) by the real scalar 1/a. and the way she does it?? no overflow, no underflow β as long as the final sub( X )/a itself doesn't overflow or underflow. iconic behaviour fr fr π
where sub( X ) means:
X(IX:IX+N-1,JX:JX), ifINCX = 1X(IX:IX,JX:JX+N-1), ifINCX = M_X
π« Notes π«
every global data object has a lil bestie called a description vector. this vector stores all the info you need to map an object element to its corresponding process and memory location. it's giving personal assistant energy, honestly.
let A be a generic term for any 2D block cyclicly distributed array. such a global array has an associated description vector descA. in the comments below, read the character _ as "of the global array". iykyk.
DT_A(global) β stored indescA[ DT_ ]β the descriptor type. in this case,DT_A = 1.CTXT_A(global) β stored indescA[ CTXT_ ]β the BLACS context handle, indicating the BLACS process gridAis distributed over. the context itself is global, but the handle (the integer value) may vary.M_A(global) β stored indescA[ M_ ]β the number of rows in the global arrayA.N_A(global) β stored indescA[ N_ ]β the number of columns in the global arrayA.MB_A(global) β stored indescA[ MB_ ]β the blocking factor used to distribute the rows of the array.NB_A(global) β stored indescA[ NB_ ]β the blocking factor used to distribute the columns of the array.RSRC_A(global) β stored indescA[ RSRC_ ]β the process row over which the first row of the arrayAis distributed.CSRC_A(global) β stored indescA[ CSRC_ ]β the process column over which the first column of the arrayAis distributed.LLD_A(local) β stored indescA[ LLD_ ]β the leading dimension of the local array.LLD_A >= MAX(1,LOCr(M_A)).
let K be the number of rows or columns of a distributed matrix, and assume its process grid has dimension p x q.
LOCr( K )is the number of elements ofKthat a process would receive ifKwere distributed over thepprocesses of its process column.LOCc( K )is the number of elements ofKthat a process would receive ifKwere distributed over theqprocesses of its process row.
you can get the values of LOCr() and LOCc() by calling the ScaLAPACK tool function NUMROC:
LOCr( M ) = NUMROC( M, MB_A, MYROW, RSRC_A, NPROW ),
LOCc( N ) = NUMROC( N, NB_A, MYCOL, CSRC_A, NPCOL ).
and an upper bound for these quantities can be computed like:
LOCr( M ) <= ceil( ceil(M/MB_A)/NPROW )*MB_A
LOCc( N ) <= ceil( ceil(N/NB_A)/NPCOL )*NB_A
because vectors may be seen as particular matrices, a distributed vector is considered to be a distributed matrix. periodt. π
π ARGUMENTS π
N(global input) pointer to INTEGER β the number of components of the distributed vectorsub( X ).N >= 0.SA(global input) REAL β the scalarawhich is used to divide each component ofsub( X ).
π¨ bestie listen:SAmust be>= 0, or the subroutine will divide by zero. do not do that to her.
SX(local input/local output) COMPLEX array β contains the local pieces of a distributed matrix of dimension of at least( (JX-1)*M_X + IX + ( N - 1 )*abs( INCX ) ). this array contains the entries of the distributed vectorsub( X ).IX(global input) pointer to INTEGER β the global row index of the submatrix of the distributed matrixXto operate on.JX(global input) pointer to INTEGER β the global column index of the submatrix of the distributed matrixXto operate on.DESCX(global and local input) INTEGER array of dimension 8 β the array descriptor of the distributed matrixX.INCX(global input) pointer to INTEGER β the global increment for the elements ofX. only two values ofINCXare supported in this version, namely1andM_X. no other vibes accepted, sorry π
LAPACK version 1.5 Β· 12 May 1997
and that's the whole page, bestie π«Ά written back on 12 May 1997 for LAPACK version 1.5 β still serving, still iconic, still not dividing by zero. mwah πβ¨ππ¦πΈ
π¦ where this page comes from
- ubuntu jammy: scalapack-doc 1.5-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms