CSWAP(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… CSWAP(3) β€” the girlies swap vectors now

ok so this page lives in the Library Functions Manual section, and the file it's documenting is literally /home/abui...SRC/cswap.f(3) β€” yes that's the header, we're moving on bestie 🫢


✨ NAME ✨

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/BLAS/SRC/cswap.f

that's it. that's the whole name section. it's giving "the file path IS the personality" πŸ’€ (it's from LAPACK, the BLAS SRC folder, you know the vibes)


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions/Subroutines

  • subroutine CSWAP (n, cx, incx, cy, incy)
    • CSWAP

like, that's the whole call. five arguments. no cap ✨


🌸 Function/Subroutine Documentation 🌸

subroutine CSWAP (integer n, complex, dimension(*) cx, integer incx, complex, dimension(*) cy, integer incy)

CSWAP

πŸŽ€ Purpose:

!>
!>   CSWAP interchanges two vectors.
!>

ok so this is THE function. CSWAP interchanges two vectors β€” like, it swaps them. fully trades them. no takebacks. iconic behaviour honestly πŸ‘‘

πŸ’– Parameters

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

it's an INTEGER and it's the number of elements in your input vector(s) β€” the whole count, the vibe check for how much data we're dealing with πŸ”₯

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

a COMPLEX array, and the dimension is literally ( 1 + ( N - 1 )*abs( INCX ) ) β€” write that down, don't freestyle it πŸ’…

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

INTEGER, and it's the storage spacing between elements of CX. so like, how far apart the elements are chillin' in memory πŸ¦‹

  • CY
!>          CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
!>

the other COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) β€” note the INCY, not INCX, she's different, don't mix them up bestie 😭

  • INCY
!>          INCY is INTEGER
!>         storage spacing between elements of CY
!>

INTEGER, storage spacing between elements of CY. matching energy with INCX but for the y side 🫢

πŸ‘‘ Author

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

the whole squad. academic royalty. we stan 🌈

⭐ Further Details:

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

drag him, he's been here since 3/11/78 (linpack era, ancient) and then modified 12/3/93 when the array(1) declarations got changed to array(*). a glow-up for the ages πŸ’œ

Definition at line 80 of file cswap.f. β€” that's literally where she lives, line 80, go look πŸ”


🌺 Author (the meta one) 🌺

Generated automatically by Doxygen for LAPACK from the source code.

so nobody hand-wrote this page, Doxygen did it. slay for automation I guess ✨


lowkey important: all the array dimension formulas, the abs() calls, the dimension(*) in the signature β€” those are the actual contract, so copy them exactly and don't get cute with them πŸ’€

ok that's the whole page bestie, ily, go swap some vectors πŸŽ€

this was LAPACK, Version 3.12.0, and the source file is /home/abui...SRC/cswap.f(3) β€” mwah, see you in the next manpage πŸ’…βœ¨

πŸ“¦ where this page comes from