Name

HPL_infog2l global to local index translation.

Synopsis

#include <hpl.h>

void HPL_infog2l( int I, int J, const int IMB, const int MB, const int INB, const int NB, const int RSRC, const int CSRC, const int MYROW, const int MYCOL, const int NPROW, const int NPCOL, int * II, int * JJ, int * PROW, int * PCOL );

Description

HPL_infog2l computes the starting local index II, JJ corresponding to the submatrix starting globally at the entry pointed by I, J. This routine returns the coordinates in the grid of the process owning the matrix entry of global indexes I, J, namely PROW and PCOL.

Arguments

I       (global input)                int
        On entry,  I  specifies  the  global  row index of the matrix
        entry. I must be at least zero.
J       (global input)                int
        On entry,  J  specifies the global column index of the matrix
        entry. J must be at least zero.
IMB     (global input)                const int
        On entry,  IMB  specifies  the size of the first row block of
        the global matrix. IMB must be at least one.
MB      (global input)                const int
        On entry,  MB specifies the blocking factor used to partition
        and  distribute the rows of the matrix A.  MB  must be larger
        than one.
INB     (global input)                const int
        On entry, INB specifies the size of the first column block of
        the global matrix. INB must be at least one.
NB      (global input)                const int
        On entry,  NB specifies the blocking factor used to partition
        and distribute the columns of the matrix A. NB must be larger
        than one.
RSRC    (global input)                const int
        On entry,  RSRC  specifies  the row coordinate of the process
        that possesses the row  I.  RSRC  must  be at least zero  and
        strictly less than NPROW.
CSRC    (global input)                const int
        On entry, CSRC specifies the column coordinate of the process
        that possesses the column J. CSRC  must be at least zero  and
        strictly less than NPCOL.
MYROW   (local input)                 const int
        On entry, MYROW  specifies my  row process  coordinate in the
        grid. MYROW is greater than or equal  to zero  and  less than
        NPROW.
MYCOL   (local input)                 const int
        On entry, MYCOL specifies my column process coordinate in the
        grid. MYCOL is greater than or equal  to zero  and  less than
        NPCOL.
NPROW   (global input)                const int
        On entry,  NPROW  specifies the number of process rows in the
        grid. NPROW is at least one.
NPCOL   (global input)                const int
        On entry,  NPCOL  specifies  the number of process columns in
        the grid. NPCOL is at least one.
II      (local output)                int *
        On exit, II  specifies the  local  starting  row index of the
        submatrix. On exit, II is at least 0.
JJ      (local output)                int *
        On exit, JJ  specifies the local starting column index of the
        submatrix. On exit, JJ is at least 0.
PROW    (global output)               int *
        On exit, PROW is the row coordinate of the process owning the
        entry specified by the global index I.  PROW is at least zero
        and less than NPROW.
PCOL    (global output)               int *
        On exit, PCOL  is the column coordinate of the process owning
        the entry specified by the global index J.  PCOL  is at least
        zero and less than NPCOL.

See Also

HPL_indxg2l, HPL_indxg2p, HPL_indxl2g, HPL_numroc, HPL_numrocI