#include "xf_database/static_eval.hpp"
template < typename T, typename T_O, T_O(*)(T) opf > void staticEval ( hls::stream <T>& in_strm, hls::stream <bool>& e_in_strm, hls::stream <T_O>& out_strm, hls::stream <bool>& e_out_strm )
One stream input static evaluation.
static_eval function calculates the experssion result that user defined. This result will be passed to aggregate module as the input. When calling this API, the T
T_O
are the input/output data types for each parameter of user code. E.g.
// decl
long user_func(int a);
// use
database::static_eval<int, long, user_func>(
in1_strm, e_in_strm, out_strm, e_out_strm);
In the above call, int
is the data type of input of user_func
, and long
is the return type of user_func
.
Parameters:
T | the input stream type, inferred from argument |
T_O | the output stream type, inferred from argument |
opf | the user-defined expression function |
in_strm | input data stream |
e_in_strm | end flag stream for input data |
out_strm | output data stream |
e_out_strm | end flag stream for output data |