Skip to content

Rename the four-argument add! to scaleadd! - #239

Merged
mtfishman merged 2 commits into
mainfrom
mf/scaleadd
Oct 3, 2026
Merged

mtfishman merged 2 commits into
mainfrom
mf/scaleadd

Conversation

@mtfishman

Copy link
Copy Markdown
Member

Summary

Renames the four-argument add!(dest, src, α, β) to scaleadd!, leaving add! with only its two-argument meaning. One name for two operations was easy to misread, since add!(dest, src) adds while the four-argument form computes β * dest + α * src.

`add!(dest, src)` adds while the four-argument form computes
`β * dest + α * src`, so the scaled operation gets its own name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.21%. Comparing base (f6043ad) to head (edf1c9d).

Files with missing lines Patch % Lines
ext/TensorAlgebraTensorKitExt.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #239      +/-   ##
==========================================
- Coverage   83.40%   83.21%   -0.20%     
==========================================
  Files          29       29              
  Lines         946      947       +1     
==========================================
- Hits          789      788       -1     
- Misses        157      159       +2     
Flag Coverage Δ
docs 23.81% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The extension overloads the four-argument method for `AbstractTensorMap` and
calls it from `copyto!`, so it follows the rename.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mtfishman
mtfishman merged commit be8355b into main Oct 3, 2026
19 of 21 checks passed
@mtfishman
mtfishman deleted the mf/scaleadd branch October 3, 2026 00:22
mtfishman added a commit to ITensor/GradedArrays.jl that referenced this pull request Oct 3, 2026
## Summary

Follows the rename of TensorAlgebra's four-argument `add!` to
`scaleadd!` (ITensor/TensorAlgebra.jl#239). Call
sites only, no change to what GradedArrays itself exposes.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
mtfishman added a commit to ITensor/ITensorBase.jl that referenced this pull request Oct 3, 2026
## Summary

Follows the rename of TensorAlgebra's four-argument `add!` to
`scaleadd!` (ITensor/TensorAlgebra.jl#239). The
`VectorInterface` methods keep the `add!` name, since that is
VectorInterface's own interface rather than TensorAlgebra's.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant