lapacke_example_aux.c(3)
π lapacke_example_aux.c π
ok so bestie, welcome to lapacke_example_aux.c β it's a little helper file from the LAPACK fam (yes, that LAPACK, the linear-algebra icon π), and it's honestly giving "supporting cast that carries the whole show." It's not a program you run, it's a trio of lil utility functions that print your matrices and vectors so you can actually see what your math did. No cap, debugging LAPACK without these is a nightmare π
β¨ NAME β¨
lapacke_example_aux.c β the auxiliary example file. That's it, that's the name, she's lowkey humble about it π
π¦ SYNOPSIS π¦
So first things first, you gotta pull in the headers, like:
#include <lapacke.h>
#include <stdio.h>
<lapacke.h> is the LAPACKE main character header, and <stdio.h> is there because... girl, we're printing π
πΈ Functions πΈ
Here's the whole squad, all three of them, exactly as declared:
void print_matrix_rowmajor (char *desc, lapack_int m, lapack_int n,
double *mat, lapack_int ldm)
void print_matrix_colmajor (char *desc, lapack_int m, lapack_int n,
double *mat, lapack_int ldm)
void print_vector (char *desc, lapack_int n, lapack_int *vec)
Three functions, three vibes: two matrix printers (row-major girlie and col-major girlie, they are not the same, do not confuse them π) and one vector printer. iykyk.
β Function Documentation β
π void print_matrix_colmajor (char * desc, lapack_int m, lapack_int n, double * mat, lapack_int ldm)
Definition at line 17 of file lapacke_example_aux.c.
The column-major printer!! This is the one where the data is stored column by column (Fortran energy fr fr π). You hand it a desc, the dimensions m and n, the mat pointer, and the leading dimension ldm. It's gonna do the print thing.
π₯ void print_matrix_rowmajor (char * desc, lapack_int m, lapack_int n, double * mat, lapack_int ldm)
Definition at line 5 of file lapacke_example_aux.c.
Same exact signature as her sister above, but this one reads your mat in row-major order β the C way, the way your brain probably pictures it. Same params: desc, m, n, mat, ldm. Slay.
π¦ void print_vector (char * desc, lapack_int n, lapack_int * vec)
Definition at line 28 of file lapacke_example_aux.c.
Not a matrix this time bestie, it's a vector β vec, with n elements, plus your desc label. Note the type: it's a lapack_int *, not a double *. Different printer, different type, keep up π
β¨
π Author π
Generated automatically by Doxygen for LAPACK from the source code. (So like, don't come for the prose, a robot wrote it π€π)
Lowkey the whole point of this page: these are auxiliary examples, so they're here to show how it's done, not to be some fancy library API. Treat them as teaching material and you're golden π«Ά
Version 3.8.0 Β· Tue Nov 14 2017 Β· manual page lapacke_example_aux.c(3) β okay that's the whole thing, mwah, go print some matrices πππ
π¦ where this page comes from
- centos-stream 9: lapack 3.9.0-10.el9 Β· BSD
- centos-stream 9: lapack 3.9.0-10.el9 Β· BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms