Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

larscl docs #733

Closed
2 tasks
mgates3 opened this issue Oct 17, 2022 · 1 comment · Fixed by #747
Closed
2 tasks

larscl docs #733

mgates3 opened this issue Oct 17, 2022 · 1 comment · Fixed by #747

Comments

@mgates3
Copy link
Contributor

mgates3 commented Oct 17, 2022

Description

The docs on these are wrong:

    SRC/clarscl2.f
    SRC/dlarscl2.f
    SRC/slarscl2.f
    SRC/zlarscl2.f

ZLARSCL2 says it does "scaling on a vector", but from the arguments (M, N, D, X, LDX) it's pretty clear that X is a matrix, not a vector. The docs are super confusing: "The leading dimension of the vector X. LDX >= M." I assume it should be "matrix" instead of "vector".

Checklist

  • I've included a minimal example to reproduce the issue
  • I'd be willing to make a PR to solve this issue
@langou
Copy link
Contributor

langou commented Oct 17, 2022

Thanks for pointing this out @mgates3.

Ditto for

SRC/clascl2.f
SRC/dlascl2.f
SRC/slascl2.f
SRC/zlascl2.f

The comment reads: BLAS_dge_diag_scale, yes, it would, be nice to have a subroutine that does this.

The *LASCL2 and *LARSCL2 suites would be MUCH better if we could do column scaling or row scaling. Right now this is limited to column scaling. Dang it. This is not good. (Or alternatively, not my preference, one could have a TRANSX flag TRANS or NOTRANS.)

I wonder whether we should have a routine (or a set of routines) that does all four: column scaling only (X := X * Dc or X := X * inv(Dc)), row scaling only (X := Dr * X or X := X * inv(Dc)), column and row scaling both at once (X := Dr * X * Dc), similarity-transformation scaling (X := D * X * inv(D) or X := inv(D) * X * D).

This is kind of already described in Chapter 2: Dense and Banded BLAS, page 72 through the functions: _DIAG_SCALE, _LRSCALE, _LRSCALE,

SUBROUTINE BLAS_xGE_DIAG_SCALE( SIDE, M, N, D, INCD, A, LDA )
SUBROUTINE BLAS_xGE_DIAG_LRSCALE( M, N, DL, INCDL, DR, INCDR, A, LDA )
SUBROUTINE BLAS_xSY_DIAG_LRSCALE( UPLO, N, D, INCD, A, LDA )

A coupe of things missing though: (1) the choice between multiplying or dividing by the scaling factor, and (2) similarity transformation scaling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants