staticEval overload (2) - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
#include "xf_database/static_eval.hpp"
template <
    typename T1,
    typename T2,
    typename T_O,
    T_O(*)(T1, T2) opf
    >
void staticEval (
    hls::stream <T1>& in1_strm,
    hls::stream <T2>& in2_strm,
    hls::stream <bool>& e_in_strm,
    hls::stream <T_O>& out_strm,
    hls::stream <bool>& e_out_strm
    )

Two stream input static evaluation.

static_eval function calculate the experssion result that user defined. This result will be passed to aggregate module as the input. When calling this API, the T1 T2 T_O are the input/output data types for each parameter of user code. E.g.

// decl
long user_func(int a, int b);
// use
 database::static_eval<int, int, long, user_func>(
  in1_strm, in2_strm, e_in_strm, out_strm, e_out_strm);

In the above call, two int are the data type of input of user_func , and long is the return type of user_func .

Parameters:

T1 the input stream type, inferred from argument
T2 the input stream type, inferred from argument
T_O the output stream type, inferred from argument
opf the user-defined expression function
in1_strm input data stream
in2_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