File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -64,22 +64,19 @@ function get_code(s::Status)
64
64
return TF_Code (code)
65
65
end
66
66
67
- struct DevicePart{IndexType}
67
+ @auto_hash_equals struct DevicePart{IndexType}
68
68
kind:: Vector{String}
69
69
index:: IndexType
70
70
end
71
71
72
72
device_index_from_zero (part:: DevicePart{Int} ) = " $(join (part. kind, " :" )) :$(part. index- 1 ) "
73
73
device_index_from_zero (part:: DevicePart ) = " $(join (part. kind, " :" )) :$(part. index) "
74
74
75
- == (a:: DevicePart , b:: DevicePart ) = a. kind == b. kind && a. index == b. index
76
-
77
- struct Device
75
+ @auto_hash_equals struct Device
78
76
parts:: Vector{DevicePart}
79
77
end
80
78
81
79
Device () = Device (DevicePart[])
82
- == (a:: Device , b:: Device ) = a. parts == b. parts
83
80
84
81
function DevicePart (s:: AbstractString )
85
82
parts = split (s, " :" )
You can’t perform that action at this time.
0 commit comments