Skip to content
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

Correct buffer move assignment in experimental FIL #5372

Merged
merged 6 commits into from
May 23, 2023

Conversation

wphicks
Copy link
Contributor

@wphicks wphicks commented Apr 18, 2023

A last-minute change to the buffer implementation caused the move assignment operator to not be invoked correctly where it should be allowed. This PR updates the implementation, avoiding unnecessary copies for buffers. It also adds C++ tests for buffer.

@wphicks wphicks added bug Something isn't working 3 - Ready for Review Ready for review by team non-breaking Non-breaking change labels Apr 18, 2023
@wphicks wphicks requested review from a team as code owners April 18, 2023 18:30
{
swap(*this, other);
auto copy = other;
Copy link
Member

Choose a reason for hiding this comment

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

Is this not a recursive call?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, this is equivalent to:

buffer<T> copy{other};

That is to say, it invokes the copy constructor, not the copy assignment operator.

@wphicks
Copy link
Contributor Author

wphicks commented May 23, 2023

/merge

@rapids-bot rapids-bot bot merged commit 673b847 into rapidsai:branch-23.06 May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working CMake CUDA/C++ non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants