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

[FEA] Add overload for set_null_mask that accept result of make_null_mask directly #13154

Open
ttnghia opened this issue Apr 17, 2023 · 1 comment
Assignees
Labels
0 - Backlog In queue waiting for assignment feature request New feature or request good first issue Good for newcomers libcudf Affects libcudf (C++/CUDA) code.

Comments

@ttnghia
Copy link
Contributor

ttnghia commented Apr 17, 2023

Currently, we have the make_null_mask API returning both null mask and null count:

template <typename ValidityIterator>
std::pair<rmm::device_buffer, cudf::size_type> make_null_mask(ValidityIterator begin,
                                                              ValidityIterator end)

However, the set_null_mask function can't accept that result. As such, we have to pass the result of make_null_mask into set_null_mask by two steps:

auto [null_mask, null_count] =
    cudf::test::detail::make_null_mask(valid_iter, valid_iter + input.size());
  output.set_null_mask(std::move(null_mask), null_count);

This is a bit inconvenient. We can do that in just one step like this:

output.set_null_mask(cudf::test::detail::make_null_mask(valid_iter, valid_iter + input.size()));

In order to do that, we need to have a new overload of set_null_mask that accept the return type of make_null_mask such as:

void set_null_mask(std::pair<rmm::device_buffer, cudf::size_type>&&) { ... }
@ttnghia ttnghia added feature request New feature or request Needs Triage Need team to review and classify labels Apr 17, 2023
@ttnghia
Copy link
Contributor Author

ttnghia commented Apr 17, 2023

CC @davidwendt.

@davidwendt davidwendt self-assigned this Apr 17, 2023
@GregoryKimball GregoryKimball added 0 - Backlog In queue waiting for assignment good first issue Good for newcomers libcudf Affects libcudf (C++/CUDA) code. and removed Needs Triage Need team to review and classify labels Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog In queue waiting for assignment feature request New feature or request good first issue Good for newcomers libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

No branches or pull requests

3 participants