directGroupAggregate overload (2) - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
#include "xf_database/direct_group_aggregate.hpp"
template <
    int DATINW,
    int DATOUTW,
    int DIRECTW
    >
void directGroupAggregate (
    ap_uint <32> op,
    hls::stream <ap_uint <DATINW>>& vin_strm,
    hls::stream <bool>& in_e_strm,
    hls::stream <ap_uint <DATOUTW>>& vout_strm,
    hls::stream <bool>& out_e_strm,
    hls::stream <ap_uint <DIRECTW>>& kin_strm,
    hls::stream <ap_uint <DIRECTW>>& kout_strm
    )

Group-by aggregation with limited key width, runtime programmable.

This primitive is suitable for scenario in which the width of group key is limited, so that a on-chip array directly addressed by the key can be created to store the aggregation value. The total storage required is row size * (2 ^ key width) .

The following aggregate operators are supported:

  • AOP_MAX
  • AOP_MIN
  • AOP_SUM
  • AOP_COUNT
  • AOP_MEAN
  • AOP_NORM1

The return value is typed the same as the input payload value.

Caution

Attention should be paid for overflow in sum or count.

Parameters:

DATINW the width of input payload
DATOUTW the width of output aggr-payload
DIRECTW the width of input and output key
op the aggregate operator, as defined in AggregateOp enum.
vin_strm value input
in_e_strm end flag stream for input data
vout_strm value output
out_e_strm end flag stream for output data
kin_strm group-by key input
kout_strm group-by key output