Skip to content

Commit 8a28acb

Browse files
authored
Merge pull request #458 from staticfloat/sf/devices_yet_equal
Add equality overrides for `Device` and `DevicePart`
2 parents 1ce5d52 + 7c030f7 commit 8a28acb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ function get_code(s::Status)
6464
return TF_Code(code)
6565
end
6666

67-
struct DevicePart{IndexType}
67+
@auto_hash_equals struct DevicePart{IndexType}
6868
kind::Vector{String}
6969
index::IndexType
7070
end
7171

7272
device_index_from_zero(part::DevicePart{Int}) = "$(join(part.kind, ":")):$(part.index-1)"
7373
device_index_from_zero(part::DevicePart) = "$(join(part.kind, ":")):$(part.index)"
7474

75-
struct Device
75+
@auto_hash_equals struct Device
7676
parts::Vector{DevicePart}
7777
end
7878

0 commit comments

Comments
 (0)