1 #ifndef L2EGENCODER_REF_H 2 #define L2EGENCODER_REF_H 26 const std::vector<EGIsoEleObjEmu>&
electrons)
const {
27 std::vector<ap_uint<64>>
ret;
41 std::vector<ap_uint<64>>
ret;
43 auto encoded_egs = encodeLayer2_trivial<T>(egs);
44 encoded_egs.resize(
n, {0});
54 return egiso.toGT().pack();
58 std::vector<ap_uint<96>>
encodeLayer2(
const std::vector<T>& egisos)
const {
59 std::vector<ap_uint<96>>
ret;
60 ret.reserve(egisos.size());
61 for (
const auto& egiso : egisos) {
70 ret(T::BITWIDTH - 1, 0) = egiso.pack();
76 std::vector<ap_uint<96>>
ret;
77 for (
const auto& egiso : egisos) {
84 for (
unsigned int i = 0;
i < packed96.size();
i += 2) {
85 packed64.push_back(packed96[
i](63, 0));
86 packed64.push_back((ap_uint<32>(packed96[
i + 1](95, 64)), ap_uint<32>(packed96[
i](95, 64))));
87 packed64.push_back(packed96[
i + 1](63, 0));
std::vector< ap_uint< 64 > > encodeLayer2EgObjs(const std::vector< EGIsoObjEmu > &photons, const std::vector< EGIsoEleObjEmu > &electrons) const
ret
prodAgent to be discontinued
void encodeLayer2To64bits(const std::vector< ap_uint< 96 >> &packed96, std::vector< ap_uint< 64 >> &packed64) const
ap_uint< 96 > encodeLayer2(const T &egiso) const
ap_uint< 96 > encodeLayer2_trivial(const T &egiso) const
L2EgEncoderEmulator(unsigned int nTKELE_OUT, unsigned int nTKPHO_OUT)
std::vector< ap_uint< 64 > > encodeLayer2EgObjs_trivial(const std::vector< T > &egs, int n) const
unsigned int nEncodedWords_
std::vector< ap_uint< 96 > > encodeLayer2_trivial(const std::vector< T > &egisos) const
std::vector< ap_uint< 96 > > encodeLayer2(const std::vector< T > &egisos) const
void toFirmware(const std::vector< ap_uint< 64 >> &encoded_in, ap_uint< 64 > encoded_fw[]) const