Skip to content

Remove reference to BangBang#167

Merged
gdalle merged 3 commits intomainfrom
gd/bangbang
Apr 10, 2024
Merged

Remove reference to BangBang#167
gdalle merged 3 commits intomainfrom
gd/bangbang

Conversation

@gdalle
Copy link
Copy Markdown
Member

@gdalle gdalle commented Apr 10, 2024

Amend the warning in the docs to avoid suggesting that the convention is exactly the same as BangBang.jl's

@gdalle gdalle marked this pull request as ready for review April 10, 2024 15:19
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.10%. Comparing base (11233ce) to head (9de122a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #167   +/-   ##
=======================================
  Coverage   94.10%   94.10%           
=======================================
  Files          61       61           
  Lines        2156     2156           
=======================================
  Hits         2029     2029           
  Misses        127      127           

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

@gdalle
Copy link
Copy Markdown
Member Author

gdalle commented Apr 10, 2024

Note however that BangBang.jl itself does not guarantee that the input will be mutated whenever possible:

julia> using BangBang, StaticArrays

julia> src = [2.0, 3.0];

julia> dst_before = zero(src);

julia> dst_after = broadcast!!(abs2, dst_before, src)
2-element Vector{Float64}:
 4.0
 9.0

julia> dst_before  # it was mutated
2-element Vector{Float64}:
 4.0
 9.0

julia> src_static = MVector(2.0, 3.0);

julia> dst_before_static = zero(src_static);

julia> dst_after_static = broadcast!!(abs2, dst_before_static, src_static)
2-element MVector{2, Float64} with indices SOneTo(2):
 4.0
 9.0

julia> dst_before_static # it wasn't mutated but could have been
2-element MVector{2, Float64} with indices SOneTo(2):
 0.0
 0.0

@gdalle gdalle merged commit cf19040 into main Apr 10, 2024
@gdalle gdalle deleted the gd/bangbang branch April 15, 2024 09:02
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.

2 participants