BLAS/SRC/dscal.f(3)

πŸ’– BLAS/SRC/dscal.f β€” the LAPACK manual, bestie edition πŸ’–

okay so you opened the manual for BLAS/SRC/dscal.f and honestly? slay. it's a LAPACK girlie, it lives in the BLAS/SRC folder, and it is here to do exactly one thing extremely well. let's get into it πŸŽ€


✨ NAME ✨

BLAS/SRC/dscal.f β€” that's the file, that's the name, no notes πŸ’…


🌸 SYNOPSIS 🌸

Functions/Subroutines

  • subroutine dscal (n, da, dx, incx) β€” this is DSCAL, the main character πŸ‘‘

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine dscal (integer n, double precision da, double precision,
    dimension(*) dx, integer incx)

DSCAL β€” say it with me, bestie. it's giving legend behaviour.

🎯 Purpose:

DSCAL scales a vector by a constant. uses unrolled loops for increment equal to 1.

so like, it takes your vector and multiplies everything by a constant. and when INCX equals 1? it whips out the unrolled loops, which is lowkey the fast path. iconic optimization moment fr fr ✨

🌈 Parameters

  • N β€” N is INTEGER. it's the number of elements in your input vector(s). simple as that, no cap.
  • DA β€” DA is DOUBLE PRECISION. On entry, DA specifies the scalar alpha. this is your constant, your multiplier, your moment πŸ’«
  • DX β€” DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ). yeah it's a whole formula for the size, just trust the process 🫢
  • INCX β€” INCX is INTEGER. it's the storage spacing between elements of DX. think of it as the stride, the lil hop between each element πŸ‡

πŸ‘‘ Author

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

the whole squad came together for this one, we love a collab πŸ’œ

πŸ“œ 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 is real β€” jack dongarra, linpack, 3/11/78. then in 3/93 it got modified to return if incx .le. 0, and then 12/3/93 the array(1) declarations got changed to array(*). character development fr 😭

πŸ“ Definition

Definition at line 78 of file dscal.f.


πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for LAPACK from the source code. (yes bestie, a robot wrote the docs, and it ate πŸ’…)


and that's the whole page!! Version 3.12.0, dated Tue Nov 28 2023 12:08:41 β€” mwah, go scale some vectors, you've got this πŸŒŸπŸ’–