HPL_dlatcpy(3)
π HPL_dlatcpy π
okay bestie, listen up β this is a page from the HPL Library Functions manual, and it's about a lil function called HPL_dlatcpy. she's a transposer. she flips. she's giving main character energy in the world of dense linear algebra and honestly? we're obsessed. π«Ά
β¨ NAME β¨
HPL_dlatcpy β it's literally just B := A^T, no cap π
πΈ SYNOPSIS πΈ
#include "hpl.h"
void HPL_dlatcpy( const int M, const int N, const double * A, const int
LDA, double * B, const int LDB );
π¦ DESCRIPTION π¦
So here's the tea: HPL_dlatcpy copies the transpose of an array A into an array B. That's it. That's the whole vibe. A goes in, A-flipped comes out, B catches it. β¨
π ARGUMENTS π
Mβ (local input)const intβ on entry,Mis the number of rows of the arrayBand the number of columns ofA. and like,Mmust be at least zero. fr. πNβ (local input)const intβ on entry,Nis the number of rows of the arrayAand the number of columns ofB. alsoNmust be at least zero, no exceptions bestie. πAβ (local input)const double *β on entry,Apoints to an array of dimension(LDA,M).LDAβ (local input)const intβ on entry,LDAspecifies the leading dimension of the arrayA.LDAmust be at leastMAX(1,N). not up for debate. πΈBβ (local output)double *β on entry,Bpoints to an array of dimension(LDB,N). on exit,Bis overwritten with the transpose ofA. bye original contents, it was nice knowing you πLDBβ (local input)const intβ on entry,LDBspecifies the leading dimension of the arrayB.LDBmust be at leastMAX(1,M). yes queen, respect the leading dimension. π
π EXAMPLE π
okay so here's a whole lil program showing her in action:
#include "hpl.h"
int main(int argc, char *argv[])
{
double a[2*2], b[2*2];
a[0] = 1.0; a[1] = 3.0; a[2] = 2.0; a[3] = 4.0;
HPL_dlacpy( 2, 2, a, 2, b, 2 );
printf(" [%f,%f]\n", b[0], b[2]);
printf("b=[%f,%f]\n", b[1], b[3]);
exit(0); return(0);
}
(and yes, that example calls HPL_dlacpy β we're just reporting the lore exactly as it was written, don't come for me π)
π SEE ALSO π
HPL_dlacpy(3).
bestie reminder: check your leading dimensions.LDA >= MAX(1,N),LDB >= MAX(1,M). that's the whole vibe check. π₯
this has been the HPL 2.2 edition of the manual, dated February 24, 2016 β mwah, slay, periodt π β¨π¦
π¦ 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