MCPcopy Create free account
hub / github.com/bytedance/bolt / reduce

Method reduce

bolt/cudf/exec/HashAggregation.cpp:73–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 3

reduceFunction · 0.85
typeMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected