HPL_dmatgen(3)

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

✨ HPL_dmatgen ✨

ok so bestie, welcome to the HPL Library Functions corner of the man pages πŸŽ€ this one's about HPL_dmatgen and honestly? it's giving matrix factory πŸ’…


🌸 NAME 🌸

HPL_dmatgen β€” random matrix generator, no cap 🎲✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include "hpl.h"

void HPL_dmatgen( const int M, const int N, double * A, const int LDA,
                  const int ISEED );

πŸ’– DESCRIPTION πŸ’–

okay so HPL_dmatgen generates (or regenerates) a random matrix A. yes, regenerates too β€” it's a whole reset button, slay πŸ”₯

the pseudo-random generator uses 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. iykyk πŸ“šβœ¨


πŸ‘‘ ARGUMENTS πŸ‘‘

  • M (input) β€” const int

on entry, M specifies the number of rows of the matrix A. M must be at least zero. zero rows? allowed bestie, just sayin' 🌈

  • N (input) β€” const int

on entry, N specifies the number of columns of the matrix A. N must be at least zero. same energy, same rule 🫢

  • A (output) β€” double *

on entry, A points to an array of dimension (LDA,N). on exit, this array contains the coefficients of the randomly generated matrix. it walks in as an empty-ish array and leaves as ✨the matrix✨ πŸ’…

  • LDA (input) β€” const int

on entry, LDA specifies the leading dimension of the array A. LDA must be at least max(1,M). don't be cute with this one, it's a hard floor 😀

  • ISEED (input) β€” const int

on entry, ISEED specifies the seed number to generate the matrix A. ISEED must be at least zero. pick your seed, pick your destiny πŸ“

fr fr, those "must be at least" rules aren't decorative β€” they're the vibe check of this whole function πŸ’€

🌈 SEE ALSO 🌈

  • HPL_ladd (3)
  • HPL_lmul (3)
  • HPL_setran (3)
  • HPL_xjumpm (3)
  • HPL_jumpit (3)
  • HPL_rand (3)

the whole random-number bestie squad, go read them too πŸ§šπŸ’œ


that's the whole page, periodt πŸ’– this one's from HPL 2.2, dated February 24, 2016 β€” so like, it's an icon from a different era but she still ate πŸŽ€βœ¨ bye bestie, go generate some matrices πŸ¦‹

πŸ“¦ where this page comes from