#include "xf_database/aggregate.hpp"
template < AggregateOp op, typename T > void aggregate ( hls::stream <T>& in_strm, hls::stream <bool>& in_e_strm, hls::stream <uint64_t>& out_strm, hls::stream <bool>& out_e_strm )
Aggregate function overload for counting.
This function counts the number of input rows, or number of non-zero input rows, and returns the count as uint64_t
value.
Note that count aggregate function will be returned as zero when the input is empty.
For group-by aggregation, please refer to the hashGroupAggregateMPU
primitive.
Parameters:
op | the aggregate operator: AOP_COUNT or AOP_COUNTNONZEROS |
T | the data type of input stream, inferred from argument |
in_strm | input data stream |
in_e_strm | end flag stream for input data |
out_strm | output data stream |
out_e_strm | end flag stream for output data |