This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
Add assignment operator to the TestBar test util class. #185
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.
n.b. this change to test code introduces a lot of failures in the CUB unit tests.
I'm not submitting those fixes -- I've done a few but not all of them.
This change will identify all places in CUB code that attempts an assignment to uninitialized memory.
See https://github.com/NVlabs/cub/issues/184
Change:
I added a an assignment operator to the class, and I added a field named
magic
that I set to a certain value during construction. Only an object that has been constructed is likely to have that magic value properly set.An assignment precondition is that the left-hand side is valid. The assignment operators I added assert that the
magic
member of the lhs has the correct value.