Closed dmarcuse closed 5 years ago
It would be convenient if OpenCL objects had an implementation for Hash, to support uses like HashSet<Device>. It should be pretty trivial to implement, just writing the pointer of the object to the Hasher.
Hash
HashSet<Device>
Hasher
Sounds good to me.
Should I implement this in a PR?
Sure if you'd like.
I'd probably just start by implementing it for DeviceId (and PlatformId, etc. if you want). Then you can just derive it on the higher level types.
DeviceId
PlatformId
It would be convenient if OpenCL objects had an implementation for
Hash
, to support uses likeHashSet<Device>
. It should be pretty trivial to implement, just writing the pointer of the object to theHasher
.