cub::internal::ThreadReduce
Defined in /home/runner/work/cccl/cccl/cub/cub/thread/thread_reduce.cuh
-
template<int LENGTH, typename T, typename ReductionOp, typename PrefixT, typename AccumT = detail::accumulator_t<ReductionOp, PrefixT, T>>
AccumT cub::internal::ThreadReduce(T (&input)[LENGTH], ReductionOp reduction_op, PrefixT prefix) Perform a sequential reduction over the statically-sized
input
array, seeded with the specifiedprefix
.The aggregate is returned.
- Template Parameters
LENGTH – [inferred] LengthT of
input
arrayT – [inferred] The data type to be reduced.
ReductionOp – [inferred] Binary reduction operator type having member
T operator()(const T &a, const T &b)
- Parameters
input – [in] Input array
reduction_op – [in] Binary reduction operator
prefix – [in] Prefix to seed reduction with