Skip to content

Commit 7f6a693

Browse files
committed
Avoid widemul and Int128
1 parent 9a325c7 commit 7f6a693

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/device/quirks.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,13 @@ end
5757
@print_and_throw "Out-of-bounds access of scalar value"
5858
x
5959
end
60+
61+
# From Metal.jl to avoid widemul and Int128
62+
@static if VERSION >= v"1.12.0-DEV.1736" # Partially reverts JuliaLang/julia PR #56750
63+
let BitInteger64 = Union{Int64, UInt64}
64+
@device_override function Base.checkbounds(::Type{Bool}, v::StepRange{<:BitInteger64, <:BitInteger64}, i::BitInteger64)
65+
@inline
66+
return checkindex(Bool, eachindex(IndexLinear(), v), i)
67+
end
68+
end
69+
end

0 commit comments

Comments
 (0)