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

Change Ref -> tuple in broadcasting CartesianVector #1366

Merged
merged 1 commit into from
Jul 13, 2023
Merged

Change Ref -> tuple in broadcasting CartesianVector #1366

merged 1 commit into from
Jul 13, 2023

Conversation

charleskawczynski
Copy link
Member

This PR changes Ref -> tuple in broadcasting CartesianVector, since we were having allocation issues with Ref.

@charleskawczynski
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Jul 12, 2023
1366: Change Ref -> tuple in broadcasting CartesianVector r=charleskawczynski a=charleskawczynski

This PR changes Ref -> tuple in broadcasting CartesianVector, since we were having allocation issues with `Ref`.

Co-authored-by: Charles Kawczynski <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jul 12, 2023

Build failed:

@charleskawczynski
Copy link
Member Author

@simonbyrne, this is basically failing because:

julia> [1][]
1

julia> (1,)[]
ERROR: MethodError: no method matching getindex(::Tuple{Int64})
Closest candidates are:
  getindex(::Tuple, ::Int64) at tuple.jl:29
  getindex(::Tuple, ::Integer) at tuple.jl:30
  getindex(::Tuple, ::Colon) at tuple.jl:33
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[3]:1

We precisely fail in get_node:

Base.@propagate_inbounds function get_node(space, scalar, ij, slabidx)
    scalar[]
end

Should we replace the scalar[]s with scalar[1]?

@simonbyrne
Copy link
Member

Or define

Base.@propagate_inbounds function get_node(space, scalar::Tuple{<:Any}, ij, slabidx)
    scalar[1]
end

?

@charleskawczynski
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Jul 13, 2023
1366: Change Ref -> tuple in broadcasting CartesianVector r=charleskawczynski a=charleskawczynski

This PR changes Ref -> tuple in broadcasting CartesianVector, since we were having allocation issues with `Ref`.

Co-authored-by: Charles Kawczynski <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jul 13, 2023

Build failed:

@charleskawczynski
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 13, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 445448e into main Jul 13, 2023
@bors bors bot deleted the ck/ref branch July 13, 2023 22:23
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