HPL_pdmatgen(3)
β¨ HPL_pdmatgen π (it's a HPL Library Functions moment, iykyk)
π NAME π
HPL_pdmatgen β the parallel random matrix generator, bestie. she makes numbers appear out of thin air, but like, in parallel. π
β¨ SYNOPSIS β¨
#include "hpl.h"
void HPL_pdmatgen( const HPL_T_grid * GRID, const int M, const int N,
const int NB, double * A, const int LDA, const int ISEED );
πΈ DESCRIPTION πΈ
okay so HPL_pdmatgen generates (or regenerates, she does both, she's versatile πββοΈ) a parallel random matrix A. no cap.
the pseudo-random generator is running the linear congruential algorithm:
X(n+1) = (a * X(n) + c) mod m
as described in the Art of Computer Programming, Knuth 1973, Vol. 2. yeah she's citing Knuth, she's an intellectual actually πβ¨
π ARGUMENTS π
GRIDβ (local input)const HPL_T_grid *β on entry,GRIDpoints to the data structure containing the process grid information. it's literally the map of who's who in the grid, main character energy fr πΊοΈMβ (global input)const intβ on entry,Mspecifies the number of rows of the matrixA.Mmust be at least zero. no negative row counts babes, that's not a thing πNβ (global input)const intβ on entry,Nspecifies the number of columns of the matrixA.Nmust be at least zero. same vibe, zero is fine, negative is not πNBβ (global input)const intβ on entry,NBspecifies the blocking factor used to partition and distribute the matrixA.NBmust be larger than one. like, strictly bigger.1is not invited to this party π«Aβ (local output)double *β on entry,Apoints to an array of dimension(LDA,LocQ(N)). on exit, this array contains the coefficients of the randomly generated matrix. so she goes in empty and comes out iconic πLDAβ (local input)const intβ on entry,LDAspecifies the leading dimension of the arrayA.LDAmust be at leastmax(1,LocP(M)). it's giving "respect the stride" energy βISEEDβ (global input)const intβ on entry,ISEEDspecifies the seed number used to generate the matrixA.ISEEDmust be at least zero. same seed, same vibes, that's the whole point of a seed bestie π±
π¦ SEE ALSO π¦
HPL_ladd(3)HPL_lmul(3)HPL_setran(3)HPL_xjumpm(3)HPL_jumpit(3)HPL_drand(3)
the whole random-number squad, they roll together π«Ά
and that's the page!! this one's from HPL 2.2, dated February 24, 2016 β a classic, a legend, an icon, and she was serving HPL_pdmatgen(3) the entire time. πβ¨π
π¦ 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