From aaf4d5a4bd52de9f46ed95cd64e0d0e918623c4c Mon Sep 17 00:00:00 2001 From: David Wendt Date: Tue, 19 Oct 2021 06:57:09 -0400 Subject: [PATCH 1/2] Fix memcheck write error in copy-if-else --- cpp/include/cudf/detail/copy_if_else.cuh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/include/cudf/detail/copy_if_else.cuh b/cpp/include/cudf/detail/copy_if_else.cuh index 1eb050d6a8f..83c3b89717e 100644 --- a/cpp/include/cudf/detail/copy_if_else.cuh +++ b/cpp/include/cudf/detail/copy_if_else.cuh @@ -66,7 +66,7 @@ __launch_bounds__(block_size) __global__ while (warp_cur <= warp_end) { auto const opt_value = (index < end) ? (filter(index) ? lhs[index] : rhs[index]) : thrust::nullopt; - if (not has_nulls or opt_value) { out.element(index) = static_cast(*opt_value); } + if (opt_value) { out.element(index) = static_cast(*opt_value); } // update validity if (has_nulls) { From 7a35e98beb26fd2515ef3139638bbca4343a9b26 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Tue, 19 Oct 2021 06:57:28 -0400 Subject: [PATCH 2/2] fix unused var compiling warning --- cpp/src/groupby/sort/group_correlation.cu | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/src/groupby/sort/group_correlation.cu b/cpp/src/groupby/sort/group_correlation.cu index daf99563270..e43d0185e93 100644 --- a/cpp/src/groupby/sort/group_correlation.cu +++ b/cpp/src/groupby/sort/group_correlation.cu @@ -63,6 +63,8 @@ struct type_casted_accessor { if constexpr (column_device_view::has_element_accessor() and std::is_convertible_v) return static_cast(col.element(i)); + (void)i; + (void)col; return {}; } };