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

Removed mr parameter from inplace bitmask operations #10805

Merged
merged 8 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions cpp/include/cudf/detail/null_mask.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ std::pair<rmm::device_buffer, size_type> bitmask_binop(
masks,
masks_begin_bits,
mask_size_bits,
stream,
mr);
stream);

return std::pair(std::move(dest_mask), null_count);
}
Expand All @@ -156,8 +155,7 @@ size_type inplace_bitmask_binop(
host_span<bitmask_type const*> masks,
host_span<size_type const> masks_begin_bits,
size_type mask_size_bits,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
PointKernel marked this conversation as resolved.
Show resolved Hide resolved
rmm::cuda_stream_view stream)
{
CUDF_EXPECTS(
std::all_of(masks_begin_bits.begin(), masks_begin_bits.end(), [](auto b) { return b >= 0; }),
Expand All @@ -166,6 +164,7 @@ size_type inplace_bitmask_binop(
CUDF_EXPECTS(std::all_of(masks.begin(), masks.end(), [](auto p) { return p != nullptr; }),
"Mask pointer cannot be null");

rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
karthikeyann marked this conversation as resolved.
Show resolved Hide resolved
rmm::device_scalar<size_type> d_counter{0, stream, mr};
rmm::device_uvector<bitmask_type const*> d_masks(masks.size(), stream, mr);
rmm::device_uvector<size_type> d_begin_bits(masks_begin_bits.size(), stream, mr);
Expand Down
6 changes: 2 additions & 4 deletions cpp/src/bitmask/null_mask.cu
Original file line number Diff line number Diff line change
Expand Up @@ -408,17 +408,15 @@ cudf::size_type inplace_bitmask_and(device_span<bitmask_type> dest_mask,
host_span<bitmask_type const*> masks,
host_span<size_type const> begin_bits,
size_type mask_size,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
rmm::cuda_stream_view stream)
{
return inplace_bitmask_binop(
[] __device__(bitmask_type left, bitmask_type right) { return left & right; },
dest_mask,
masks,
begin_bits,
mask_size,
stream,
mr);
stream);
}

// Bitwise AND of the masks
Expand Down
3 changes: 1 addition & 2 deletions cpp/src/structs/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,7 @@ void superimpose_parent_nulls(bitmask_type const* parent_null_mask,
masks,
begin_bits,
child.size(),
stream,
mr);
stream);
auto const null_count = child.size() - valid_count;
child.set_null_count(null_count);
}
Expand Down