BLAS/SRC/strsm.f(3)

πŸ’– BLAS/SRC/strsm.f(3) β€” aka the LAPACK girlies' guide to STRSM πŸ’–

okay bestie, sit DOWN, because we're about to talk about one of my absolute faves from the LAPACK collection. it's BLAS/SRC/strsm.f, it's giving level 3 BLAS royalty, and yes it's a .f file so we're in Fortran country, no cap. πŸŽ€


✨ NAME ✨

BLAS/SRC/strsm.f β€” that's the whole name, that's the whole vibe, she's iconic and she knows it πŸ’…


✨ SYNOPSIS ✨

🌸 Functions/Subroutines

  • subroutine strsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) β€” and under that it just says STRSM. that's it. that's the whole girl. ✨

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

the whole signature, character for character, no edits, i promise 🫢

subroutine strsm (character side, character uplo, character transa,
    character diag, integer m, integer n, real alpha, real, dimension(lda,*)
    a, integer lda, real, dimension(ldb,*) b, integer ldb)

STRSM

πŸ’œ Purpose:

listen. STRSM solves one of these matrix equations, and you're gonna love her:

op( A )*X = alpha*B,   or   X*op( A ) = alpha*B,

where alpha is a scalar, X and B are m by n matrices, A is a unit, or non-unit, upper or lower triangular matrix and op( A ) is one of

op( A ) = A   or   op( A ) = A**T.

and the tea? β˜• the matrix X is overwritten on B. she does not make a copy, she does not ask permission, she just moves in. periodt. πŸ’…


🌈 Parameters

SIDE

SIDE is CHARACTER*1

on entry, SIDE specifies whether op( A ) appears on the left or right of X, like:

  • SIDE = 'L' or 'l' β†’ op( A )*X = alpha*B.
  • SIDE = 'R' or 'r' β†’ X*op( A ) = alpha*B.

UPLO

UPLO is CHARACTER*1

on entry, UPLO spills whether the matrix A is upper or lower triangular:

  • UPLO = 'U' or 'u' β†’ A is an upper triangular matrix.
  • UPLO = 'L' or 'l' β†’ A is a lower triangular matrix.

TRANSA

TRANSA is CHARACTER*1

on entry, TRANSA says what form of op( A ) is being used in the matrix multiplication:

  • TRANSA = 'N' or 'n' β†’ op( A ) = A.
  • TRANSA = 'T' or 't' β†’ op( A ) = A**T.
  • TRANSA = 'C' or 'c' β†’ op( A ) = A**T.

(yes 'T' and 'C' land on the exact same thing here, that's not a typo, that's just the lore 🫢)

DIAG

DIAG is CHARACTER*1

on entry, DIAG specifies whether or not A is unit triangular:

  • DIAG = 'U' or 'u' β†’ A is assumed to be unit triangular.
  • DIAG = 'N' or 'n' β†’ A is not assumed to be unit triangular.

M

M is INTEGER

on entry, M specifies the number of rows of B. M must be at least zero. (zero is allowed bestie, don't panic 😌)

N

N is INTEGER

on entry, N specifies the number of columns of B. N must be at least zero.

ALPHA

ALPHA is REAL

on entry, ALPHA specifies the scalar alpha. and here's the fun bit: when alpha is zero then A is not referenced and B need not be set before entry. she said "i don't even need your data" πŸ’€βœ¨

A

A is REAL array, dimension ( LDA, k ), where k is m when SIDE = 'L' or 'l' and k is n when SIDE = 'R' or 'r'.

before entry, with UPLO = 'U' or 'u', the leading k by k upper triangular part of the array A must contain the upper triangular matrix, and the strictly lower triangular part of A is not referenced.

before entry, with UPLO = 'L' or 'l', the leading k by k lower triangular part of the array A must contain the lower triangular matrix, and the strictly upper triangular part of A is not referenced.

heads up babes: when DIAG = 'U' or 'u', the diagonal elements of A are not referenced either, but are assumed to be unity. so those diagonal numbers you typed in? she's not reading them. she's assuming 1. πŸ’…

LDA

LDA is INTEGER

on entry, LDA specifies the first dimension of A as declared in the calling (sub) program. when SIDE = 'L' or 'l' then LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' then LDA must be at least max( 1, n ).

B

B is REAL array, dimension ( LDB, N )

before entry, the leading m by n part of the array B must contain the right-hand side matrix B, and on exit is overwritten by the solution matrix X. told you. she moves in. 🏠✨

LDB

LDB is INTEGER

on entry, LDB specifies the first dimension of B as declared in the calling (sub) program. LDB must be at least max( 1, m ).


πŸ‘‘ Author

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

the whole academic friend group came together for this one, we love a collab 🫢


🧚 Further Details:

  • Level 3 Blas routine. (level 3!! main character energy fr fr πŸ”₯)
  • -- Written on 8-February-1989.
    • Jack Dongarra, Argonne National Laboratory.
    • Iain Duff, AERE Harwell.
    • Jeremy Du Croz, Numerical Algorithms Group Ltd.
    • Sven Hammarling, Numerical Algorithms Group Ltd.

1989?? and she's still serving looks. generational icon. πŸ’–


⭐ Definition

definition at line 180 of file strsm.f.


🌸 Author (yes, again)

generated automatically by Doxygen for LAPACK from the source code. so technically a robot wrote this page, but the robot ate, no notes. πŸ€–πŸ’…


okay final vibe check bestie: SIDE, UPLO, TRANSA, DIAG are all CHARACTER*1, M and N and LDA and LDB are INTEGER, ALPHA is REAL, A and B are REAL arrays, and X lives on top of B now. slay. πŸŽ€

LAPACK β€” Version 3.12.0, dated Tue Nov 28 2023 12:08:41 β€” page BLAS/SRC/strsm.f(3). bye bestie, go solve something triangular, ily πŸ’œπŸ¦‹βœ¨