cub icon indicating copy to clipboard operation
cub copied to clipboard

Add assignment operator to the TestBar test util class.

Open hwinkler opened this issue 5 years ago • 1 comments

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.

hwinkler avatar Jun 01 '20 18:06 hwinkler

Converting to draft to prevent merging since this PR's purpose is to detect errors, not fix them.

alliepiper avatar Oct 23 '20 21:10 alliepiper