HPL_dmatgen(3)
β¨ 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
- 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