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

fix invalidations in sort! from Static.jl #46491

Merged
merged 5 commits into from
Aug 29, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
return type assertion with where needs long form
  • Loading branch information
ranocha committed Aug 29, 2022
commit 6b218f8a8b813ed77551ae64f13b15f4b4a8db75
8 changes: 6 additions & 2 deletions base/sort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1486,8 +1486,12 @@ right(::DirectOrdering) = Right()
left(o::Perm) = Perm(left(o.order), o.data)
right(o::Perm) = Perm(right(o.order), o.data)

lt(::Left, x::T, y::T)::Bool where {T<:Floats} = slt_int(y, x)
lt(::Right, x::T, y::T)::Bool where {T<:Floats} = slt_int(x, y)
function lt(::Left, x::T, y::T)::Bool where {T<:Floats}
slt_int(y, x)
end
function lt(::Right, x::T, y::T)::Bool where {T<:Floats}
slt_int(x, y)
end

uint_map(x::Float16, ::Left) = ~reinterpret(UInt16, x)
uint_unmap(::Type{Float16}, u::UInt16, ::Left) = reinterpret(Float16, ~u)
Expand Down