Skip to content

Defines __hash__ for all classes that define __eq__ method. #489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

diptorupd
Copy link
Contributor

  • SyclContext, SyclDevice, SyclQueue classes previously where
    not hashable. The PR defines hash function based on the
    C API native pointer value stored in the classes.

Closes #483

  - SyclContext, SyclDevice, SyclQueue classes previously where
    not hashable. The PR defines __hash__ function based on the
    C API native pointer value stored in the classes.
@oleksandr-pavlyk
Copy link
Contributor

oleksandr-pavlyk commented Jun 2, 2021

I think simply hashing the address is not enough. We also need to use std::hash of the underlying object.

@diptorupd
Copy link
Contributor Author

superseded by #491

@diptorupd diptorupd closed this Jun 21, 2021
@diptorupd diptorupd deleted the fix/issue_483 branch November 30, 2021 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All the Sycl* extension types should define a __hash__ function.
2 participants