Skip to content

Commit

Permalink
remove unused stream, mr default arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikeyann committed Nov 23, 2021
1 parent 2ff7d89 commit c194b06
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 88 deletions.
78 changes: 36 additions & 42 deletions cpp/src/binaryop/compiled/binary_ops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,26 @@ class mutable_column_device_view;
namespace binops {
namespace compiled {

std::unique_ptr<column> string_null_min_max(
scalar const& lhs,
column_view const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<column> string_null_min_max(scalar const& lhs,
column_view const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

std::unique_ptr<column> string_null_min_max(
column_view const& lhs,
scalar const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<column> string_null_min_max(column_view const& lhs,
scalar const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

std::unique_ptr<column> string_null_min_max(
column_view const& lhs,
column_view const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<column> string_null_min_max(column_view const& lhs,
column_view const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @brief Performs a binary operation between a string scalar and a string
Expand All @@ -74,13 +71,12 @@ std::unique_ptr<column> string_null_min_max(
* @param mr Device memory resource used to allocate the returned column's device memory
* @return std::unique_ptr<column> Output column
*/
std::unique_ptr<column> binary_operation(
scalar const& lhs,
column_view const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<column> binary_operation(scalar const& lhs,
column_view const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @brief Performs a binary operation between a string column and a string
Expand All @@ -101,13 +97,12 @@ std::unique_ptr<column> binary_operation(
* @param mr Device memory resource used to allocate the returned column's device memory
* @return std::unique_ptr<column> Output column
*/
std::unique_ptr<column> binary_operation(
column_view const& lhs,
scalar const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<column> binary_operation(column_view const& lhs,
scalar const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @brief Performs a binary operation between two string columns.
Expand All @@ -127,13 +122,12 @@ std::unique_ptr<column> binary_operation(
* @param mr Device memory resource used to allocate the returned column's device memory
* @return std::unique_ptr<column> Output column
*/
std::unique_ptr<column> binary_operation(
column_view const& lhs,
column_view const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<column> binary_operation(column_view const& lhs,
column_view const& rhs,
binary_operator op,
data_type output_type,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

void binary_operation(mutable_column_view& out,
scalar const& lhs,
Expand Down
25 changes: 11 additions & 14 deletions cpp/src/dictionary/remove_keys.cu
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ namespace {
* @param mr Device memory resource used to allocate the returned column's device memory.
*/
template <typename KeysKeeper>
std::unique_ptr<column> remove_keys_fn(
dictionary_column_view const& dictionary_column,
KeysKeeper keys_to_keep_fn,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
std::unique_ptr<column> remove_keys_fn(dictionary_column_view const& dictionary_column,
KeysKeeper keys_to_keep_fn,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
auto const keys_view = dictionary_column.keys();
auto const indices_type = dictionary_column.indices().type();
Expand Down Expand Up @@ -145,11 +144,10 @@ std::unique_ptr<column> remove_keys_fn(

} // namespace

std::unique_ptr<column> remove_keys(
dictionary_column_view const& dictionary_column,
column_view const& keys_to_remove,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
std::unique_ptr<column> remove_keys(dictionary_column_view const& dictionary_column,
column_view const& keys_to_remove,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
CUDF_EXPECTS(!keys_to_remove.has_nulls(), "keys_to_remove must not have nulls");
auto const keys_view = dictionary_column.keys();
Expand All @@ -163,10 +161,9 @@ std::unique_ptr<column> remove_keys(
return remove_keys_fn(dictionary_column, key_matcher, stream, mr);
}

std::unique_ptr<column> remove_unused_keys(
dictionary_column_view const& dictionary_column,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
std::unique_ptr<column> remove_unused_keys(dictionary_column_view const& dictionary_column,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
// locate the keys to remove
auto const keys_size = dictionary_column.keys_size();
Expand Down
7 changes: 3 additions & 4 deletions cpp/src/io/csv/writer_impl.cu
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,9 @@ struct column_to_strings_fn {
(cudf::is_timestamp<column_type>()) || (cudf::is_duration<column_type>()));
}

explicit column_to_strings_fn(
csv_writer_options const& options,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
explicit column_to_strings_fn(csv_writer_options const& options,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
: options_(options), stream_(stream), mr_(mr)
{
}
Expand Down
13 changes: 5 additions & 8 deletions cpp/src/io/utilities/column_buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ namespace detail {
*
* @return `rmm::device_buffer` Device buffer allocation
*/
inline rmm::device_buffer create_data(
data_type type,
size_type size,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
inline rmm::device_buffer create_data(data_type type,
size_type size,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
std::size_t data_size = size_of(type) * size;

Expand Down Expand Up @@ -93,9 +92,7 @@ struct column_buffer {

// instantiate a column of known type with a specified size. Allows deferred creation for
// preprocessing steps such as in the Parquet reader
void create(size_type _size,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
void create(size_type _size, rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr);

auto data() { return _strings ? _strings->data() : _data.data(); }
auto data_size() const { return _strings ? _strings->size() : _data.size(); }
Expand Down
13 changes: 6 additions & 7 deletions cpp/src/join/conditional_join.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ conditional_join(table_view const& left,
*
* @return Join output indices vector pair
*/
std::size_t compute_conditional_join_output_size(
table_view const& left,
table_view const& right,
ast::expression const& binary_predicate,
join_kind JoinKind,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::size_t compute_conditional_join_output_size(table_view const& left,
table_view const& right,
ast::expression const& binary_predicate,
join_kind JoinKind,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

} // namespace detail
} // namespace cudf
11 changes: 5 additions & 6 deletions cpp/src/reductions/reductions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,11 @@ struct reduce_dispatch_functor {
}
};

std::unique_ptr<scalar> reduce(
column_view const& col,
std::unique_ptr<aggregation> const& agg,
data_type output_dtype,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
std::unique_ptr<scalar> reduce(column_view const& col,
std::unique_ptr<aggregation> const& agg,
data_type output_dtype,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
// Returns default scalar if input column is non-valid. In terms of nested columns, we need to
// handcraft the default scalar with input column.
Expand Down
13 changes: 6 additions & 7 deletions cpp/src/strings/strings_column_factories.cu
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ std::unique_ptr<column> make_strings_column(
return cudf::strings::detail::make_strings_column(strings.begin(), strings.end(), stream, mr);
}

std::unique_ptr<column> make_strings_column(
device_span<char> chars,
device_span<size_type> offsets,
size_type null_count,
rmm::device_buffer&& null_mask,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
std::unique_ptr<column> make_strings_column(device_span<char> chars,
device_span<size_type> offsets,
size_type null_count,
rmm::device_buffer&& null_mask,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
CUDF_FUNC_RANGE();

Expand Down

0 comments on commit c194b06

Please sign in to comment.