BLAS/SRC/cgeru.f(3)

✨ NAME ✨

BLAS/SRC/cgeru.f β€” that's the file, bestie. It's the BLAS source page you landed on, straight out of the Library Functions Manual, and it's all about one lil' subroutine that's about to eat πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

Functions/Subroutines

  • subroutine cgeru (m, n, alpha, x, incx, y, incy, a, lda) β€” CGERU. That's the whole squad right there: m, n, alpha, x, incx, y, incy, a, lda. No cap.

🌸 Function/Subroutine Documentation 🌸

Here's the full signature, character-for-character, because we do not freestyle with declarations:

subroutine cgeru (integer m, integer n, complex alpha, complex, dimension(*)
    x, integer incx, complex, dimension(*) y, integer incy, complex,
    dimension(lda,*) a, integer lda)

CGERU πŸ‘‘

πŸ’– Purpose πŸ’–

Okay so, straight from the source, here's what CGERU actually does:

!>
!> CGERU  performs the rank 1 operation
!>
!>    A := alpha*x*y**T + A,
!>
!> where alpha is a scalar, x is an m element vector, y is an n element
!> vector and A is an m by n matrix.
!>

It's giving rank 1 operation, and honestly? Iconic. You hand it a scalar alpha, an m-element vector x, and an n-element vector y, and it folds alpha*x*y**T right on top of your m-by-n matrix A. Main character energy fr fr πŸ”₯

🌈 Parameters 🌈

M

M is INTEGER. On entry, M specifies the number of rows of the matrix A. M must be at least zero β€” so like, zero rows is fine, negative rows is not it πŸ™ˆ

N

N is INTEGER. On entry, N specifies the number of columns of the matrix A. N must be at least zero. Same vibe check as M ✨

ALPHA

ALPHA is COMPLEX. On entry, ALPHA specifies the scalar alpha. That's the whole job. She's just a scalar and she knows it πŸ’…

X

X is COMPLEX array, dimension at least

( 1 + ( m - 1 )*abs( INCX ) ).

Before entry, the incremented array X must contain the m element vector x. So make sure X is actually loaded up before you come at her with it 🫢

INCX

INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. And listen β€” INCX must not be zero. Like, that's the one rule. Don't do it πŸ’€

Y

Y is COMPLEX array, dimension at least

( 1 + ( n - 1 )*abs( INCY ) ).

Before entry, the incremented array Y must contain the n element vector y. Yes you need Y and X. It's a whole two-vector situation, we love that for us 🌸

INCY

INCY is INTEGER. On entry, INCY specifies the increment for the elements of Y. Same deal as INCX: INCY must not be zero. Periodt πŸŽ€

A

A is COMPLEX array, dimension ( LDA, N ). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. On exit, A is overwritten by the updated matrix. So she does get rewritten β€” that's not a bug, that's the assignment, bestie 😭πŸ”₯

LDA

LDA is INTEGER. On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. LDA must be at least

max( 1, m ).

Read that carefully. max( 1, m ). Not m. Not n. Lock it in πŸ‘‘


πŸ‘‘ Author πŸ‘‘

Credit where credit is due, and there's a whole committee:

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

πŸ’œ Further Details πŸ’œ

The receipts, verbatim:

!>
!>  Level 2 Blas routine.
!>
!>  -- Written on 22-October-1986.
!>     Jack Dongarra, Argonne National Lab.
!>     Jeremy Du Croz, Nag Central Office.
!>     Sven Hammarling, Nag Central Office.
!>     Richard Hanson, Sandia National Labs.
!>

Level 2 BLAS routine, written on 22-October-1986 β€” literally older than your mom and still out here slaying on every call 🧚✨

Also worth knowing: it's defined at line 129 of file cgeru.f. That's the actual line, not a vibe.

Author of this page itself: generated automatically by Doxygen for LAPACK from the source code. Not a human, but she ate anyway πŸ€–πŸ’–


That's the whole page, bestie β€” every parameter, every dimension expression, every "must not be zero", all of it preserved and none of it skipped. Go forth and call cgeru responsibly. πŸ¦‹

Signing off from LAPACK, Version 3.12.0, on page BLAS/SRC/cgeru.f(3) β€” see you in the next manpage, mwah πŸ«ΆπŸ’…

πŸ“¦ where this page comes from