Skip to content

use atomics for loading ICD loader handle vs. C++ static initialization #18

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

Merged
merged 1 commit into from
Sep 28, 2020

Conversation

bashbaug
Copy link
Owner

Possible fix for #17

Description of Changes

Uses std::atomics when opening a handle to the ICD loader vs. C++ static initialization.

Testing Done

Stepped through a sample that queried platforms and devices and verified that all API calls succeeded and the ICD loader handle was only opened once.

@bashbaug
Copy link
Owner Author

@rcombs would you mind taking a look at this to see if it fixes #17 for you? Thanks!

Copy link

@rcombs rcombs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the long delay in getting this tested; I've been having some logistical issues on my end. This appears to be working fine here and the code looks good!

@bashbaug bashbaug merged commit 3fb4f6d into master Sep 28, 2020
@bashbaug bashbaug deleted the atomic-handle-load branch October 20, 2020 04:27
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.

2 participants