From 06fc222598d0cb9a0977170bcbcc077d59a854e2 Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Tue, 1 Oct 2024 10:01:08 +0000 Subject: [PATCH] Opt in, rather than opt out --- cpp/src/reductions/compound.cuh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpp/src/reductions/compound.cuh b/cpp/src/reductions/compound.cuh index b46d8edc872..cd9fade164a 100644 --- a/cpp/src/reductions/compound.cuh +++ b/cpp/src/reductions/compound.cuh @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -59,9 +60,9 @@ std::unique_ptr compound_reduction(column_view const& col, // All null input produces all null output if (valid_count == 0 || - // Don't care about ddof argument of mean. For variance and - // standard deviation must have more valid entries than ddof. - !std::is_same_v && valid_count <= ddof) { + // Only care about ddof for standard deviation and variance right now + valid_count <= ddof && (std::is_same_v || + std::is_same_v)) { auto result = cudf::make_fixed_width_scalar(output_dtype, stream, mr); result->set_valid_async(false, stream); return result;