We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Device
DevicePart
1 parent 1ce5d52 commit 5836e54Copy full SHA for 5836e54
src/core.jl
@@ -72,11 +72,14 @@ end
72
device_index_from_zero(part::DevicePart{Int}) = "$(join(part.kind, ":")):$(part.index-1)"
73
device_index_from_zero(part::DevicePart) = "$(join(part.kind, ":")):$(part.index)"
74
75
+==(a::DevicePart, b::DevicePart) = a.kind == b.kind && a.index == b.index
76
+
77
struct Device
78
parts::Vector{DevicePart}
79
end
80
81
Device() = Device(DevicePart[])
82
+==(a::Device, b::Device) = a.parts == b.parts
83
84
function DevicePart(s::AbstractString)
85
parts = split(s, ":")
0 commit comments