Skip to content

Commit

Permalink
Add thrust::async::incluisve_scan with init value
Browse files Browse the repository at this point in the history
  • Loading branch information
gonidelis committed Jul 17, 2024
1 parent fa8c7e3 commit 703c3b4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions thrust/thrust/async/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,27 @@ struct inclusive_scan_fn final
THRUST_FWD(out),
thrust::plus<>{}))

template <typename DerivedPolicy,
typename ForwardIt,
typename Sentinel,
typename OutputIt,
typename InitialValueType,
typename BinaryOp>
auto operator()(thrust::detail::execution_policy_base<DerivedPolicy> const& exec,
ForwardIt&& first,
Sentinel&& last,
OutputIt&& out,
InitialValueType&& init,
BinaryOp&& op) const
// ADL dispatch.
THRUST_RETURNS(async_inclusive_scan(
thrust::detail::derived_cast(thrust::detail::strip_const(exec)),
THRUST_FWD(first),
THRUST_FWD(last),
THRUST_FWD(out),
THRUST_FWD(init),
THRUST_FWD(op)))

template <typename ForwardIt,
typename Sentinel,
typename OutputIt,
Expand Down

0 comments on commit 703c3b4

Please sign in to comment.