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

Handle const addr casts #1752

Merged
merged 3 commits into from
Aug 25, 2024
Merged

Handle const addr casts #1752

merged 3 commits into from
Aug 25, 2024

Conversation

wsmoses
Copy link
Member

@wsmoses wsmoses commented Aug 25, 2024

No description provided.

test/runtests.jl Outdated
@@ -780,6 +780,38 @@ end
@test hess[1][2] ≈ 1.0
@test hess[2][1] ≈ 1.0
@test hess[2][2] ≈ 0.0

function f_ip(x, tmp)
tmp .= identity.(x)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure you'll trigger the issue with identity, I think the broadcasting machinery specializes on that one to produce the same code as tmp .= x. That's why I used the custom g(x) = x---equally trivial logic, but without the specialized code path.

Copy link
Contributor

Choose a reason for hiding this comment

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

Confirming that identity fails to trigger the issue on my end. If you don't want to define the extra function you can also replace with something like tmp .= x ./ 2.

Copy link
Contributor

github-actions bot commented Aug 25, 2024

Benchmark Results

main fda7936... main/fda7936367b29d...
basics/overhead 4.34 ± 0.01 ns 4.64 ± 0.01 ns 0.935
time_to_load 0.453 ± 0.0021 s 0.454 ± 0.0026 s 0.996

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

@wsmoses wsmoses merged commit b9be0ac into main Aug 25, 2024
34 of 56 checks passed
@wsmoses wsmoses deleted the caddr branch August 25, 2024 21:38
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