Move Only Events#206
Open
MrBurmark wants to merge 52 commits into
Open
Conversation
Define type traits there as well, then specialize them at the top of the resource files based on forward declarations. This allows them to be used in the implementations of the types and in Event/Resource.
Use this to simplify EventProxy
Note that they have no value when they are default constructed
This is mostly a performance optimization
This avoids ambiguity with nullptr
adayton1
reviewed
Jun 3, 2026
adayton1
reviewed
Jun 3, 2026
adayton1
reviewed
Jun 3, 2026
adayton1
reviewed
Jun 3, 2026
It might be better to actually test using an empty Resource here as that was the main reason to check for 0 size.
for hip and cuda
adayton1
reviewed
Jun 4, 2026
|
|
||
| #include <cuda_runtime.h> | ||
|
|
||
| #include <cstddef> |
Member
There was a problem hiding this comment.
What does cstddef bring that you need?
Member
There was a problem hiding this comment.
You might be able to remove it in several headers.
adayton1
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make typed events move only so they can own the native events that they contain and destroy those native events properly. Erased events (Event) are not move only and still have reference semantics as they are implemented with a shared_ptr.
This also other things I found along the way. For example some functions only took the erased version of a resource or event so I added an overload for the typed version for performance. I also updated the organization of some of the type traits and concepts used by the resources/events. I also updated the tests to test more things.