Skip to content

Commit

Permalink
Better version??
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Feb 7, 2025
1 parent 4ea0848 commit f4b4a58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/device/intrinsics/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,14 @@ end
if metal_version() >= sv"3.1" # macOS 14+
ccall("extern air.nextafter.f32", llvmcall, Cfloat, (Cfloat, Cfloat), x, y)
else
error()
reinterpret(Float32, reinterpret(UInt32, x) + sign(y-x))
end
end
@device_function function nextafter(x::Float16, y::Float16)
if metal_version() >= sv"3.1" # macOS 14+
ccall("extern air.nextafter.f16", llvmcall, Float16, (Float16, Float16), x, y)
else
error()
reinterpret(Float16, reinterpret(UInt16, x) + sign(y-x))
end
end

Expand Down

0 comments on commit f4b4a58

Please sign in to comment.