Skip to content

[linalg.algs.blas2.rank1,linalg.algs.blas2.symherrank1] Restore missing arguments in P3371R5 updating overloads#8995

Merged
tkoeppe merged 2 commits into
cplusplus:mainfrom
abhinavagarwal07:fix-blas2-updating-overload-args
May 12, 2026
Merged

[linalg.algs.blas2.rank1,linalg.algs.blas2.symherrank1] Restore missing arguments in P3371R5 updating overloads#8995
tkoeppe merged 2 commits into
cplusplus:mainfrom
abhinavagarwal07:fix-blas2-updating-overload-args

Conversation

@abhinavagarwal07
Copy link
Copy Markdown
Contributor

The detailed wording for two updating overloads introduced by P3371R5 is inconsistent with the synopsis and surrounding effects wording.

  • [linalg.algs.blas2.rank1]matrix_rank_1_update_c non-ExecutionPolicy Effects codeblock dispatches to the 3-arg overwriting overload, dropping E.
  • [linalg.algs.blas2.symherrank1] — updating hermitian_matrix_rank_1_update detailed declaration drops in-vector InVec, in-matrix InMat, Scalar alpha, and InMat E, even though Effects compute A = E + alpha x x^H and Remarks state "A may alias E".

…ects

The non-ExecutionPolicy codeblock dispatches to the overwriting
3-argument matrix_rank_1_update, dropping the InMat E parameter
and computing A = x conj(y)^T instead of the specified
A = E + x conj(y)^T. The ExecutionPolicy branch already passes E.
The detailed declaration drops in-vector InVec, in-matrix InMat,
Scalar alpha, and InMat E, even though the Effects compute
A = E + alpha x x^H and the Remarks state "A may alias E".
Match the synopsis.
@eisenwave eisenwave added the P1-Important Misapplication of paper, malformed code, internal inconsistencies label Apr 27, 2026
@tkoeppe tkoeppe requested a review from jwakely May 2, 2026 14:23
Comment thread source/numerics.tex
equivalent to:
\begin{codeblock}
matrix_rank_1_update(x, conjugated(y), A);
matrix_rank_1_update(x, conjugated(y), E, A);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread source/numerics.tex
@\exposconcept{scalar}@ Scalar, @\exposconcept{in-vector}@ InVec, @\exposconcept{in-matrix}@ InMat, @\exposconcept{possibly-packed-out-matrix}@ OutMat,
class Triangle>
void hermitian_matrix_rank_1_update(ExecutionPolicy&& exec,
Scalar alpha, InVec x, InMat E, OutMat A, Triangle t);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tkoeppe
Copy link
Copy Markdown
Contributor

tkoeppe commented May 12, 2026

Thank you both!

@tkoeppe tkoeppe merged commit d2e19cd into cplusplus:main May 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1-Important Misapplication of paper, malformed code, internal inconsistencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants