HPL_dlaprnt(3)

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

πŸ’… HPL_dlaprnt β€” bestie, it prints your matrix ✨

okay so this is a page from the HPL Library Functions manual, and today we're talking about HPL_dlaprnt(3) β€” the little function that literally just prints a matrix. no cap. it's giving "I'm a debug print and I know it" energy and honestly? we stan.


🌸 NAME 🌸

HPL_dlaprnt β€” Print the matrix A. that's it. that's the whole job. she shows up, she prints, she leaves πŸ’…


✨ SYNOPSIS ✨

#include "hpl.h"

void HPL_dlaprnt( const int M, const int N, double * A, const int IA,
const int JA, const int LDA, const char * CMATNM );

like, copy that header include exactly bestie, don't be out here improvising πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

HPL_dlaprnt prints to standard error an M-by-N matrix A.

periodt. it goes to stderr, not stdout β€” so if you're piping stuff around and wondering why your matrix ghosted you, that's why. she's loud but she's private πŸ”₯


πŸ‘‘ ARGUMENTS πŸ‘‘

  • M β€” (local input) const int. On entry, M specifies the number of rows of A. M must be at least zero. no negative rows, we don't do that here πŸ™ˆ
  • N β€” (local input) const int. On entry, N specifies the number of columns of A. N must be at least zero. same vibe check as M, keep it β‰₯ 0 bestie.
  • A β€” (local input) double *. On entry, A points to an array of dimension (LDA,N). that's your matrix right there, the main character πŸ’–
  • IA β€” (local input) const int. On entry, IA specifies the starting row index to be printed. like, where do you want the printing to start row-wise πŸŽ€
  • JA β€” (local input) const int. On entry, JA specifies the starting column index to be printed. and where it starts column-wise. the lil corner you're peeking from ✨
  • LDA β€” (local input) const int. On entry, LDA specifies the leading dimension of the array A. LDA must be at least max(1,M). don't skimp on this one, it's a hard requirement fr fr.
  • CMATNM β€” (local input) const char *. On entry, CMATNM is the name of the matrix to be printed. so you can label your matrix like "A" and it'll show up in the output, cute 🏷️

πŸ“ EXAMPLE πŸ“

okay so here's a whole little program that slays:

#include "hpl.h"

int main(int argc, char *argv[])
{
   double a[2*2];
   a[0] = 1.0; a[1] = 3.0; a[2] = 2.0; a[3] = 4.0;
   HPL_dlaprnt( 2, 2, a, 0, 0, 2, "A" );
   exit(0); return(0);
}

see how a is a double a[2*2] β€” four lil guys β€” and we print a 2-by-2 starting at row 0, column 0, with leading dimension 2, labeled "A". chef's kiss, no notes πŸ‘‘


🌈 SEE ALSO 🌈

  • HPL_fprintf (3) β€” go read that one too bestie, they're literally linked.

πŸ’€ real talk: the output goes to standard error, M and N must each be at least zero, and LDA must be at least max(1,M). break those and that's on you, not on her.

so yeah, that's HPL_dlaprnt(3) from the HPL 2.2 library functions crew, dated February 24, 2016. oldie but a goodie, still serving looks in the group chat πŸ’œπŸ«Ά go print a matrix and feel something. mwah πŸŽ€

πŸ“¦ where this page comes from