Skip to content

Commit

Permalink
Small cleanup (#8534)
Browse files Browse the repository at this point in the history
Small cleanup post #8422

Authors:
  - Conor Hoekstra (https://github.com/codereport)

Approvers:
  - Ram (Ramakrishna Prabhu) (https://github.com/rgsl888prabhu)
  - Mark Harris (https://github.com/harrism)

URL: #8534
  • Loading branch information
codereport authored Jun 16, 2021
1 parent 0301518 commit 716dc12
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions cpp/src/merge/merge.cu
Original file line number Diff line number Diff line change
Expand Up @@ -358,20 +358,16 @@ std::unique_ptr<column> column_merger::operator()<cudf::struct_view>(
rmm::mr::device_memory_resource* mr) const
{
// merge each child.
std::vector<std::unique_ptr<column>> merged_children;
merged_children.reserve(lcol.num_children());
auto const lhs = structs_column_view{lcol};
auto const rhs = structs_column_view{rcol};

structs_column_view lhs(lcol);
structs_column_view rhs(rcol);

column_merger merger{row_order_};
auto iter = thrust::make_counting_iterator(0);
std::transform(
iter, iter + lhs.num_children(), std::back_inserter(merged_children), [&](size_type i) {
auto it = cudf::detail::make_counting_transform_iterator(
0, [&, merger = column_merger{row_order_}](size_type i) {
return cudf::type_dispatcher<dispatch_storage_type>(
lhs.child(i).type(), merger, lhs.get_sliced_child(i), rhs.get_sliced_child(i), stream, mr);
});

auto merged_children = std::vector<std::unique_ptr<column>>(it, it + lhs.num_children());
auto const merged_size = lcol.size() + rcol.size();

// materialize the output buffer
Expand Down

0 comments on commit 716dc12

Please sign in to comment.