asum(3)

✨ asum(3) ✨ β€” the LAPACK page where we sum up absolute values πŸ’…

okay so bestie, this is a page from section 3 of the library manual (that's the (3) in asum(3), iykyk), and it's giving "four little functions that all do the same iconic thing but for different types" energy. no cap, it's a classic. let's get into it πŸŽ€


🌸 NAME 🌸

asum β€” asum: sum | real( x_i ) | + | imag( x_i ) |

literally that's the whole vibe: add up absolute values. ✨


πŸŽ€ SYNOPSIS πŸŽ€

Functions

  • double precision function dasum (n, dx, incx) β€” DASUM
  • double precision function dzasum (n, zx, incx) β€” DZASUM
  • real function sasum (n, sx, incx) β€” SASUM
  • real function scasum (n, cx, incx) β€” SCASUM

Detailed Description

(that's it, that's the whole detailed description section β€” she's mysterious, she's minimal, she's a main character πŸ™ˆ)


πŸ’œ Function Documentation πŸ’œ

πŸ”₯ double precision function dasum (integer n, double precision, dimension(*) dx, integer incx)

DASUM

Purpose:

!>
!>    DASUM takes the sum of the absolute values.
!>

Parameters

  • N
!>          N is INTEGER
!>         number of elements in input vector(s)
  • DX
!>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
  • INCX
!>          INCX is INTEGER
!>         storage spacing between elements of DX

Author

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

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(*)
!>

Definition at line 70 of file dasum.f.


πŸ¦‹ double precision function dzasum (integer n, complex*16, dimension(*) zx, integer incx)

DZASUM

Purpose:

!>
!>    DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and
!>    returns a double precision result.
!>

Parameters

  • N
!>          N is INTEGER
!>         number of elements in input vector(s)
  • ZX
!>          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
  • INCX
!>          INCX is INTEGER
!>         storage spacing between elements of ZX

Author

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

Further Details:

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

Definition at line 71 of file dzasum.f.


⭐ real function sasum (integer n, real, dimension(*) sx, integer incx)

SASUM

Purpose:

!>
!>    SASUM takes the sum of the absolute values.
!>    uses unrolled loops for increment equal to one.
!>

(okay the unrolled loops for increment equal to one? that's her flex, she's fast πŸ’…)

Parameters

  • N
!>          N is INTEGER
!>         number of elements in input vector(s)
  • SX
!>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
  • INCX
!>          INCX is INTEGER
!>         storage spacing between elements of SX

Author

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

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(*)
!>

Definition at line 71 of file sasum.f.


πŸ“ real function scasum (integer n, complex, dimension(*) cx, integer incx)

SCASUM

Purpose:

!>
!>    SCASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and
!>    returns a single precision result.
!>

Parameters

  • N
!>          N is INTEGER
!>         number of elements in input vector(s)
  • CX
!>          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
  • INCX
!>          INCX is INTEGER
!>         storage spacing between elements of SX
ngl bestie, that last one says SX even though this function's array is CX β€” that's literally what the page says, so that's what you get. not me editing the sacred text πŸ™ˆ

Author

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

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(*)
!>

Definition at line 71 of file scasum.f.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for LAPACK from the source code.


and that's the whole page, bestie β€” every flag, every parameter, every !> comment, every jack dongarra credit, all of it, untouched and iconic 🫢

LAPACK β€” Version 3.12.0 Β· that's the footer energy, periodt. go sum something absolute and slay πŸ’–βœ¨πŸŒˆ

πŸ“¦ where this page comes from