HPL_pipid(3)
π HPL_pipid β the pivot-vector glow-up π
okay bestie, you know how HPL lives in the HPL Library Functions cinematic universe? yeah. this is HPL_pipid, and she's here to make your pivot vector make sense. slay. π
β¨ NAME β¨
HPL_pipid β simplify the pivot vector. that's it, that's the job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
#include "hpl.h"
void HPL_pipid( HPL_T_panel * PANEL, int * K, int * IPID );
π¦ DESCRIPTION π¦
so HPL_pipid computes an array IPID that holds the source and the final destination of matrix rows, and this all comes from applying N interchanges β the kind that get computed by the LU factorization with row partial pivoting. β¨
the vibe of IPID is this: the row with global index IPID(i) should get mapped onto the row with global index IPID(i+1). simple, iconic, no notes. π«Ά
now, lowkey, we cannot actually know the length of IPID ahead of time. but bestie, we do know some things:
- the array is at least
2*Nlong, because there areNrows to swap and broadcast. - the length must be smaller than or equal to
4*N, since every row is swapped with at most a single distinct remote row.
the algorithm that builds IPID goes like this: let IA be the global index of the first row to be swapped. periodt.
π« the actual algorithm π«
for every row src = IA + i with i in [0..N) that's getting swapped with row dst, where dst is given by DPIV[i]:
1. is row src the destination of a previous row of the current block? i.e., is there some k odd such that IPID(k) is equal to src?
- Yes: update this destination with
dst. for example, if the pivot array is(0,2)(1,1)(2,5) ..., then when we swap rows2and5, we swap in fact row0and5, i.e., row0goes to5and not2as it was thought so far ... π - No: add the pair
(src,dst)at the end ofIPID; rowsrchas not been moved yet. π
2. is row dst different from src the destination of a previous row of the current block? i.e., is there some k odd such that IPID(k) is equal to dst?
- Yes: update
IPID(k)withsrc. for example, if the pivot array is(0,5)(1,1)(2,5) ..., then when we swap rows2and5, we swap in fact row2and0, i.e., row0goes to2and not5as it was thought so far ... π - No: add the pair
(dst,src)at the end ofIPID; rowdsthas not been moved yet. β¨
note bestie: whensrcis equal todst, the pair(dst,src)should not be added toIPID, and that's to avoid duplicated entries in this array. no duplicates allowed, it's giving main character only. π
during the construction of the array IPID, we make sure that the first N entries are such that IPID(k) with k odd is equal to IA+k/2. π
and for k in [0..K/2), the row of global index IPID(2*k) should be mapped onto the row of global index IPID(2*k+1). that's the whole point, iykyk. π
π ARGUMENTS π
PANELβ (local input/output)HPL_T_panel *on entry,PANELpoints to the data structure containing the panel information. she's the container, she holds the lore. π¦Kβ (global output)int *on exit,Kspecifies the number of entries inIPID.Kis at least2*N, and at most4*N. (yes, that range again. consistency is hot. π₯)IPIDβ (global output)int *on entry,IPIDis an array of length4*N. on exit, the firstKentries of that array contain thesrcand final destination resulting from the application of theNinterchanges as specified byDPIV. the pairs(src,dst)are contiguously stored and sorted so thatIPID(2*i+1)is equal toIA+iwithiin[0..N). immaculate. π β¨
π«Ά SEE ALSO π«Ά
HPL_pdlaswp00N (3)HPL_pdlaswp00T (3)HPL_pdlaswp01N (3)HPL_pdlaswp01T (3)
and that's the whole page bestie, we ate and left absolutely no crumbs π
HPL 2.2 Β· February 24, 2016 β go off, historic release notes, you're iconic ππ
π¦ 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