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

Installed cudf header use cudf::allocate_like #16087

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
6 changes: 3 additions & 3 deletions cpp/include/cudf/detail/copy_if.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <cudf/column/column_device_view.cuh>
#include <cudf/column/column_factories.hpp>
#include <cudf/detail/copy.hpp>
#include <cudf/copying.hpp>
#include <cudf/detail/gather.hpp>
#include <cudf/detail/nvtx/ranges.hpp>
#include <cudf/detail/utilities/cuda.cuh>
Expand Down Expand Up @@ -242,8 +242,8 @@ struct scatter_gather_functor {
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr)
{
auto output_column = cudf::detail::allocate_like(
input, output_size, cudf::mask_allocation_policy::RETAIN, stream, mr);
auto output_column =
cudf::allocate_like(input, output_size, cudf::mask_allocation_policy::RETAIN, stream, mr);
auto output = output_column->mutable_view();

bool has_valid = input.nullable();
Expand Down
13 changes: 6 additions & 7 deletions cpp/include/cudf/detail/gather.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#pragma once

#include <cudf/detail/copy.hpp>
#include <cudf/copying.hpp>
#include <cudf/detail/indexalator.cuh>
#include <cudf/detail/null_mask.hpp>
#include <cudf/detail/utilities/assert.cuh>
Expand Down Expand Up @@ -217,10 +217,9 @@ struct column_gatherer_impl<Element, std::enable_if_t<is_rep_layout_compatible<E
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr)
{
auto const num_rows = cudf::distance(gather_map_begin, gather_map_end);
auto const policy = cudf::mask_allocation_policy::NEVER;
auto destination_column =
cudf::detail::allocate_like(source_column, num_rows, policy, stream, mr);
auto const num_rows = cudf::distance(gather_map_begin, gather_map_end);
auto const policy = cudf::mask_allocation_policy::NEVER;
auto destination_column = cudf::allocate_like(source_column, num_rows, policy, stream, mr);

gather_helper(source_column.data<Element>(),
source_column.size(),
Expand Down Expand Up @@ -413,8 +412,8 @@ struct column_gatherer_impl<dictionary32> {
auto keys_copy = std::make_unique<column>(dictionary.keys(), stream, mr);
// Perform gather on just the indices
column_view indices = dictionary.get_indices_annotated();
auto new_indices = cudf::detail::allocate_like(
indices, output_count, cudf::mask_allocation_policy::NEVER, stream, mr);
auto new_indices =
cudf::allocate_like(indices, output_count, cudf::mask_allocation_policy::NEVER, stream, mr);
gather_helper(
cudf::detail::indexalator_factory::make_input_iterator(indices),
indices.size(),
Expand Down
1 change: 1 addition & 0 deletions cpp/src/copying/sample.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <cudf/column/column.hpp>
#include <cudf/column/column_factories.hpp>
#include <cudf/detail/copy.hpp>
robertmaynard marked this conversation as resolved.
Show resolved Hide resolved
robertmaynard marked this conversation as resolved.
Show resolved Hide resolved
#include <cudf/detail/gather.cuh>
#include <cudf/detail/gather.hpp>
#include <cudf/detail/iterator.cuh>
Expand Down
1 change: 1 addition & 0 deletions cpp/src/lists/copying/segmented_gather.cu
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <cudf/detail/copy.hpp>
#include <cudf/detail/copy_range.cuh>
#include <cudf/detail/gather.cuh>
#include <cudf/detail/indexalator.cuh>
Expand Down
Loading