P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::NetHash::Reflect Struct Reference

Static Public Member Functions

template<typename T >
static T op (T data)
 

Detailed Description

Reflects/reverse n-bit number bit-by-bit. Note that it also solves as a slicing cast in the main calculation loop, where it extracts and reflect lowest byte. Written as templated function inside non-teplated class to allow passing the entire thing into crcGeneric and them templating it with two different types inside.