HPL_logsort(3)
π HPL_logsort(3) π
okay bestie, welcome to the HPL Library Functions corner of the manual, and today's main character is literally HPL_logsort π
β¨ NAME β¨
HPL_logsort β sort the processes in logarithmic order π¦
β¨ SYNOPSIS β¨
#include "hpl.h"
void HPL_logsort( const int NPROCS, const int ICURROC, int * IPLEN, int
* IPMAP, int * IPMAPM1 );
β¨ DESCRIPTION β¨
so HPL_logsort computes an array IPMAP and its inverse IPMAPM1, and those two contain the logarithmically sorted process ids with repect to the local number of rows of U that they own πΈ
why do we even care? because this is necessary to ensure that the logarithmic spreading of U is optimal in terms of number of steps and communication volume as well β¨ in other words β and this is the whole vibe β the larget pieces of U will be sent a minimal number of times π
no cap, that's the entire point.
β¨ ARGUMENTS β¨
NPROCS(global input)const intβ On entry,NPROCSspecifies the number of process rows in the process grid.NPROCSis at least one. so like, the absolute minimum is one, don't come at it with zero πICURROC(global input)const intβ On entry,ICURROCis the source process row. πIPLEN(global input/output)int *β On entry,IPLENis an array of dimensionNPROCS+1, such thatIPLEN[0]is0, andIPLEN[i]contains the number of rows ofU, that processi-1has. On exit,IPLEN[i]is the number of rows ofUin the processes before processIPMAP[i]after the sort, with the convention thatIPLEN[NPROCS]is the total number of rows of the panel. In other words,IPLEN[i+1] - IPLEN[i]is the number of rows ofAthat should be moved to the processIPMAP[i].IPLENis such that the number of rows of the source process row isIPLEN[1] - IPLEN[0], and the remaining entries of this array are sorted so that the quantitiesIPLEN[i+1]-IPLEN[i]are logarithmically sorted. π§
ngl this one does double duty β it comes in with one job and leaves with a whole new one. input and output, she's versatile π
IPMAP(global output)int *β On entry,IPMAPis an array of dimensionNPROCS. On exit, array contains the logarithmic mapping of the processes. In other words,IPMAP[myroc]is the corresponding sorted process coordinate. πΊοΈIPMAPM1(global output)int *β On entry,IPMAPM1is an array of dimensionNPROCS. On exit, this array contains the inverse of the logarithmic mapping contained inIPMAP:IPMAPM1[ IPMAP[i] ] = i, for alliin[0.. NPROCS). it's giving "undo button but make it a whole array" π
β¨ SEE ALSO β¨
HPL_plindx1 (3)HPL_plindx10 (3)HPL_pdlaswp01N (3)HPL_pdlaswp01T (3)
that's the whole page bestie, you ate it π go forth and sort logarithmically, fr fr π«Ά
HPL 2.2 π February 24, 2016 π β mwah, that's the version and the date, signed off with love, periodt πβ¨
π¦ where this page comes from
- fedora 43: hpl-doc 2.2-22.fc43 Β· LicenseRef-Callaway-BSD-with-advertising
- fedora 44: hpl-doc 2.2-23.fc44 Β· LicenseRef-Callaway-BSD-with-advertising
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms