Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions cpp/include/cudf/detail/null_mask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ std::pair<rmm::device_buffer, size_type> bitmask_or(
* @param mask_size_bits The number of bits to be ANDed in each mask
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate the returned device_buffer
* @return rmm::device_buffer Output bitmask
* @return Count of set bits
*/
void inplace_bitmask_and(
cudf::size_type inplace_bitmask_and(
device_span<bitmask_type> dest_mask,
host_span<bitmask_type const*> masks,
host_span<size_type const> masks_begin_bits,
Expand Down
14 changes: 7 additions & 7 deletions cpp/src/bitmask/null_mask.cu
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,14 @@ std::vector<size_type> segmented_null_count(const bitmask_type* bitmask,
}

// Inplace Bitwise AND of the masks
void 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)
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)
{
inplace_bitmask_binop(
return inplace_bitmask_binop(
[] __device__(bitmask_type left, bitmask_type right) { return left & right; },
dest_mask,
masks,
Expand Down
5 changes: 3 additions & 2 deletions cpp/src/structs/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,15 @@ void superimpose_parent_nulls(bitmask_type const* parent_null_mask,
reinterpret_cast<bitmask_type const*>(parent_null_mask),
reinterpret_cast<bitmask_type const*>(current_child_mask)};
std::vector<size_type> begin_bits{0, 0};
cudf::detail::inplace_bitmask_and(
auto const valid_count = cudf::detail::inplace_bitmask_and(
device_span<bitmask_type>(current_child_mask, num_bitmask_words(child.size())),
masks,
begin_bits,
child.size(),
stream,
mr);
child.set_null_count(UNKNOWN_NULL_COUNT);
auto const null_count = child.size() - valid_count;
child.set_null_count(null_count);
}

// If the child is also a struct, repeat for all grandchildren.
Expand Down