1 #ifndef REORDER_FACILITY_HH_ 2 #define REORDER_FACILITY_HH_ 17 #include "artdaq-core/Data/Fragment.hh" 25 bool do_reorder(uint8_t *dst,
const uint8_t *src,
const unsigned num_frames) {
51 bool do_reorder_part(uint8_t *dst,
const uint8_t *src,
const unsigned frames_start,
52 const unsigned frames_stop,
const unsigned num_frames) {
59 frames_stop, num_frames,
64 frames_stop, num_frames,
73 return "Forced by config to not use AVX.";
76 return "Going to use AVX512.";
79 return "Going to use AVX2.";
81 return "Going to use baseline.";
92 const uint16_t &num_frames = 6000) {
95 result.setMetadata(meta);
97 uint8_t *
dest = result.dataBeginBytes();
102 std::cout <<
"INFO: " << facility.
get_info() <<
'\n';
104 result.resizeBytes(size);
bool do_reorder(uint8_t *dst, const uint8_t *src, const unsigned num_frames)
static bool do_avx512_reorder(uint8_t *dst, const uint8_t *src, const unsigned &num_frames, unsigned *num_faulty) noexcept
artdaq::Fragment FelixReorder(const uint8_t *src, const uint16_t &num_frames=6000)
static bool do_reorder_part(uint8_t *dst, const uint8_t *src, const unsigned frames_start, const unsigned frames_stop, const unsigned &num_frames, unsigned *num_faulty) noexcept
void do_reorder_start(unsigned num_frames)
static const bool avx512_available
static const bool avx_available
unsigned reorder_final_size()
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
static bool do_reorder(uint8_t *dst, const uint8_t *src, const unsigned &num_frames, unsigned *num_faulty) noexcept
METHODS ///.
static bool do_avx512_reorder_part(uint8_t *dst, const uint8_t *src, const unsigned frames_start, const unsigned frames_stop, const unsigned &num_frames, unsigned *num_faulty) noexcept
static bool do_avx_reorder_part(uint8_t *dst, const uint8_t *src, const unsigned frames_start, const unsigned frames_stop, const unsigned &num_frames, unsigned *num_faulty) noexcept
ReorderFacility(bool force_no_avx=false)
static bool do_avx_reorder(uint8_t *dst, const uint8_t *src, const unsigned &num_frames, unsigned *num_faulty) noexcept
bool do_reorder_part(uint8_t *dst, const uint8_t *src, const unsigned frames_start, const unsigned frames_stop, const unsigned num_frames)
unsigned m_num_faulty_frames
static unsigned calculate_reordered_size(unsigned num_frames, unsigned num_faulty)