HPL_plindx1 HPL 2.2 Library Functions February 24, 2016
Compute local swapping index arrays.
const int *
computes two local arrays LINDXA and LINDXAU containing
the local source and final destination position resulting from the
application of row interchanges. In addition, this function computes
three arrays IPLEN, IPMAP and IPMAPM1 that contain the logarithmic
mapping information for the spreading phase.
PANEL (local input/output) HPL_T_panel *
On entry, PANEL points to the data structure containing the
K (global input) const int
On entry, K specifies the number of entries in IPID. K is at
least 2*N, and at most 4*N.
IPID (global input) const int *
On entry, IPID is an array of length K. The first K entries
of that array contain the src and final destination resulting
from the application of the interchanges.
IPA (global output) int *
On exit, IPA specifies the number of rows that the current
process row has that either belong to U or should be swapped
with remote rows of A.
LINDXA (global output) int *
On entry, LINDXA is an array of dimension 2*N. On exit, this
array contains the local indexes of the rows of A I have that
should be copied into U.
LINDXAU (global output) int *
On exit, LINDXAU is an array of dimension 2*N. On exit, this
array contains the local destination information encoded as
follows. If LINDXAU(k) >= 0, row LINDXA(k) of A is to be
copied in U at position LINDXAU(k). Otherwise, row LINDXA(k)
of A should be locally copied into A(-LINDXAU(k),:).
IPLEN (global output) int *
On entry, IPLEN is an array of dimension NPROW + 1. On exit,
this array is such that IPLEN[i] is the number of rows of A
in the processes before process IPMAP[i] after the sort
with the convention that IPLEN[nprow] is the total number of
rows of the panel. In other words IPLEN[i+1]-IPLEN[i] is the
local number of rows of A that should be moved to the process
IPMAP[i]. IPLEN is such that the number of rows of the source
process row can be computed as IPLEN - IPLEN, and the
remaining entries of this array are sorted so that the
quantities IPLEN[i+1] - IPLEN[i] are logarithmically sorted.
IPMAP (global output) int *
On entry, IPMAP is an array of dimension NPROW. On exit, this
array contains the logarithmic mapping of the processes. In
other words, IPMAP[myrow] is the corresponding sorted process
IPMAPM1 (global output) int *
On entry, IPMAPM1 is an array of dimension NPROW. On exit,
this array contains the inverse of the logarithmic mapping
contained in IPMAP: IPMAPM1[ IPMAP[i] ] = i, for all i in
PERMU (global output) int *
On entry, PERMU is an array of dimension JB. On exit, PERMU
contains a sequence of permutations, that should be applied
in increasing order to permute in place the row panel U.
IWORK (workspace) int *
On entry, IWORK is a workarray of dimension 2*JB.