SLASRT(3)

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

πŸ’… slasrt(3) β€” like, the LAPACK Library Functions Manual, bestie

okay so this is the page for slasrt.f(3), straight outta the LAPACK Library Functions Manual, and honestly? it's a whole vibe. it's a little Fortran file that sorts numbers and it does NOT need to be complicated. let's get into it πŸŽ€


✨ NAME ✨

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

that's the whole path, yeah, it's giving "found deep in the build directory and nobody's ever gonna type it manually". iconic honestly 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions/Subroutines

subroutine SLASRT (id, n, d, info)
SLASRT sorts numbers in increasing or decreasing order.

literally what it says on the tin, no cap πŸ’–


πŸ”₯ Function/Subroutine Documentation πŸ”₯

subroutine SLASRT (character id, integer n, real, dimension( * ) d, integer info)

SLASRT sorts numbers in increasing or decreasing order. that's the entire personality and she owns it πŸ‘‘

🌈 Purpose 🌈

!>
!> Sort the numbers in D in increasing order (if ID = 'I') or
!> in decreasing order (if ID = 'D' ).
!>
!> Use Quick Sort, reverting to Insertion sort on arrays of
!> size <= 20. Dimension of STACK limits N to about 2**32.
!>

so the tea is: it uses Quick Sort, but for little arrays of size <= 20 it switches to Insertion sort because sometimes the small stuff just hits different 🧚 and yeah, the dimension of STACK caps N at about 2**32, so like… don't get any big ideas 🫢

🌸 Parameters 🌸

ID

!>          ID is CHARACTER*1
!>          = 'I': sort D in increasing order;
!>          = 'D': sort D in decreasing order.

one whole character, that's all she needs. 'I' means sort D in increasing order, 'D' means sort D in decreasing order. pick your fighter πŸ’…

N

!>          N is INTEGER
!>          The length of the array D.

just the length of array D. the size of the group chat, if you will ✨

D

!>          D is REAL array, dimension (N)
!>          On entry, the array to be sorted.
!>          On exit, D has been sorted into increasing order
!>          (D(1) <= ... <= D(N) ) or into decreasing order
!>          (D(1) >= ... >= D(N) ), depending on ID.

a REAL array, dimension (N). on entry it's the array you wanna sort, on exit it's the sorted array β€” increasing order (D(1) <= ... <= D(N)) or decreasing order (D(1) >= ... >= D(N)), all depending on ID. she said "I'll be whatever you need me to be" πŸ’€

INFO

!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value

the vibe check of return codes:

  • INFO = 0 β€” successful exit, we ate πŸ‘‘
  • INFO < 0 β€” if INFO = -i, then the i-th argument had an illegal value πŸ™ˆ
fr fr though: negative INFO means you passed something bad in, so check your args before you blame the subroutine, bestie 😭

πŸŽ€ Author πŸŽ€

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

an absolute supergroup, no notes 🫢


⭐ Definition at line 87 of file slasrt.f. ⭐

yep, line 87, go look, she's right there ✨


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for LAPACK from the source code. so nobody hand-wrote this bad boy, a robot did it, and honestly? slay πŸ€–πŸ’…


and that's the whole page!! written for LAPACK Version 3.12.0 and dated /home/abui...RC/slasrt.f(3) β€” mwah, go sort something cute πŸ“πŸ’–

πŸ“¦ where this page comes from