HPL_pdmatgen(3)

πŸ“¦ version 2.2, in fedora 43, fedora 44

✨ 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, GRID points 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, M specifies the number of rows of the matrix A. M must be at least zero. no negative row counts babes, that's not a thing πŸ™ˆ
  • N β€” (global input) const int β€” on entry, N specifies the number of columns of the matrix A. N must be at least zero. same vibe, zero is fine, negative is not πŸ’€
  • NB β€” (global input) const int β€” on entry, NB specifies the blocking factor used to partition and distribute the matrix A. NB must be larger than one. like, strictly bigger. 1 is not invited to this party 🚫
  • A β€” (local output) double * β€” on entry, A points 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, LDA specifies the leading dimension of the array A. LDA must be at least max(1,LocP(M)). it's giving "respect the stride" energy ⭐
  • ISEED β€” (global input) const int β€” on entry, ISEED specifies the seed number used to generate the matrix A. ISEED must 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