HPL_dlatcpy(3)

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

πŸ’– 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, M is the number of rows of the array B and the number of columns of A. and like, M must be at least zero. fr. πŸ’€
  • N β€” (local input) const int β€” on entry, N is the number of rows of the array A and the number of columns of B. also N must be at least zero, no exceptions bestie. πŸŽ€
  • A β€” (local input) const double * β€” on entry, A points to an array of dimension (LDA,M).
  • LDA β€” (local input) const int β€” on entry, LDA specifies the leading dimension of the array A. LDA must be at least MAX(1,N). not up for debate. 🌸
  • B β€” (local output) double * β€” on entry, B points to an array of dimension (LDB,N). on exit, B is overwritten with the transpose of A. bye original contents, it was nice knowing you 😭
  • LDB β€” (local input) const int β€” on entry, LDB specifies the leading dimension of the array B. LDB must be at least MAX(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