BLAS/SRC/sswap.f(3)

πŸ’… BLAS/SRC/sswap.f

okay so bestie, welcome to sswap β€” the Fortran BLAS routine that literally just swaps two vectors. that's it. that's the whole personality. and honestly? iconic. ✨

it lives in BLAS/SRC/sswap.f and this whole page was auto-generated by Doxygen for LAPACK, so like, don't @ me about the formatting. πŸŽ€


✨ SYNOPSIS ✨

πŸ¦‹ Functions/Subroutines

  • subroutine sswap (n, sx, incx, sy, incy) β€” the one and only, aka SSWAP πŸ‘‘

🌸 Function/Subroutine Documentation 🌸

πŸ’œ subroutine sswap (integer n, real, dimension(*) sx, integer incx, real, dimension(*) sy, integer incy)

SSWAP 🫢

⭐ Purpose:

!>
!>    SSWAP interchanges two vectors.
!>    uses unrolled loops for increments equal to 1.
!>

so yes β€” it interchanges two vectors. swaps them. trades their spots. no cap. and when the increments are exactly 1, it busts out the unrolled loops because it's extra like that πŸ”₯

πŸŽ€ Parameters

N

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

the count of elements in your input vector(s), bestie. how many we're swapping. INTEGER, obviously πŸ’…

SX

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

REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ). yes the formula is that specific, write it down πŸ“

INCX

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

INTEGER β€” the storage spacing between elements of SX. it's giving "how far apart are we walking, queen" πŸšΆβ€β™€οΈ

SY

!>          SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
!>

REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ). note the INCY in there, not INCX β€” they're different, don't mix them up πŸ™ˆ

INCY

!>          INCY is INTEGER
!>         storage spacing between elements of SY
!>

INTEGER β€” storage spacing between elements of SY. matching energy, different vector πŸ’«

πŸ‘‘ Author

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

🌈 Further Details:

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

a little lore for you: jack dongarra, linpack, 3/11/78. and then modified 12/3/93, array(1) declarations changed to array(*) β€” the glow-up era πŸ¦‹

Definition at line 81 of file sswap.f.


πŸ’– Author

Generated automatically by Doxygen for LAPACK from the source code. (so if the vibes are weird, blame the robot, not me 😭)


and that's the whole thing, bestie β€” every flag, every dimension, every !> comment preserved with love 🫢

fr fr do not go changing INCX and INCY around unless you actually mean it, they control the storage spacing and the array dimension formulas literally depend on them πŸ’€

LAPACK Β· Version 3.12.0 Β· BLAS/SRC/sswap.f(3) β€” mwah, that's the sign-off, slay, periodt πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from