Skip to content

Commit

Permalink
Take iterators by value in clamp.cu. (#11084)
Browse files Browse the repository at this point in the history
This PR updates `clamp.cu` to take templated iterator types by value. This aligns the style with the rest of libcudf. See also: #11019 (comment)

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Nghia Truong (https://github.com/ttnghia)
  - David Wendt (https://github.com/davidwendt)
  - Mark Harris (https://github.com/harrism)

URL: #11084
  • Loading branch information
bdice authored Jun 16, 2022
1 parent f2d471e commit 0f77adc
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions cpp/src/replace/clamp.cu
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ std::pair<std::unique_ptr<column>, std::unique_ptr<column>> form_offsets_and_cha

template <typename OptionalScalarIterator, typename ReplaceScalarIterator>
std::unique_ptr<cudf::column> clamp_string_column(strings_column_view const& input,
OptionalScalarIterator const& lo_itr,
ReplaceScalarIterator const& lo_replace_itr,
OptionalScalarIterator const& hi_itr,
ReplaceScalarIterator const& hi_replace_itr,
OptionalScalarIterator lo_itr,
ReplaceScalarIterator lo_replace_itr,
OptionalScalarIterator hi_itr,
ReplaceScalarIterator hi_replace_itr,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
Expand Down Expand Up @@ -153,10 +153,10 @@ std::unique_ptr<cudf::column> clamp_string_column(strings_column_view const& inp
template <typename T, typename OptionalScalarIterator, typename ReplaceScalarIterator>
std::enable_if_t<cudf::is_fixed_width<T>(), std::unique_ptr<cudf::column>> clamper(
column_view const& input,
OptionalScalarIterator const& lo_itr,
ReplaceScalarIterator const& lo_replace_itr,
OptionalScalarIterator const& hi_itr,
ReplaceScalarIterator const& hi_replace_itr,
OptionalScalarIterator lo_itr,
ReplaceScalarIterator lo_replace_itr,
OptionalScalarIterator hi_itr,
ReplaceScalarIterator hi_replace_itr,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
Expand Down Expand Up @@ -200,10 +200,10 @@ std::enable_if_t<cudf::is_fixed_width<T>(), std::unique_ptr<cudf::column>> clamp
template <typename T, typename OptionalScalarIterator, typename ReplaceScalarIterator>
std::enable_if_t<std::is_same_v<T, string_view>, std::unique_ptr<cudf::column>> clamper(
column_view const& input,
OptionalScalarIterator const& lo_itr,
ReplaceScalarIterator const& lo_replace_itr,
OptionalScalarIterator const& hi_itr,
ReplaceScalarIterator const& hi_replace_itr,
OptionalScalarIterator lo_itr,
ReplaceScalarIterator lo_replace_itr,
OptionalScalarIterator hi_itr,
ReplaceScalarIterator hi_replace_itr,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
Expand All @@ -215,10 +215,10 @@ std::enable_if_t<std::is_same_v<T, string_view>, std::unique_ptr<cudf::column>>
template <typename T, typename OptionalScalarIterator, typename ReplaceScalarIterator>
std::unique_ptr<column> clamp(
column_view const& input,
OptionalScalarIterator const& lo_itr,
ReplaceScalarIterator const& lo_replace_itr,
OptionalScalarIterator const& hi_itr,
ReplaceScalarIterator const& hi_replace_itr,
OptionalScalarIterator lo_itr,
ReplaceScalarIterator lo_replace_itr,
OptionalScalarIterator hi_itr,
ReplaceScalarIterator hi_replace_itr,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
{
Expand Down

0 comments on commit 0f77adc

Please sign in to comment.