Skip to content

Remove eltype check in adjtrans #40567

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

Merged
merged 1 commit into from
May 4, 2021
Merged

Remove eltype check in adjtrans #40567

merged 1 commit into from
May 4, 2021

Conversation

dkarrasch
Copy link
Member

@dkarrasch dkarrasch commented Apr 22, 2021

This is a manual "rebase" of #25274. It removes the eltype checks at construction, which leaves users who call the constructor directly with more responsibility of providing correct eltype.

Closes #25274.

Not sure how to correctly assign authorship here:

Co-authored-by: Andy Ferris [email protected]

@dkarrasch dkarrasch added the linear algebra Linear algebra label Apr 22, 2021
@propagate_inbounds getindex(v::AdjOrTransAbsVec, i::Int) = wrapperop(v)(v.parent[i-1+first(axes(v.parent)[1])])
@propagate_inbounds getindex(A::AdjOrTransAbsMat, i::Int, j::Int) = wrapperop(A)(A.parent[j, i])
@propagate_inbounds getindex(v::AdjOrTransAbsVec{T}, i::Int) where {T} = wrapperop(v)(v.parent[i-1+first(axes(v.parent)[1])])::T
@propagate_inbounds getindex(A::AdjOrTransAbsMat{T}, i::Int, j::Int) where {T} = wrapperop(A)(A.parent[j, i])::T
Copy link
Member

Choose a reason for hiding this comment

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

Should this also apply to the getindex methods on the next line?

@dkarrasch
Copy link
Member Author

@andyferris Do you still have an opinion on this? It's been a while.

@palday
Copy link
Contributor

palday commented Apr 26, 2021

@dkarrasch for the co-authorship, you do it when you commit / rebase: https://docs.github.com/en/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors

@dkarrasch
Copy link
Member Author

@dkarrasch for the co-authorship, you do it when you commit / rebase: https://docs.github.com/en/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors

That helped me in another rebase PR. The next issue is that I can't find @andyferris's e-mail address.

@simeonschaub
Copy link
Member

simeonschaub commented May 4, 2021

I found this a while ago, which usually works pretty well: https://www.sourcecon.com/how-to-find-almost-any-github-users-email-address/. I added the address to the PR description, so you should just need to squash merge.

There really should be some official interface for this though...

@dkarrasch dkarrasch force-pushed the dk/simpler_adjtrans branch from 54fd671 to 2a45741 Compare May 4, 2021 08:15
Copy link
Member

@andyferris andyferris left a comment

Choose a reason for hiding this comment

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

Sorry I missed these messages.

Looks like a decent simplification to me. I suppose that this is still a good idea?

@andyferris
Copy link
Member

Should we merge this? @Sacha0 any follow-up thoughts?

Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

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

Fine by me! Let's live dangerously with marginally fewer safety checks! 🏴‍☠️

@andyferris andyferris merged commit 6f7d07d into master May 4, 2021
@andyferris andyferris deleted the dk/simpler_adjtrans branch May 4, 2021 21:42
@andyferris
Copy link
Member

Thanks @dkarrasch

antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
Co-authored-by: Andy Ferris <[email protected]>

Co-authored-by: Andy Ferris <[email protected]>
dghosef pushed a commit to dghosef/julia that referenced this pull request May 11, 2021
Co-authored-by: Andy Ferris <[email protected]>

Co-authored-by: Andy Ferris <[email protected]>
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
Co-authored-by: Andy Ferris <[email protected]>

Co-authored-by: Andy Ferris <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants