lis_array_matmat_ns(3)

πŸ“¦ version 2.1.11, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

✨ lis_array_matmat_ns β€” bestie edition ✨

okay so this is a page from the Lis Library Functions manual, and today's main character is lis_array_matmat_ns(3). it's giving "math but make it rectangular" πŸ’…


πŸ’– NAME πŸ’–

lis_array_matmat_ns β€” calculate the matrix-matrix product

no cap, that's literally what it does. it multiplies matrices. slay. πŸ¦‹


🌸 SYNOPSIS 🌸

#include "lis.h"

LIS_INT lis_array_matmat_ns(LIS_INT l, LIS_INT m, LIS_INT n, LIS_SCALAR
a[], LIS_INT lda, LIS_SCALAR b[], LIS_INT ldb, LIS_SCALAR c[], LIS_INT
ldc, LIS_INT op);

like, here's the whole signature, character for character, because we do NOT play with code 🫢


πŸŽ€ DESCRIPTION πŸŽ€

Calculate the matrix-matrix product AB, where matrices A and B are not square.

yes bestie, we're in our rectangular era. the "ns" is right there in the name and it means these matrices said "square is a construct" and went off to live their truth. πŸ‘‘


🌈 INPUT 🌈

  • l, m, n β€” The sizes of the matrices. that's it, that's the vibe check on dimensions.
  • a β€” The array that stores matrix A of size l * m
  • lda β€” The size of the leading dimension of array A
  • b β€” The array that stores matrix B of size m * n
  • ldb β€” The size of the leading dimension of array B
  • c β€” The array that stores matrix C of size l * n
  • ldc β€” The size of the leading dimension of array C
  • op β€” the mode selector, the moment of truth, pick your fighter:
    • LIS_INS_VALUE β€” C = AB
    • LIS_SUB_VALUE β€” C = C - AB
so LIS_INS_VALUE is the "overwrite it, fresh start, new me" option and LIS_SUB_VALUE is the "subtract the product from what's already there" option. lowkey iconic that you get to choose. πŸ™ˆ

πŸ’œ OUTPUT πŸ’œ

  • C β€” C

yes. the output is C. the array you handed in comes back with the answer in it. very demure, very mindful. ✨


πŸ’€ EXIT STATUS πŸ’€

The following exit values are returned:

  • 0 β€” The process is normally terminated. we ate, no crumbs. πŸ”₯
  • unspecified β€” An error occurred. not the vibe. 😭

🧚 SEE ALSO 🧚


and that's the whole page bestie, hope it was helpful, ily, go forth and multiply (matrices) πŸŒΈπŸ’–βœ¨

sign-off time: this one's from the Man Page corner of the Lis Library Functions collection, dated 10 Oct 2015, and it goes by lis_array_matmat_ns(3). periodt. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from