HPL_dlaprnt(3)
π 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,Mspecifies the number of rows of A.Mmust be at least zero. no negative rows, we don't do that here πNβ (local input)const int. On entry,Nspecifies the number of columns of A.Nmust be at least zero. same vibe check asM, keep it β₯ 0 bestie.Aβ (local input)double *. On entry,Apoints to an array of dimension(LDA,N). that's your matrix right there, the main character πIAβ (local input)const int. On entry,IAspecifies 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,JAspecifies 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,LDAspecifies the leading dimension of the array A.LDAmust be at leastmax(1,M). don't skimp on this one, it's a hard requirement fr fr.CMATNMβ (local input)const char *. On entry,CMATNMis 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,MandNmust each be at least zero, andLDAmust be at leastmax(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
- 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