single_blas_level1(3)

πŸ“¦
version 3.11.0 Β· 2 versions
, in debian bookworm

πŸ’– single_blas_level1 πŸ’–

okay bestie, gather round, because this is the glow-up of the LAPACK single_blas_level1(3) page β€” the whole squad of real LEVEL 1 BLAS routines, all in one place. i folded the manual name up here so you know what you're reading: this is the single_blas_level1 page from the LAPACK manual. no cap, it's a lot, so we're doing it in two parts. this is part 1. πŸŽ€


✨ NAME ✨

single_blas_level1 β€” real πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions

  • real function sasum (N, SX, INCX) β€” SASUM
  • subroutine saxpy (N, SA, SX, INCX, SY, INCY) β€” SAXPY
  • real function scabs1 (Z) β€” SCABS1
  • real function scasum (N, CX, INCX) β€” SCASUM
  • subroutine scopy (N, SX, INCX, SY, INCY) β€” SCOPY
  • real function sdot (N, SX, INCX, SY, INCY) β€” SDOT
  • real function sdsdot (N, SB, SX, INCX, SY, INCY) β€” SDSDOT
  • subroutine srot (N, SX, INCX, SY, INCY, C, S) β€” SROT
  • subroutine srotm (N, SX, INCX, SY, INCY, SPARAM) β€” SROTM
  • subroutine srotmg (SD1, SD2, SX1, SY1, SPARAM) β€” SROTMG
  • subroutine sscal (N, SA, SX, INCX) β€” SSCAL
  • subroutine sswap (N, SX, INCX, SY, INCY) β€” SSWAP

🌸 DETAILED DESCRIPTION 🌸

This is the group of real LEVEL 1 BLAS routines. that's the whole vibe. it's the foundational friend group of linear algebra, and they all live right here. 🫢


πŸ”₯ FUNCTION DOCUMENTATION πŸ”₯

real function sasum (integer N, real, dimension(*) SX, integer INCX)

SASUM πŸ‘‘

Purpose

SASUM takes the sum of the absolute values. it uses unrolled loops for increment equal to one. efficiency queen behavior, honestly. ✨

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

subroutine saxpy (integer N, real SA, real, dimension() SX, integer INCX, real, dimension() SY, integer INCY)

SAXPY πŸ’–

Purpose

SAXPY does constant times a vector plus a vector. it uses unrolled loops for increments equal to one. the classic y = a*x + y, she's iconic and she knows it.

Parameters

  • N β€” N is INTEGER, number of elements in input vector(s)
  • SA β€” SA is REAL. On entry, SA specifies the scalar alpha.
  • SX β€” SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
  • INCX β€” INCX is INTEGER, storage spacing between elements of SX
  • SY β€” SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
  • INCY β€” INCY is INTEGER, storage spacing between elements of SY

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

real function scabs1 (complex Z)

SCABS1 🌈

Purpose

SCABS1 computes |Re(.)| + |Im(.)| of a complex number. that's it. that's the whole function. short and slays. πŸ’…

Parameters

  • Z β€” Z is COMPLEX

Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


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. so it's SASUM's complex bestie, fr fr.

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

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

subroutine scopy (integer N, real, dimension() SX, integer INCX, real, dimension() SY, integer INCY)

SCOPY 🧚

Purpose

SCOPY copies a vector, x, to a vector, y. it uses unrolled loops for increments equal to 1. literally just passing the vibe along, no notes. 😭

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
  • SY β€” SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
  • INCY β€” INCY is INTEGER, storage spacing between elements of SY

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

real function sdot (integer N, real, dimension() SX, integer INCX, real, dimension() SY, integer INCY)

SDOT ⭐

Purpose

SDOT forms the dot product of two vectors. it uses unrolled loops for increments equal to one. multiply, add, repeat β€” the main character of level 1, honestly. πŸ‘‘

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
  • SY β€” SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
  • INCY β€” INCY is INTEGER, storage spacing between elements of SY

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

real function sdsdot (integer N, real SB, real, dimension() SX, integer INCX, real, dimension() SY, integer INCY)

SDSDOT πŸ’œ

Purpose

Compute the inner product of two vectors with extended precision accumulation.

Returns S.P. result with dot product accumulated in D.P.

SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY),
where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
defined in a similar way using INCY.

so yeah β€” single precision result, double precision glow-up during the math. it's giving "best of both worlds". ✨

Parameters

  • N β€” N is INTEGER, number of elements in input vector(s)
  • SB β€” SB is REAL, single precision scalar to be added to inner product
  • SX β€” SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ), single precision vector with N elements
  • INCX β€” INCX is INTEGER, storage spacing between elements of SX
  • SY β€” SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ), single precision vector with N elements
  • INCY β€” INCY is INTEGER, storage spacing between elements of SY

Author

Lawson, C. L., (JPL), Hanson, R. J., (SNLA),

Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Further Details

REFERENCES

C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T. Krogh, Basic linear algebra subprograms for Fortran usage, Algorithm No. 539, Transactions on Mathematical Software 5, 3 (September 1979), pp. 308-323.

REVISION HISTORY (YYMMDD)

791001  DATE WRITTEN
890531  Changed all specific intrinsics to generic.  (WRB)
890831  Modified array declarations.  (WRB)
890831  REVISION DATE from Version 3.2
891214  Prologue converted to Version 4.0 format.  (BAB)
920310  Corrected definition of LX in DESCRIPTION.  (WRB)
920501  Reformatted the REFERENCES section.  (WRB)
070118  Reformat to LAPACK coding style

subroutine srot (integer N, real, dimension() SX, integer INCX, real, dimension() SY, integer INCY, real C, real S)

SROT πŸŒ€

Purpose

applies a plane rotation. spin those vectors, bestie. πŸ’«

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
  • SY β€” SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
  • INCY β€” INCY is INTEGER, storage spacing between elements of SY
  • C β€” C is REAL
  • S β€” S is REAL

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

subroutine srotm (integer N, real, dimension() SX, integer INCX, real, dimension() SY, integer INCY, real, dimension(5) SPARAM)

SROTM πŸ”₯

Purpose

APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX

(SX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF SX ARE IN (SX**T)

SX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE LX = (-INCX)*N, AND SIMILARLY FOR SY USING USING LY AND INCY.

WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..

SFLAG=-1.E0     SFLAG=0.E0        SFLAG=1.E0     SFLAG=-2.E0

  (SH11  SH12)    (1.E0  SH12)    (SH11  1.E0)    (1.E0  0.E0)
H=(          )    (          )    (          )    (          )
  (SH21  SH22),   (SH21  1.E0),   (-1.E0 SH22),   (0.E0  1.E0).

SEE SROTMG FOR A DESCRIPTION OF DATA STORAGE IN SPARAM.

heads up bestie: which of those four forms H takes is decided entirely by SFLAG in SPARAM(1) β€” so don't go guessing, the flag tells you. πŸ™ˆ

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
  • SY β€” SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
  • INCY β€” INCY is INTEGER, storage spacing between elements of SY
  • SPARAM β€” SPARAM is REAL array, dimension (5)
    • SPARAM(1)=SFLAG
    • SPARAM(2)=SH11
    • SPARAM(3)=SH21
    • SPARAM(4)=SH12
    • SPARAM(5)=SH22

Author πŸ’–

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

subroutine srotmg πŸ‘‘

   subroutine srotmg (real SD1, real SD2, real SX1, real SY1, real,
       dimension(5) SPARAM)

SROTMG

Purpose: ok bestie, listen up β€” this routine constructs the modified Givens transformation matrix H which zeros the second component of the 2-vector (SQRT(SD1)*SX1,SQRT(SD2)*> SY2)**T. With SPARAM(1)=SFLAG, H can take one of these forms:

SFLAG=-1.E0     SFLAG=0.E0        SFLAG=1.E0     SFLAG=-2.E0

  (SH11  SH12)    (1.E0  SH12)    (SH11  1.E0)    (1.E0  0.E0)
H=(          )    (          )    (          )    (          )
  (SH21  SH22),   (SH21  1.E0),   (-1.E0 SH22),   (0.E0  1.E0).

Locations 2-4 of SPARAM contain SH11, SH21, SH12, and SH22 respectively. (Values of 1.E0, -1.E0, or 0.E0 implied by the value of SPARAM(1) are not stored in SPARAM.)

The values of GAMSQ and RGAMSQ set in the DATA statement may be inexact. This is OK as they are only used for testing the size of SD1 and SD2. All actual scaling of data is done using GAM.

Parameters:

  • SD1 β€” SD1 is REAL
  • SD2 β€” SD2 is REAL
  • SX1 β€” SX1 is REAL
  • SY1 β€” SY1 is REAL
  • SPARAM β€” SPARAM is REAL array, dimension (5)
    • SPARAM(1)=SFLAG
    • SPARAM(2)=SH11
    • SPARAM(3)=SH21
    • SPARAM(4)=SH12
    • SPARAM(5)=SH22

Author: Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, NAG Ltd.


subroutine sscal πŸ¦‹

   subroutine sscal (integer N, real SA, real, dimension(*) SX, integer INCX)

SSCAL

Purpose: SSCAL scales a vector by a constant. It uses unrolled loops for increment equal to 1. Lowkey efficient, no cap.

Parameters:

  • N β€” N is INTEGER number of elements in input vector(s)
  • SA β€” SA is REAL On entry, SA specifies the scalar alpha.
  • 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(*)

subroutine sswap 🌸

   subroutine sswap (integer N, real, dimension(*) SX, integer INCX, real,
       dimension(*) SY, integer INCY)

SSWAP

Purpose: SSWAP interchanges two vectors. It uses unrolled loops for increments equal to 1. It’s giving swap energy, periodt.

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
  • SY β€” SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
  • INCY β€” INCY is INTEGER storage spacing between elements of SY

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

Author πŸ’…

Generated automatically by Doxygen for LAPACK from the source code.

This whole page is serving Version 3.11.0, dated Sun Nov 27 2022. Stay iconic, bestie! πŸŽ€βœ¨

πŸ“¦ where this page comes from