cub::BlockScanRunningPrefixOp#

template<typename T, typename ScanOpT>
struct BlockScanRunningPrefixOp#

Stateful callback operator type for supplying BlockScan prefixes.

Maintains a running prefix that can be applied to consecutive BlockScan operations.

Template Parameters:
  • TBlockScan value type

  • ScanOpT – Wrapped scan operator type

Public Functions

inline BlockScanRunningPrefixOp(ScanOpT op)#

Constructor.

inline BlockScanRunningPrefixOp(T starting_prefix, ScanOpT op)#

Constructor.

inline T operator()(const T &block_aggregate)#

Prefix callback operator.

Returns the block-wide running_total in thread-0.

Parameters:

block_aggregate – The aggregate sum of the BlockScan inputs

Public Members

ScanOpT op#

Wrapped scan operator.

T running_total#

Running block-wide prefix.