Skip to content

Commit

Permalink
fix const ptr, remove temp variable
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikeyann committed Jul 27, 2021
1 parent 4414f3f commit b4deb5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions cpp/include/cudf/detail/indexalator.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ struct base_indexalator {
*/
CUDA_HOST_DEVICE_CALLABLE difference_type operator-(T const& rhs) const
{
auto& derived = static_cast<T const&>(*this);
return (derived.p_ - rhs.p_) / width_;
return (static_cast<T const&>(*this).p_ - rhs.p_) / width_;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/replace/nulls.cu
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ std::unique_ptr<cudf::column> replace_nulls_column_kernel_forwarder::operator()<

template <typename T>
struct replace_nulls_functor {
T* value_it;
replace_nulls_functor(T* _value_it) : value_it(_value_it) {}
T const* value_it;
replace_nulls_functor(T const* _value_it) : value_it(_value_it) {}
__device__ T operator()(T input, bool is_valid) { return is_valid ? input : *value_it; }
};

Expand Down

0 comments on commit b4deb5d

Please sign in to comment.