Skip to content

Commit

Permalink
removed redundant stream getter call
Browse files Browse the repository at this point in the history
  • Loading branch information
lamarrr committed Jan 10, 2025
1 parent 349e8d3 commit d7a7d17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/benchmarks/binaryop/polynomials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,21 @@ static void BM_binaryop_polynomials(nvbench::state& state)

state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
// computes polynomials: (((ax + b)x + c)x + d)x + e... = ax**4 + bx**3 + cx**2 + dx + e....
rmm::cuda_stream_view stream{launch.get_stream().get_stream()};

auto result =
cudf::make_column_from_scalar(constants[0], num_rows, launch.get_stream().get_stream());
auto result = cudf::make_column_from_scalar(constants[0], num_rows, stream);

for (cudf::size_type i = 0; i < order; i++) {
auto product = cudf::binary_operation(result->view(),
column_view,
cudf::binary_operator::MUL,
cudf::data_type{cudf::type_to_id<key_type>()},
launch.get_stream().get_stream());
stream);
auto sum = cudf::binary_operation(product->view(),
constants[i + 1],
cudf::binary_operator::ADD,
cudf::data_type{cudf::type_to_id<key_type>()},
launch.get_stream().get_stream());
stream);
result = std::move(sum);
}
});
Expand Down

0 comments on commit d7a7d17

Please sign in to comment.