Skip to content

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

Closed
diptorupd wants to merge 1 commit intoIntelPython:masterfrom
diptorupd:fix/issue_483
Closed

Defines __hash__ for all classes that define __eq__ method.#489
diptorupd wants to merge 1 commit intoIntelPython:masterfrom
diptorupd:fix/issue_483

Conversation

@diptorupd
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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