| 71 | } |
| 72 | |
| 73 | std::vector<std::unique_ptr<::cudf::column>> reduce( |
| 74 | const ::cudf::column_view& values) override { |
| 75 | std::unique_ptr<::cudf::scalar> outputScalar; |
| 76 | try { |
| 77 | outputScalar = ::cudf::reduce( |
| 78 | values, |
| 79 | *(CudfAggregation{} |
| 80 | .template operator()<::cudf::reduce_aggregation>()), |
| 81 | values.type(), |
| 82 | stream_); |
| 83 | } catch (const ::cudf::logic_error& e) { |
| 84 | BOLT_FAIL("Reduce aggregation failed: {}", e.what()); |
| 85 | } |
| 86 | std::vector<std::unique_ptr<::cudf::column>> result; |
| 87 | result.emplace_back( |
| 88 | ::cudf::make_column_from_scalar(*outputScalar, 1, stream_)); |
| 89 | return result; |
| 90 | } |
| 91 | |
| 92 | std::vector<std::unique_ptr<::cudf::column>> finalize( |
| 93 | std::vector<std::unique_ptr<::cudf::column>>&& intermediateCols) |