diff --git a/cpp/benchmarks/reduction/segment_reduce.cu b/cpp/benchmarks/reduction/segment_reduce.cu index 3723147d95c..08fc4622b43 100644 --- a/cpp/benchmarks/reduction/segment_reduce.cu +++ b/cpp/benchmarks/reduction/segment_reduce.cu @@ -82,7 +82,7 @@ std::pair, thrust::device_vector> make_test_d thrust::device_vector d_offsets(offset_it, offset_it + num_segments + 1); - return std::make_pair(std::move((input->release())[0]), d_offsets); + return std::pair(std::move((input->release())[0]), d_offsets); } template diff --git a/cpp/docs/DEVELOPER_GUIDE.md b/cpp/docs/DEVELOPER_GUIDE.md index 165edd443f6..84f69f559a8 100644 --- a/cpp/docs/DEVELOPER_GUIDE.md +++ b/cpp/docs/DEVELOPER_GUIDE.md @@ -572,7 +572,7 @@ The preferred style for how inputs are passed in and outputs are returned is the Sometimes it is necessary for functions to have multiple outputs. There are a few ways this can be done in C++ (including creating a `struct` for the output). One convenient way to do this is -using `std::tie` and `std::make_pair`. Note that objects passed to `std::make_pair` will invoke +using `std::tie` and `std::pair`. Note that objects passed to `std::pair` will invoke either the copy constructor or the move constructor of the object, and it may be preferable to move non-trivially copyable objects (and required for types with deleted copy constructors, like `std::unique_ptr`). @@ -585,7 +585,7 @@ std::pair return_two_tables(void){ // Do stuff with out0, out1 // Return a std::pair of the two outputs - return std::make_pair(std::move(out0), std::move(out1)); + return std::pair(std::move(out0), std::move(out1)); } cudf::table out0; diff --git a/cpp/include/cudf/detail/null_mask.cuh b/cpp/include/cudf/detail/null_mask.cuh index 7aec56fdc51..6a6cdd43004 100644 --- a/cpp/include/cudf/detail/null_mask.cuh +++ b/cpp/include/cudf/detail/null_mask.cuh @@ -133,7 +133,7 @@ std::pair bitmask_binop( stream, mr); - return std::make_pair(std::move(dest_mask), null_count); + return std::pair(std::move(dest_mask), null_count); } /** diff --git a/cpp/include/cudf/detail/valid_if.cuh b/cpp/include/cudf/detail/valid_if.cuh index aa4421bb4ed..f91f51b2161 100644 --- a/cpp/include/cudf/detail/valid_if.cuh +++ b/cpp/include/cudf/detail/valid_if.cuh @@ -110,7 +110,7 @@ std::pair valid_if( null_count = size - valid_count.value(stream); } - return std::make_pair(std::move(null_mask), null_count); + return std::pair(std::move(null_mask), null_count); } /** diff --git a/cpp/include/cudf/strings/detail/utilities.cuh b/cpp/include/cudf/strings/detail/utilities.cuh index bb7f29a4172..e6dba5147b5 100644 --- a/cpp/include/cudf/strings/detail/utilities.cuh +++ b/cpp/include/cudf/strings/detail/utilities.cuh @@ -156,7 +156,7 @@ auto make_strings_children( for_each_fn(size_and_exec_fn); } - return std::make_pair(std::move(offsets_column), std::move(chars_column)); + return std::pair(std::move(offsets_column), std::move(chars_column)); } /** diff --git a/cpp/include/cudf/table/experimental/row_operators.cuh b/cpp/include/cudf/table/experimental/row_operators.cuh index 88e31744fdf..32b71e660ac 100644 --- a/cpp/include/cudf/table/experimental/row_operators.cuh +++ b/cpp/include/cudf/table/experimental/row_operators.cuh @@ -165,14 +165,13 @@ class device_row_comparator { bool const rhs_is_null{_rhs.is_null(rhs_element_index)}; if (lhs_is_null or rhs_is_null) { // at least one is null - return cuda::std::make_pair(null_compare(lhs_is_null, rhs_is_null, _null_precedence), - _depth); + return cuda::std::pair(null_compare(lhs_is_null, rhs_is_null, _null_precedence), _depth); } } - return cuda::std::make_pair(relational_compare(_lhs.element(lhs_element_index), - _rhs.element(rhs_element_index)), - std::numeric_limits::max()); + return cuda::std::pair(relational_compare(_lhs.element(lhs_element_index), + _rhs.element(rhs_element_index)), + std::numeric_limits::max()); } template {{}, -1}, - [](auto acc, lists_column_wrapper const& lcw) { - return lcw.depth > acc.second ? std::make_pair(lcw.get_view(), lcw.depth) : acc; - }); + auto const hierarchy_and_depth = + std::accumulate(elements.begin(), + elements.end(), + std::pair{{}, -1}, + [](auto acc, lists_column_wrapper const& lcw) { + return lcw.depth > acc.second ? std::pair(lcw.get_view(), lcw.depth) : acc; + }); column_view expected_hierarchy = hierarchy_and_depth.first; int32_t const expected_depth = hierarchy_and_depth.second; diff --git a/cpp/src/bitmask/null_mask.cu b/cpp/src/bitmask/null_mask.cu index 756cf3421c9..ec14f8e6ded 100644 --- a/cpp/src/bitmask/null_mask.cu +++ b/cpp/src/bitmask/null_mask.cu @@ -445,7 +445,7 @@ std::pair bitmask_and(table_view const& view, CUDF_FUNC_RANGE(); rmm::device_buffer null_mask{0, stream, mr}; if (view.num_rows() == 0 or view.num_columns() == 0) { - return std::make_pair(std::move(null_mask), 0); + return std::pair(std::move(null_mask), 0); } std::vector masks; @@ -467,7 +467,7 @@ std::pair bitmask_and(table_view const& view, mr); } - return std::make_pair(std::move(null_mask), 0); + return std::pair(std::move(null_mask), 0); } // Returns the bitwise OR of the null masks of all columns in the table view @@ -478,7 +478,7 @@ std::pair bitmask_or(table_view const& view, CUDF_FUNC_RANGE(); rmm::device_buffer null_mask{0, stream, mr}; if (view.num_rows() == 0 or view.num_columns() == 0) { - return std::make_pair(std::move(null_mask), 0); + return std::pair(std::move(null_mask), 0); } std::vector masks; @@ -500,7 +500,7 @@ std::pair bitmask_or(table_view const& view, mr); } - return std::make_pair(std::move(null_mask), 0); + return std::pair(std::move(null_mask), 0); } } // namespace detail diff --git a/cpp/src/copying/contiguous_split.cu b/cpp/src/copying/contiguous_split.cu index 514374d450d..35e7eba974f 100644 --- a/cpp/src/copying/contiguous_split.cu +++ b/cpp/src/copying/contiguous_split.cu @@ -688,9 +688,9 @@ BufInfo build_output_columns(InputIter begin, ? 0 : (current_info->num_rows - current_info->valid_count); ++current_info; - return std::make_pair(ptr, null_count); + return std::pair(ptr, null_count); } - return std::make_pair(static_cast(nullptr), 0); + return std::pair(static_cast(nullptr), 0); }(); // size/data pointer for the column diff --git a/cpp/src/groupby/groupby.cu b/cpp/src/groupby/groupby.cu index 57bb222aaa0..79882239b38 100644 --- a/cpp/src/groupby/groupby.cu +++ b/cpp/src/groupby/groupby.cu @@ -83,8 +83,7 @@ std::pair, std::vector> groupby::disp "Unsupported groupby key type does not support equality comparison"); auto [grouped_keys, results] = detail::hash::groupby(flattened_keys, requests, _include_null_keys, stream, mr); - return std::make_pair(unflatten_nested_columns(std::move(grouped_keys), _keys), - std::move(results)); + return std::pair(unflatten_nested_columns(std::move(grouped_keys), _keys), std::move(results)); } else { return sort_aggregate(requests, stream, mr); } @@ -193,7 +192,7 @@ std::pair, std::vector> groupby::aggr verify_valid_requests(requests); - if (_keys.num_rows() == 0) { return std::make_pair(empty_like(_keys), empty_results(requests)); } + if (_keys.num_rows() == 0) { return std::pair(empty_like(_keys), empty_results(requests)); } return dispatch_aggregation(requests, rmm::cuda_stream_default, mr); } @@ -211,7 +210,7 @@ std::pair, std::vector> groupby::scan verify_valid_requests(requests); - if (_keys.num_rows() == 0) { return std::make_pair(empty_like(_keys), empty_results(requests)); } + if (_keys.num_rows() == 0) { return std::pair(empty_like(_keys), empty_results(requests)); } return sort_scan(requests, rmm::cuda_stream_default, mr); } @@ -250,7 +249,7 @@ std::pair, std::unique_ptr> groupby::replace_nulls CUDF_EXPECTS(static_cast(replace_policies.size()) == values.num_columns(), "Size mismatch between num_columns and replace_policies."); - if (values.is_empty()) { return std::make_pair(empty_like(_keys), empty_like(values)); } + if (values.is_empty()) { return std::pair(empty_like(_keys), empty_like(values)); } auto const stream = rmm::cuda_stream_default; auto const& group_labels = helper().group_labels(stream); @@ -269,8 +268,8 @@ std::pair, std::unique_ptr
> groupby::replace_nulls : std::move(grouped_values); }); - return std::make_pair(std::move(helper().sorted_keys(stream, mr)), - std::make_unique
(std::move(results))); + return std::pair(std::move(helper().sorted_keys(stream, mr)), + std::make_unique
(std::move(results))); } // Get the sort helper object @@ -310,8 +309,8 @@ std::pair, std::unique_ptr
> groupby::shift( grouped_values->view(), group_offsets, offsets[i], fill_values[i].get(), stream, mr); }); - return std::make_pair(helper().sorted_keys(stream, mr), - std::make_unique(std::move(results))); + return std::pair(helper().sorted_keys(stream, mr), + std::make_unique(std::move(results))); } } // namespace groupby diff --git a/cpp/src/groupby/hash/groupby.cu b/cpp/src/groupby/hash/groupby.cu index f225afaec71..e22b3a4f3a4 100644 --- a/cpp/src/groupby/hash/groupby.cu +++ b/cpp/src/groupby/hash/groupby.cu @@ -672,7 +672,7 @@ std::pair, std::vector> groupby( std::unique_ptr
unique_keys = groupby(keys, requests, &cache, has_nulls(keys), include_null_keys, stream, mr); - return std::make_pair(std::move(unique_keys), extract_results(requests, cache, stream, mr)); + return std::pair(std::move(unique_keys), extract_results(requests, cache, stream, mr)); } } // namespace hash } // namespace detail diff --git a/cpp/src/groupby/sort/aggregate.cpp b/cpp/src/groupby/sort/aggregate.cpp index 4904aa42723..02036ff0bbf 100644 --- a/cpp/src/groupby/sort/aggregate.cpp +++ b/cpp/src/groupby/sort/aggregate.cpp @@ -778,7 +778,7 @@ std::pair, std::vector> groupby::sort auto results = detail::extract_results(requests, cache, stream, mr); - return std::make_pair(helper().unique_keys(stream, mr), std::move(results)); + return std::pair(helper().unique_keys(stream, mr), std::move(results)); } } // namespace groupby } // namespace cudf diff --git a/cpp/src/groupby/sort/group_collect.cu b/cpp/src/groupby/sort/group_collect.cu index 8b8a03f35a5..000a595ea2f 100644 --- a/cpp/src/groupby/sort/group_collect.cu +++ b/cpp/src/groupby/sort/group_collect.cu @@ -82,8 +82,7 @@ std::pair, std::unique_ptr> purge_null_entries( auto null_purged_offsets = strings::detail::make_offsets_child_column( null_purged_sizes.cbegin(), null_purged_sizes.cend(), stream, mr); - return std::make_pair, std::unique_ptr>( - std::move(null_purged_values), std::move(null_purged_offsets)); + return std::pair(std::move(null_purged_values), std::move(null_purged_offsets)); } std::unique_ptr group_collect(column_view const& values, @@ -109,8 +108,8 @@ std::unique_ptr group_collect(column_view const& values, return cudf::groupby::detail::purge_null_entries( values, offsets_column->view(), num_groups, stream, mr); } else { - return std::make_pair(std::make_unique(values, stream, mr), - std::move(offsets_column)); + return std::pair(std::make_unique(values, stream, mr), + std::move(offsets_column)); } }(); diff --git a/cpp/src/groupby/sort/scan.cpp b/cpp/src/groupby/sort/scan.cpp index 8c4959da35b..20edc1b3f50 100644 --- a/cpp/src/groupby/sort/scan.cpp +++ b/cpp/src/groupby/sort/scan.cpp @@ -185,7 +185,7 @@ std::pair, std::vector> groupby::sort auto results = detail::extract_results(requests, cache, stream, mr); - return std::make_pair(helper().sorted_keys(stream, mr), std::move(results)); + return std::pair(helper().sorted_keys(stream, mr), std::move(results)); } } // namespace groupby } // namespace cudf diff --git a/cpp/src/io/orc/aggregate_orc_metadata.cpp b/cpp/src/io/orc/aggregate_orc_metadata.cpp index a4ae9999a19..47244279599 100644 --- a/cpp/src/io/orc/aggregate_orc_metadata.cpp +++ b/cpp/src/io/orc/aggregate_orc_metadata.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -177,7 +177,7 @@ std::vector aggregate_orc_metadata::select_stri per_file_metadata[src_file_idx].ff.stripes.size()), "Invalid stripe index"); stripe_infos.push_back( - std::make_pair(&per_file_metadata[src_file_idx].ff.stripes[stripe_idx], nullptr)); + std::pair(&per_file_metadata[src_file_idx].ff.stripes[stripe_idx], nullptr)); row_count += per_file_metadata[src_file_idx].ff.stripes[stripe_idx].numberOfRows; } selected_stripes_mapping.push_back({static_cast(src_file_idx), stripe_infos}); @@ -206,7 +206,7 @@ std::vector aggregate_orc_metadata::select_stri count += per_file_metadata[src_file_idx].ff.stripes[stripe_idx].numberOfRows; if (count > row_start || count == 0) { stripe_infos.push_back( - std::make_pair(&per_file_metadata[src_file_idx].ff.stripes[stripe_idx], nullptr)); + std::pair(&per_file_metadata[src_file_idx].ff.stripes[stripe_idx], nullptr)); } else { stripe_skip_rows = count; } diff --git a/cpp/src/io/orc/reader_impl.cu b/cpp/src/io/orc/reader_impl.cu index 83c23774362..a768d568178 100644 --- a/cpp/src/io/orc/reader_impl.cu +++ b/cpp/src/io/orc/reader_impl.cu @@ -108,20 +108,20 @@ constexpr std::pair get_index_type_and_pos( case orc::DATA: skip_count += 1; skip_count |= (skip_count & 0xff) << 8; - return std::make_pair(gpu::CI_DATA, skip_count); + return std::pair(gpu::CI_DATA, skip_count); case orc::LENGTH: case orc::SECONDARY: skip_count += 1; skip_count |= (skip_count & 0xff) << 16; - return std::make_pair(gpu::CI_DATA2, skip_count); - case orc::DICTIONARY_DATA: return std::make_pair(gpu::CI_DICTIONARY, skip_count); + return std::pair(gpu::CI_DATA2, skip_count); + case orc::DICTIONARY_DATA: return std::pair(gpu::CI_DICTIONARY, skip_count); case orc::PRESENT: skip_count += (non_child ? 1 : 0); - return std::make_pair(gpu::CI_PRESENT, skip_count); - case orc::ROW_INDEX: return std::make_pair(gpu::CI_INDEX, skip_count); + return std::pair(gpu::CI_PRESENT, skip_count); + case orc::ROW_INDEX: return std::pair(gpu::CI_INDEX, skip_count); default: // Skip this stream as it's not strictly required - return std::make_pair(gpu::CI_NUM_STREAMS, 0); + return std::pair(gpu::CI_NUM_STREAMS, 0); } } @@ -1120,9 +1120,9 @@ table_with_metadata reader::impl::read(size_type skip_rows, if (_metadata.per_file_metadata[stripe_source_mapping.source_idx] .source->is_device_read_preferred(len)) { read_tasks.push_back( - std::make_pair(_metadata.per_file_metadata[stripe_source_mapping.source_idx] - .source->device_read_async(offset, len, d_dst, stream), - len)); + std::pair(_metadata.per_file_metadata[stripe_source_mapping.source_idx] + .source->device_read_async(offset, len, d_dst, stream), + len)); } else { const auto buffer = diff --git a/cpp/src/io/parquet/chunk_dict.cu b/cpp/src/io/parquet/chunk_dict.cu index 9075a319ab3..93e76a6ac23 100644 --- a/cpp/src/io/parquet/chunk_dict.cu +++ b/cpp/src/io/parquet/chunk_dict.cu @@ -75,7 +75,7 @@ struct map_insert_fn { if constexpr (column_device_view::has_element_accessor()) { auto hash_fn = hash_functor{col}; auto equality_fn = equality_functor{col}; - return map.insert(std::make_pair(i, i), hash_fn, equality_fn); + return map.insert(std::pair(i, i), hash_fn, equality_fn); } else { CUDF_UNREACHABLE("Unsupported type to insert in map"); } diff --git a/cpp/src/io/parquet/writer_impl.cu b/cpp/src/io/parquet/writer_impl.cu index 92d436e4566..75a50714407 100644 --- a/cpp/src/io/parquet/writer_impl.cu +++ b/cpp/src/io/parquet/writer_impl.cu @@ -876,7 +876,7 @@ auto build_chunk_dictionaries(hostdevice_2dvector& chunks, std::vector> dict_data; std::vector> dict_index; - if (h_chunks.size() == 0) { return std::make_pair(std::move(dict_data), std::move(dict_index)); } + if (h_chunks.size() == 0) { return std::pair(std::move(dict_data), std::move(dict_index)); } // Allocate slots for each chunk std::vector> hash_maps_storage; @@ -912,7 +912,7 @@ auto build_chunk_dictionaries(hostdevice_2dvector& chunks, // We don't use dictionary if the indices are > 16 bits because that's the maximum bitpacking // bitsize we efficiently support - if (nbits > 16) { return std::make_pair(false, 0); } + if (nbits > 16) { return std::pair(false, 0); } // Only these bit sizes are allowed for RLE encoding because it's compute optimized constexpr auto allowed_bitsizes = std::array{1, 2, 4, 8, 12, 16}; @@ -925,7 +925,7 @@ auto build_chunk_dictionaries(hostdevice_2dvector& chunks, bool use_dict = (ck.plain_data_size > dict_enc_size); if (not use_dict) { rle_bits = 0; } - return std::make_pair(use_dict, rle_bits); + return std::pair(use_dict, rle_bits); }(); } @@ -946,7 +946,7 @@ auto build_chunk_dictionaries(hostdevice_2dvector& chunks, gpu::collect_map_entries(chunks.device_view().flat_view(), stream); gpu::get_dictionary_indices(frags, stream); - return std::make_pair(std::move(dict_data), std::move(dict_index)); + return std::pair(std::move(dict_data), std::move(dict_index)); } void writer::impl::init_encoder_pages(hostdevice_2dvector& chunks, diff --git a/cpp/src/join/conditional_join.cu b/cpp/src/join/conditional_join.cu index 9bf7e6a7a43..ae1561b422b 100644 --- a/cpp/src/join/conditional_join.cu +++ b/cpp/src/join/conditional_join.cu @@ -59,8 +59,8 @@ conditional_join(table_view const& left, // Inner and left semi joins return empty output because no matches can exist. case join_kind::INNER_JOIN: case join_kind::LEFT_SEMI_JOIN: - return std::make_pair(std::make_unique>(0, stream, mr), - std::make_unique>(0, stream, mr)); + return std::pair(std::make_unique>(0, stream, mr), + std::make_unique>(0, stream, mr)); default: CUDF_FAIL("Invalid join kind."); break; } } else if (left_num_rows == 0) { @@ -70,12 +70,12 @@ conditional_join(table_view const& left, case join_kind::LEFT_ANTI_JOIN: case join_kind::INNER_JOIN: case join_kind::LEFT_SEMI_JOIN: - return std::make_pair(std::make_unique>(0, stream, mr), - std::make_unique>(0, stream, mr)); + return std::pair(std::make_unique>(0, stream, mr), + std::make_unique>(0, stream, mr)); // Full joins need to return the trivial complement. case join_kind::FULL_JOIN: { auto ret_flipped = get_trivial_left_join_indices(right, stream); - return std::make_pair(std::move(ret_flipped.second), std::move(ret_flipped.first)); + return std::pair(std::move(ret_flipped.second), std::move(ret_flipped.first)); } default: CUDF_FAIL("Invalid join kind."); break; } @@ -139,8 +139,8 @@ conditional_join(table_view const& left, // all other cases (inner, left semi, and left anti joins) if we reach this // point we can safely return an empty result. if (join_size == 0) { - return std::make_pair(std::make_unique>(0, stream, mr), - std::make_unique>(0, stream, mr)); + return std::pair(std::make_unique>(0, stream, mr), + std::make_unique>(0, stream, mr)); } rmm::device_scalar write_index(0, stream); @@ -176,7 +176,7 @@ conditional_join(table_view const& left, swap_tables); } - auto join_indices = std::make_pair(std::move(left_indices), std::move(right_indices)); + auto join_indices = std::pair(std::move(left_indices), std::move(right_indices)); // For full joins, get the indices in the right table that were not joined to // by any row in the left table. diff --git a/cpp/src/join/hash_join.cu b/cpp/src/join/hash_join.cu index 086e1e49986..8d2888fd761 100644 --- a/cpp/src/join/hash_join.cu +++ b/cpp/src/join/hash_join.cu @@ -44,7 +44,7 @@ std::pair, std::unique_ptr
> get_empty_joined_table { std::unique_ptr
empty_probe = empty_like(probe); std::unique_ptr
empty_build = empty_like(build); - return std::make_pair(std::move(empty_probe), std::move(empty_build)); + return std::pair(std::move(empty_probe), std::move(empty_build)); } /** @@ -88,8 +88,8 @@ probe_join_hash_table(cudf::table_device_view build_table, // If output size is zero, return immediately if (join_size == 0) { - return std::make_pair(std::make_unique>(0, stream, mr), - std::make_unique>(0, stream, mr)); + return std::pair(std::make_unique>(0, stream, mr), + std::make_unique>(0, stream, mr)); } auto left_indices = std::make_unique>(join_size, stream, mr); @@ -125,7 +125,7 @@ probe_join_hash_table(cudf::table_device_view build_table, hash_table.pair_retrieve( iter, iter + probe_table_num_rows, out1_zip_begin, out2_zip_begin, equality, stream.value()); } - return std::make_pair(std::move(left_indices), std::move(right_indices)); + return std::pair(std::move(left_indices), std::move(right_indices)); } /** @@ -390,8 +390,8 @@ hash_join::hash_join_impl::compute_hash_join(cudf::table_view const& probe, "Mismatch in number of columns to be joined on"); if (is_trivial_join(flattened_probe_table, _build, JoinKind)) { - return std::make_pair(std::make_unique>(0, stream, mr), - std::make_unique>(0, stream, mr)); + return std::pair(std::make_unique>(0, stream, mr), + std::make_unique>(0, stream, mr)); } CUDF_EXPECTS(std::equal(std::cbegin(_build), diff --git a/cpp/src/join/join.cu b/cpp/src/join/join.cu index 7a478ca2eb3..15aed83b641 100644 --- a/cpp/src/join/join.cu +++ b/cpp/src/join/join.cu @@ -52,7 +52,7 @@ inner_join(table_view const& left_input, if (right.num_rows() > left.num_rows()) { cudf::hash_join hj_obj(left, compare_nulls, stream); auto [right_result, left_result] = hj_obj.inner_join(right, std::nullopt, stream, mr); - return std::make_pair(std::move(left_result), std::move(right_result)); + return std::pair(std::move(left_result), std::move(right_result)); } else { cudf::hash_join hj_obj(right, compare_nulls, stream); return hj_obj.inner_join(left, std::nullopt, stream, mr); diff --git a/cpp/src/join/join_utils.cu b/cpp/src/join/join_utils.cu index 151db830962..1eb2d4cf4a7 100644 --- a/cpp/src/join/join_utils.cu +++ b/cpp/src/join/join_utils.cu @@ -61,7 +61,7 @@ get_trivial_left_join_indices(table_view const& left, std::make_unique>(left.num_rows(), stream, mr); thrust::uninitialized_fill( rmm::exec_policy(stream), right_indices->begin(), right_indices->end(), JoinNoneValue); - return std::make_pair(std::move(left_indices), std::move(right_indices)); + return std::pair(std::move(left_indices), std::move(right_indices)); } VectorPair concatenate_vector_pairs(VectorPair& a, VectorPair& b, rmm::cuda_stream_view stream) @@ -151,7 +151,7 @@ get_left_join_indices_complement(std::unique_ptr> left_invalid_indices->end(), JoinNoneValue); - return std::make_pair(std::move(left_invalid_indices), std::move(right_indices_complement)); + return std::pair(std::move(left_invalid_indices), std::move(right_indices_complement)); } } // namespace detail diff --git a/cpp/src/join/mixed_join.cu b/cpp/src/join/mixed_join.cu index f9cbb2b5441..b540c013f47 100644 --- a/cpp/src/join/mixed_join.cu +++ b/cpp/src/join/mixed_join.cu @@ -81,8 +81,8 @@ mixed_join( case join_kind::FULL_JOIN: return get_trivial_left_join_indices(left_conditional, stream); // Inner joins return empty output because no matches can exist. case join_kind::INNER_JOIN: - return std::make_pair(std::make_unique>(0, stream, mr), - std::make_unique>(0, stream, mr)); + return std::pair(std::make_unique>(0, stream, mr), + std::make_unique>(0, stream, mr)); default: CUDF_FAIL("Invalid join kind."); break; } } else if (left_num_rows == 0) { @@ -90,12 +90,12 @@ mixed_join( // Left and inner joins all return empty sets. case join_kind::LEFT_JOIN: case join_kind::INNER_JOIN: - return std::make_pair(std::make_unique>(0, stream, mr), - std::make_unique>(0, stream, mr)); + return std::pair(std::make_unique>(0, stream, mr), + std::make_unique>(0, stream, mr)); // Full joins need to return the trivial complement. case join_kind::FULL_JOIN: { auto ret_flipped = get_trivial_left_join_indices(right_conditional, stream); - return std::make_pair(std::move(ret_flipped.second), std::move(ret_flipped.first)); + return std::pair(std::move(ret_flipped.second), std::move(ret_flipped.first)); } default: CUDF_FAIL("Invalid join kind."); break; } @@ -208,8 +208,8 @@ mixed_join( // all other cases (inner, left semi, and left anti joins) if we reach this // point we can safely return an empty result. if (join_size == 0) { - return std::make_pair(std::make_unique>(0, stream, mr), - std::make_unique>(0, stream, mr)); + return std::pair(std::make_unique>(0, stream, mr), + std::make_unique>(0, stream, mr)); } // Given the number of matches per row, we need to compute the offsets for insertion. @@ -258,7 +258,7 @@ mixed_join( swap_tables); } - auto join_indices = std::make_pair(std::move(left_indices), std::move(right_indices)); + auto join_indices = std::pair(std::move(left_indices), std::move(right_indices)); // For full joins, get the indices in the right table that were not joined to // by any row in the left table. diff --git a/cpp/src/lists/combine/concatenate_list_elements.cu b/cpp/src/lists/combine/concatenate_list_elements.cu index fecdec0b1b2..f4d8e7678b1 100644 --- a/cpp/src/lists/combine/concatenate_list_elements.cu +++ b/cpp/src/lists/combine/concatenate_list_elements.cu @@ -81,7 +81,7 @@ std::unique_ptr concatenate_lists_ignore_null(column_view const& input, auto [null_mask, null_count] = [&] { if (!build_null_mask) - return std::make_pair(cudf::detail::copy_bitmask(input, stream, mr), input.null_count()); + return std::pair(cudf::detail::copy_bitmask(input, stream, mr), input.null_count()); // The output row will be null only if all lists on the input row are null. auto const lists_dv_ptr = column_device_view::create(lists_column_view(input).child(), stream); diff --git a/cpp/src/lists/copying/scatter_helper.cu b/cpp/src/lists/copying/scatter_helper.cu index fecf6e1c1a1..7220e8b5980 100644 --- a/cpp/src/lists/copying/scatter_helper.cu +++ b/cpp/src/lists/copying/scatter_helper.cu @@ -175,7 +175,7 @@ struct list_child_constructor { source_lists_column_view.child().nullable() || target_lists_column_view.child().nullable() ? construct_child_nullmask( list_vector, list_offsets, source_lists, target_lists, num_child_rows, stream, mr) - : std::make_pair(rmm::device_buffer{}, 0); + : std::pair(rmm::device_buffer{}, 0); auto child_column = cudf::make_fixed_width_column(source_lists_column_view.child().type(), num_child_rows, @@ -348,7 +348,7 @@ struct list_child_constructor { source_lists_column_view.child().nullable() || target_lists_column_view.child().nullable() ? construct_child_nullmask( list_vector, list_offsets, source_lists, target_lists, num_child_rows, stream, mr) - : std::make_pair(rmm::device_buffer{}, 0); + : std::pair(rmm::device_buffer{}, 0); return cudf::make_lists_column(num_child_rows, std::move(child_offsets), @@ -444,7 +444,7 @@ struct list_child_constructor { source_lists_column_view.child().nullable() || target_lists_column_view.child().nullable() ? construct_child_nullmask( list_vector, list_offsets, source_lists, target_lists, num_child_rows, stream, mr) - : std::make_pair(rmm::device_buffer{}, 0); + : std::pair(rmm::device_buffer{}, 0); return cudf::make_structs_column(num_child_rows, std::move(child_columns), diff --git a/cpp/src/partitioning/partitioning.cu b/cpp/src/partitioning/partitioning.cu index 09f07a1ca8c..0371065a2e5 100644 --- a/cpp/src/partitioning/partitioning.cu +++ b/cpp/src/partitioning/partitioning.cu @@ -595,8 +595,7 @@ std::pair, std::vector> hash_partition_table( } stream.synchronize(); // Async D2H copy must finish before returning host vec - return std::make_pair(std::make_unique
(std::move(output_cols)), - std::move(partition_offsets)); + return std::pair(std::make_unique
(std::move(output_cols)), std::move(partition_offsets)); } else { // Compute a scatter map from input to output such that the output rows are // sorted by partition number @@ -613,7 +612,7 @@ std::pair, std::vector> hash_partition_table( input, row_partition_numbers.begin(), row_partition_numbers.end(), input, false, stream, mr); stream.synchronize(); // Async D2H copy must finish before returning host vec - return std::make_pair(std::move(output), std::move(partition_offsets)); + return std::pair(std::move(output), std::move(partition_offsets)); } } @@ -700,7 +699,7 @@ struct dispatch_map_type { auto scattered = cudf::detail::scatter(t, scatter_map.begin(), scatter_map.end(), t, false, stream, mr); - return std::make_pair(std::move(scattered), std::move(partition_offsets)); + return std::pair(std::move(scattered), std::move(partition_offsets)); } template @@ -728,7 +727,7 @@ std::pair, std::vector> hash_partition( // Return empty result if there are no partitions or nothing to hash if (num_partitions <= 0 || input.num_rows() == 0 || table_to_hash.num_columns() == 0) { - return std::make_pair(empty_like(input), std::vector{}); + return std::pair(empty_like(input), std::vector{}); } if (has_nulls(table_to_hash)) { @@ -753,7 +752,7 @@ std::pair, std::vector> partition( CUDF_EXPECTS(not partition_map.has_nulls(), "Unexpected null values in partition_map."); if (num_partitions == 0 or t.num_rows() == 0) { - return std::make_pair(empty_like(t), std::vector{}); + return std::pair(empty_like(t), std::vector{}); } return cudf::type_dispatcher( diff --git a/cpp/src/partitioning/round_robin.cu b/cpp/src/partitioning/round_robin.cu index 193bb5a4353..9cfad602db0 100644 --- a/cpp/src/partitioning/round_robin.cu +++ b/cpp/src/partitioning/round_robin.cu @@ -104,8 +104,8 @@ std::pair, std::vector> degenerate stream, mr); - return std::make_pair(std::move(uniq_tbl), - cudf::detail::make_std_vector_sync(partition_offsets, stream)); + return std::pair(std::move(uniq_tbl), + cudf::detail::make_std_vector_sync(partition_offsets, stream)); } else { //( num_partitions > nrows ) rmm::device_uvector d_row_indices(nrows, stream); @@ -140,8 +140,8 @@ std::pair, std::vector> degenerate nedges_iter_begin + num_partitions, partition_offsets.begin()); - return std::make_pair(std::move(uniq_tbl), - cudf::detail::make_std_vector_sync(partition_offsets, stream)); + return std::pair(std::move(uniq_tbl), + cudf::detail::make_std_vector_sync(partition_offsets, stream)); } } } // namespace @@ -230,7 +230,7 @@ std::pair, std::vector> round_robin_part auto uniq_tbl = cudf::detail::gather( input, iter_begin, iter_begin + nrows, cudf::out_of_bounds_policy::DONT_CHECK, stream, mr); - auto ret_pair = std::make_pair(std::move(uniq_tbl), std::vector(num_partitions)); + auto ret_pair = std::pair(std::move(uniq_tbl), std::vector(num_partitions)); // this has the effect of rotating the set of partition sizes // right by start_partition positions: diff --git a/cpp/src/replace/clamp.cu b/cpp/src/replace/clamp.cu index 8b696854c25..73b224b0c99 100644 --- a/cpp/src/replace/clamp.cu +++ b/cpp/src/replace/clamp.cu @@ -76,7 +76,7 @@ std::pair, std::unique_ptr> form_offsets_and_cha cudf::detail::get_value(offsets_column->view(), strings_count, stream); auto chars_column = cudf::strings::detail::create_chars_child_column(bytes, stream, mr); - return std::make_pair(std::move(offsets_column), std::move(chars_column)); + return std::pair(std::move(offsets_column), std::move(chars_column)); } template diff --git a/cpp/src/strings/convert/convert_datetime.cu b/cpp/src/strings/convert/convert_datetime.cu index 70a6252e9b3..9473bed963e 100644 --- a/cpp/src/strings/convert/convert_datetime.cu +++ b/cpp/src/strings/convert/convert_datetime.cu @@ -1086,7 +1086,7 @@ struct dispatch_from_timestamps_fn { thrust::make_counting_iterator(0), d_timestamps.size(), pfn); - return std::make_pair(std::move(offsets_column), std::move(chars_column)); + return std::pair(std::move(offsets_column), std::move(chars_column)); } template diff --git a/cpp/src/strings/json/json_path.cu b/cpp/src/strings/json/json_path.cu index 30e8770c3c2..995b6223ddc 100644 --- a/cpp/src/strings/json/json_path.cu +++ b/cpp/src/strings/json/json_path.cu @@ -670,8 +670,8 @@ std::pair>, int> build_comma auto const is_empty = h_operators.size() == 1 && h_operators[0].type == path_operator_type::END; return is_empty - ? std::make_pair(thrust::nullopt, 0) - : std::make_pair( + ? std::pair(thrust::nullopt, 0) + : std::pair( thrust::make_optional(cudf::detail::make_device_uvector_sync(h_operators, stream)), max_stack_depth); } diff --git a/cpp/src/strings/repeat_strings.cu b/cpp/src/strings/repeat_strings.cu index d496b46bc36..7a3e0fb0243 100644 --- a/cpp/src/strings/repeat_strings.cu +++ b/cpp/src/strings/repeat_strings.cu @@ -283,7 +283,7 @@ auto make_strings_children(Func fn, for_each_fn(fn); } - return std::make_pair(std::move(offsets_column), std::move(chars_column)); + return std::pair(std::move(offsets_column), std::move(chars_column)); } } // namespace @@ -345,7 +345,7 @@ std::pair, int64_t> repeat_strings_output_sizes( auto const strings_count = input.size(); if (strings_count == 0) { - return std::make_pair(make_empty_column(type_to_id()), int64_t{0}); + return std::pair(make_empty_column(type_to_id()), int64_t{0}); } auto output_sizes = make_numeric_column( @@ -374,7 +374,7 @@ std::pair, int64_t> repeat_strings_output_sizes( int64_t{0}, thrust::plus{}); - return std::make_pair(std::move(output_sizes), total_bytes); + return std::pair(std::move(output_sizes), total_bytes); } } // namespace detail diff --git a/cpp/src/structs/utilities.cpp b/cpp/src/structs/utilities.cpp index 852a32bed3d..a2c173cae5f 100644 --- a/cpp/src/structs/utilities.cpp +++ b/cpp/src/structs/utilities.cpp @@ -371,7 +371,7 @@ std::tuple> superimpose_paren auto [new_child_mask, null_count] = [&] { if (not child.nullable()) { // Adopt parent STRUCT's null mask. - return std::make_pair(structs_column.null_mask(), 0); + return std::pair(structs_column.null_mask(), 0); } // Both STRUCT and child are nullable. AND() for the child's new null mask. @@ -387,8 +387,8 @@ std::tuple> superimpose_paren stream, mr); ret_validity_buffers.push_back(std::move(new_mask)); - return std::make_pair( - reinterpret_cast(ret_validity_buffers.back().data()), null_count); + return std::pair(reinterpret_cast(ret_validity_buffers.back().data()), + null_count); }(); return cudf::column_view( diff --git a/cpp/src/text/subword/data_normalizer.cu b/cpp/src/text/subword/data_normalizer.cu index 2ed59c3ae0c..71f9e3f7043 100644 --- a/cpp/src/text/subword/data_normalizer.cu +++ b/cpp/src/text/subword/data_normalizer.cu @@ -278,8 +278,8 @@ uvector_pair data_normalizer::normalize(char const* d_strings, rmm::cuda_stream_view stream) const { if (num_strings == 0) - return std::make_pair(std::make_unique>(0, stream), - std::make_unique>(0, stream)); + return std::pair(std::make_unique>(0, stream), + std::make_unique>(0, stream)); // copy offsets to working memory size_t const num_offsets = num_strings + 1; @@ -294,8 +294,8 @@ uvector_pair data_normalizer::normalize(char const* d_strings, }); uint32_t const bytes_count = d_strings_offsets->element(num_strings, stream); if (bytes_count == 0) // if no bytes, nothing to do - return std::make_pair(std::make_unique>(0, stream), - std::make_unique>(0, stream)); + return std::pair(std::make_unique>(0, stream), + std::make_unique>(0, stream)); cudf::detail::grid_1d const grid{static_cast(bytes_count), THREADS_PER_BLOCK, 1}; size_t const threads_on_device = grid.num_threads_per_block * grid.num_blocks; diff --git a/cpp/src/transform/bools_to_mask.cu b/cpp/src/transform/bools_to_mask.cu index 2cf4771890b..a1f49a5685f 100644 --- a/cpp/src/transform/bools_to_mask.cu +++ b/cpp/src/transform/bools_to_mask.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020, NVIDIA CORPORATION. + * Copyright (c) 2019-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,7 @@ std::pair, cudf::size_type> bools_to_mask( { CUDF_EXPECTS(input.type().id() == type_id::BOOL8, "Input is not of type bool"); - if (input.is_empty()) { return std::make_pair(std::make_unique(), 0); } + if (input.is_empty()) { return std::pair(std::make_unique(), 0); } auto input_device_view_ptr = column_device_view::create(input, stream); auto input_device_view = *input_device_view_ptr; @@ -45,12 +45,12 @@ std::pair, cudf::size_type> bools_to_mask( auto mask = detail::valid_if(input_begin, input_begin + input.size(), pred, stream, mr); - return std::make_pair(std::make_unique(std::move(mask.first)), mask.second); + return std::pair(std::make_unique(std::move(mask.first)), mask.second); } else { auto mask = detail::valid_if( input_device_view.begin(), input_device_view.end(), pred, stream, mr); - return std::make_pair(std::make_unique(std::move(mask.first)), mask.second); + return std::pair(std::make_unique(std::move(mask.first)), mask.second); } } diff --git a/cpp/src/transform/encode.cu b/cpp/src/transform/encode.cu index 04821b09eab..60769665fca 100644 --- a/cpp/src/transform/encode.cu +++ b/cpp/src/transform/encode.cu @@ -57,7 +57,7 @@ std::pair, std::unique_ptr> encode( auto indices_column = cudf::detail::lower_bound( sorted_unique_keys->view(), input_table, column_order, null_precedence, stream, mr); - return std::make_pair(std::move(sorted_unique_keys), std::move(indices_column)); + return std::pair(std::move(sorted_unique_keys), std::move(indices_column)); } } // namespace detail diff --git a/cpp/src/transform/nans_to_nulls.cu b/cpp/src/transform/nans_to_nulls.cu index ee63e6d366f..42d41b44779 100644 --- a/cpp/src/transform/nans_to_nulls.cu +++ b/cpp/src/transform/nans_to_nulls.cu @@ -53,8 +53,7 @@ struct dispatch_nan_to_null { stream, mr); - return std::make_pair(std::make_unique(std::move(mask.first)), - mask.second); + return std::pair(std::make_unique(std::move(mask.first)), mask.second); } else { auto pred = [input_device_view] __device__(cudf::size_type idx) { return not(std::isnan(input_device_view.element(idx))); @@ -66,8 +65,7 @@ struct dispatch_nan_to_null { stream, mr); - return std::make_pair(std::make_unique(std::move(mask.first)), - mask.second); + return std::pair(std::make_unique(std::move(mask.first)), mask.second); } } @@ -85,7 +83,7 @@ struct dispatch_nan_to_null { std::pair, cudf::size_type> nans_to_nulls( column_view const& input, rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr) { - if (input.is_empty()) { return std::make_pair(std::make_unique(), 0); } + if (input.is_empty()) { return std::pair(std::make_unique(), 0); } return cudf::type_dispatcher(input.type(), dispatch_nan_to_null{}, input, stream, mr); } diff --git a/cpp/src/transform/one_hot_encode.cu b/cpp/src/transform/one_hot_encode.cu index 16aee349bb5..b1a8858f847 100644 --- a/cpp/src/transform/one_hot_encode.cu +++ b/cpp/src/transform/one_hot_encode.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,7 +89,7 @@ struct one_hot_encode_launcher { auto views = cudf::split(all_encodings->view(), split_indices); table_view encodings_view{views}; - return std::make_pair(std::move(all_encodings), encodings_view); + return std::pair(std::move(all_encodings), encodings_view); } template , table_view> one_hot_encode(column_view const& { CUDF_EXPECTS(input.type() == categories.type(), "Mismatch type between input and categories."); - if (categories.is_empty()) { - return std::make_pair(make_empty_column(type_id::BOOL8), table_view{}); - } + if (categories.is_empty()) { return std::pair(make_empty_column(type_id::BOOL8), table_view{}); } if (input.is_empty()) { auto empty_data = make_empty_column(type_id::BOOL8); std::vector views(categories.size(), empty_data->view()); - return std::make_pair(std::move(empty_data), table_view{views}); + return std::pair(std::move(empty_data), table_view{views}); } return type_dispatcher(input.type(), one_hot_encode_launcher{}, input, categories, stream, mr); diff --git a/cpp/src/transpose/transpose.cu b/cpp/src/transpose/transpose.cu index b5b00b11a0f..a87cf60a252 100644 --- a/cpp/src/transpose/transpose.cu +++ b/cpp/src/transpose/transpose.cu @@ -37,7 +37,7 @@ std::pair, table_view> transpose(table_view const& input { // If there are no rows in the input, return successfully if (input.num_columns() == 0 || input.num_rows() == 0) { - return std::make_pair(std::make_unique(), table_view{}); + return std::pair(std::make_unique(), table_view{}); } // Check datatype homogeneity @@ -54,7 +54,7 @@ std::pair, table_view> transpose(table_view const& input auto splits = std::vector(splits_iter, splits_iter + input.num_rows() - 1); auto output_column_views = split(output_column->view(), splits, stream); - return std::make_pair(std::move(output_column), table_view(output_column_views)); + return std::pair(std::move(output_column), table_view(output_column_views)); } } // namespace detail diff --git a/cpp/tests/groupby/m2_tests.cpp b/cpp/tests/groupby/m2_tests.cpp index be7d6c1ce05..6f5a04e3752 100644 --- a/cpp/tests/groupby/m2_tests.cpp +++ b/cpp/tests/groupby/m2_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,8 +48,7 @@ auto compute_M2(cudf::column_view const& keys, cudf::column_view const& values) auto gb_obj = cudf::groupby::groupby(cudf::table_view({keys})); auto result = gb_obj.aggregate(requests); - return std::make_pair(std::move(result.first->release()[0]), - std::move(result.second[0].results[0])); + return std::pair(std::move(result.first->release()[0]), std::move(result.second[0].results[0])); } } // namespace diff --git a/cpp/tests/groupby/merge_lists_tests.cpp b/cpp/tests/groupby/merge_lists_tests.cpp index 7c24c6267ca..593bb7c50af 100644 --- a/cpp/tests/groupby/merge_lists_tests.cpp +++ b/cpp/tests/groupby/merge_lists_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,8 +47,7 @@ auto merge_lists(vcol_views const& keys_cols, vcol_views const& values_cols) auto gb_obj = cudf::groupby::groupby(cudf::table_view({*keys})); auto result = gb_obj.aggregate(requests); - return std::make_pair(std::move(result.first->release()[0]), - std::move(result.second[0].results[0])); + return std::pair(std::move(result.first->release()[0]), std::move(result.second[0].results[0])); } } // namespace diff --git a/cpp/tests/groupby/merge_m2_tests.cpp b/cpp/tests/groupby/merge_m2_tests.cpp index 60067e78022..79ffebf146c 100644 --- a/cpp/tests/groupby/merge_m2_tests.cpp +++ b/cpp/tests/groupby/merge_m2_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,10 +67,9 @@ auto compute_partial_results(cudf::column_view const& keys, cudf::column_view co auto [out_keys, out_results] = gb_obj.aggregate(requests); auto const num_output_rows = out_keys->num_rows(); - return std::make_pair( - std::move(out_keys->release()[0]), - cudf::make_structs_column( - num_output_rows, std::move(out_results[0].results), 0, rmm::device_buffer{})); + return std::pair(std::move(out_keys->release()[0]), + cudf::make_structs_column( + num_output_rows, std::move(out_results[0].results), 0, rmm::device_buffer{})); } /** @@ -93,8 +92,7 @@ auto merge_M2(vcol_views const& keys_cols, vcol_views const& values_cols) auto gb_obj = cudf::groupby::groupby(cudf::table_view({*keys})); auto result = gb_obj.aggregate(requests); - return std::make_pair(std::move(result.first->release()[0]), - std::move(result.second[0].results[0])); + return std::pair(std::move(result.first->release()[0]), std::move(result.second[0].results[0])); } } // namespace diff --git a/cpp/tests/groupby/merge_sets_tests.cpp b/cpp/tests/groupby/merge_sets_tests.cpp index 1e2f0c9fa9e..57f67f6b81a 100644 --- a/cpp/tests/groupby/merge_sets_tests.cpp +++ b/cpp/tests/groupby/merge_sets_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,8 +47,7 @@ auto merge_sets(vcol_views const& keys_cols, vcol_views const& values_cols) auto gb_obj = cudf::groupby::groupby(cudf::table_view({*keys})); auto result = gb_obj.aggregate(requests); - return std::make_pair(std::move(result.first->release()[0]), - std::move(result.second[0].results[0])); + return std::pair(std::move(result.first->release()[0]), std::move(result.second[0].results[0])); } } // namespace diff --git a/cpp/tests/interop/to_arrow_test.cpp b/cpp/tests/interop/to_arrow_test.cpp index d1dc60119b6..4b481ade83f 100644 --- a/cpp/tests/interop/to_arrow_test.cpp +++ b/cpp/tests/interop/to_arrow_test.cpp @@ -148,7 +148,7 @@ std::pair, std::shared_ptr> get_table auto schema = std::make_shared(schema_vector); - return std::make_pair( + return std::pair( std::make_unique(std::move(columns)), arrow::Table::Make( schema, {int64array, string_array, dict_array, boolarray, list_array, struct_array})); diff --git a/cpp/tests/join/conditional_join_tests.cu b/cpp/tests/join/conditional_join_tests.cu index 73b355d496d..13852027bf0 100644 --- a/cpp/tests/join/conditional_join_tests.cu +++ b/cpp/tests/join/conditional_join_tests.cu @@ -93,7 +93,7 @@ std::pair, std::vector> gen_random_repeated_columns( std::mt19937 gen(rd()); std::shuffle(left.begin(), left.end(), gen); std::shuffle(right.begin(), right.end(), gen); - return std::make_pair(std::move(left), std::move(right)); + return std::pair(std::move(left), std::move(right)); } // Generate a single pair of left/right nullable columns of random data @@ -120,8 +120,8 @@ gen_random_nullable_repeated_columns(unsigned int N = 10000, unsigned int num_re return uniform_dist(gen) > 0.5; }); - return std::make_pair(std::make_pair(std::move(left), std::move(left_nulls)), - std::make_pair(std::move(right), std::move(right_nulls))); + return std::pair(std::pair(std::move(left), std::move(left_nulls)), + std::pair(std::move(right), std::move(right_nulls))); } } // namespace diff --git a/cpp/tests/join/join_tests.cpp b/cpp/tests/join/join_tests.cpp index f560ce7f20c..8ed50c8fb39 100644 --- a/cpp/tests/join/join_tests.cpp +++ b/cpp/tests/join/join_tests.cpp @@ -67,7 +67,7 @@ struct JoinTest : public cudf::test::BaseFixture { auto gold_sort_order = cudf::sorted_order(gold); auto sorted_gold = cudf::gather(gold, *gold_sort_order); - return std::make_pair(std::move(sorted_gold), std::move(sorted_result)); + return std::pair(std::move(sorted_gold), std::move(sorted_result)); } }; diff --git a/cpp/tests/join/mixed_join_tests.cu b/cpp/tests/join/mixed_join_tests.cu index df5b1f5c14a..edcf1d1be27 100644 --- a/cpp/tests/join/mixed_join_tests.cu +++ b/cpp/tests/join/mixed_join_tests.cu @@ -94,7 +94,7 @@ std::pair, std::vector> gen_random_repeated_columns( std::mt19937 gen(rd()); std::shuffle(left.begin(), left.end(), gen); std::shuffle(right.begin(), right.end(), gen); - return std::make_pair(std::move(left), std::move(right)); + return std::pair(std::move(left), std::move(right)); } // Generate a single pair of left/right nullable columns of random data @@ -121,8 +121,8 @@ gen_random_nullable_repeated_columns(unsigned int N = 10000, unsigned int num_re return uniform_dist(gen) > 0.5; }); - return std::make_pair(std::make_pair(std::move(left), std::move(left_nulls)), - std::make_pair(std::move(right), std::move(right_nulls))); + return std::pair(std::pair(std::move(left), std::move(left_nulls)), + std::pair(std::move(right), std::move(right_nulls))); } } // namespace diff --git a/cpp/tests/merge/merge_test.cpp b/cpp/tests/merge/merge_test.cpp index ea26cad3b59..129d1ad66f3 100644 --- a/cpp/tests/merge/merge_test.cpp +++ b/cpp/tests/merge/merge_test.cpp @@ -652,8 +652,8 @@ TYPED_TEST(MergeTest_, NMerge1KeyColumns) std::vector> facts{}; std::vector tables{}; for (int i = 0; i < num_tables; ++i) { - facts.emplace_back(std::make_pair(PairT0(sequence0, sequence0 + inputRows), - PairT1(sequence1, sequence1 + inputRows))); + facts.emplace_back(std::pair(PairT0(sequence0, sequence0 + inputRows), + PairT1(sequence1, sequence1 + inputRows))); tables.push_back(cudf::table_view{{facts.back().first, facts.back().second}}); } std::vector key_cols{0}; diff --git a/cpp/tests/search/search_struct_test.cpp b/cpp/tests/search/search_struct_test.cpp index a1f0b1d81cf..159b082890a 100644 --- a/cpp/tests/search/search_struct_test.cpp +++ b/cpp/tests/search/search_struct_test.cpp @@ -57,7 +57,7 @@ auto search_bounds(cudf::column_view const& t_col_view, auto const values = cudf::table_view{std::vector{values_col->view()}}; auto result_lower_bound = cudf::lower_bound(t, values, column_orders, null_precedence); auto result_upper_bound = cudf::upper_bound(t, values, column_orders, null_precedence); - return std::make_pair(std::move(result_lower_bound), std::move(result_upper_bound)); + return std::pair(std::move(result_lower_bound), std::move(result_upper_bound)); } auto search_bounds(std::unique_ptr const& t_col, diff --git a/cpp/tests/stream_compaction/distinct_count_tests.cpp b/cpp/tests/stream_compaction/distinct_count_tests.cpp index 0529539c4b2..31bbd43c78d 100644 --- a/cpp/tests/stream_compaction/distinct_count_tests.cpp +++ b/cpp/tests/stream_compaction/distinct_count_tests.cpp @@ -71,7 +71,7 @@ TYPED_TEST(TypedDistinctCount, TableNoNull) std::vector> pair_input; std::transform( input1.begin(), input1.end(), input2.begin(), std::back_inserter(pair_input), [](T a, T b) { - return std::make_pair(a, b); + return std::pair(a, b); }); cudf::test::fixed_width_column_wrapper input_col1(input1.begin(), input1.end()); diff --git a/cpp/tests/stream_compaction/unique_count_tests.cpp b/cpp/tests/stream_compaction/unique_count_tests.cpp index 3285cd1a711..591fe042592 100644 --- a/cpp/tests/stream_compaction/unique_count_tests.cpp +++ b/cpp/tests/stream_compaction/unique_count_tests.cpp @@ -71,7 +71,7 @@ TYPED_TEST(TypedUniqueCount, TableNoNull) std::vector> pair_input; std::transform( input1.begin(), input1.end(), input2.begin(), std::back_inserter(pair_input), [](T a, T b) { - return std::make_pair(a, b); + return std::pair(a, b); }); cudf::test::fixed_width_column_wrapper input_col1(input1.begin(), input1.end()); diff --git a/cpp/tests/strings/translate_tests.cpp b/cpp/tests/strings/translate_tests.cpp index e928065dca4..53c6982b880 100644 --- a/cpp/tests/strings/translate_tests.cpp +++ b/cpp/tests/strings/translate_tests.cpp @@ -38,7 +38,7 @@ std::pair make_entry(const char* from, const c cudf::char_utf8 out = 0; cudf::strings::detail::to_char_utf8(from, in); if (to) cudf::strings::detail::to_char_utf8(to, out); - return std::make_pair(in, out); + return std::pair(in, out); } TEST_F(StringsTranslateTest, Translate)