-
Notifications
You must be signed in to change notification settings - Fork 74
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
create shared memory without user provided id #2255
Comments
Interesting. Is it safer than the current approach? |
This approach is at least compatible too the current interface. This you could still be explicit with your ID.
This would be something that must be tested. I do not know the optimizations for device linked code. |
I created ID's in a shared library within a function foo and in the main CPU. Linked it together and the IDs are unique. |
The user does not need to fiddle around with the counter makro and the interface will become nice because there is no need to explicitly set the ID. |
Yes, I completely agree with this. My concern is a case where
Now, Does this approach based on unique lambda addresses make things more robust ?
|
Currently we need a unique id to create in kernel static shared memory:
With c++20 we could auto generate this id:
test it live: https://godbolt.org/z/MrhbvncET
will be
This based on the id generator I saw in this talk
https://www.youtube.com/watch?v=lPfA4SFojao
The text was updated successfully, but these errors were encountered: