BLAS/SRC/sscal.f(3)

πŸ’… BLAS/SRC/sscal.f(3) β€” Library Functions Manual, but make it cute

okay bestie, so this is a manual page from the BLAS/SRC/sscal.f(3) corner of the universe (that "(3)" means it's a library function, iykyk). Buckle up, we're scaling vectors today and it's gonna slay ✨


πŸ¦‹ NAME

BLAS/SRC/sscal.f β€” the file itself, main character energy, no notes πŸ’…


🌸 SYNOPSIS

✨ Functions/Subroutines

  • subroutine sscal (n, sa, sx, incx) β€” the one and only SSCAL, here to do exactly one job and do it gorgeously

πŸŽ€ Function/Subroutine Documentation

subroutine sscal (integer n, real sa, real, dimension(*) sx, integer incx)

SSCAL 🫢

🌈 Purpose:

!>
!>    SSCAL scales a vector by a constant.
!>    uses unrolled loops for increment equal to 1.
!>

So real talk: SSCAL scales a vector by a constant β€” multiply-a-whole-vector-by-one-number type beat. And the glow-up? It uses unrolled loops for increment equal to 1, which is the compiler-girlie equivalent of showing up with a full beat face πŸ‘‘


⭐ Parameters

  • N
!>          N is INTEGER
!>         number of elements in input vector(s)

N is INTEGER and it's literally the number of elements in input vector(s). She counts, she's organized, she's the planner friend πŸ—’οΈβœ¨

  • SA
!>          SA is REAL
!>           On entry, SA specifies the scalar alpha.

SA is REAL. On entry, SA specifies the scalar alpha β€” that's the constant everything gets multiplied by. The alpha of the operation, fr fr πŸ’œ

  • SX
!>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )

SX is a REAL array with dimension ( 1 + ( N - 1 )*abs( INCX ) ). Yes the formula is giving messy but that's the actual size, copy it exactly bestie, no rounding, no vibes-based math πŸ™ˆ

  • INCX
!>          INCX is INTEGER
!>         storage spacing between elements of SX

INCX is INTEGER β€” the storage spacing between elements of SX. basically how far apart the elements are sitting in memory, like personal space for numbers 🫧


πŸ‘‘ Author

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

four absolute legends, all credited, all iconic πŸ†


πŸ”₯ Further Details:

!>
!>     jack dongarra, linpack, 3/11/78.
!>     modified 3/93 to return if incx .le. 0.
!>     modified 12/3/93, array(1) declarations changed to array(*)
!>

the lore drop πŸ•°οΈ β€” jack dongarra, linpack, 3/11/78. then modified 3/93 to return if incx .le. 0. and later modified 12/3/93, array(1) declarations changed to array(*). historical document honestly, museum-worthy πŸ’€βœ¨


🌸 Definition

Definition at line 78 of file sscal.f. go look, she's there, line 78, being perfect πŸ’–


🧚 Author

Generated automatically by Doxygen for LAPACK from the source code. not a human, a whole robot wrote this, and honestly? it ate πŸ€–πŸ’…


heads up bestie: the incx .le. 0. behaviour is documented above as a modification, and the array dimension formula ( 1 + ( N - 1 )*abs( INCX ) ) is the real deal β€” don't go improvising your own numbers, that's how you get undefined behaviour and a bad vibe check 😭

that's the whole page, no cap, every flag and every word accounted for 🫢

LAPACK β€” Version 3.12.0, dated with the BLAS/SRC/sscal.f(3) header energy β€” mwah, bye bestie, go scale something gorgeous πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from