4 : exponentBits_(conf.getParameter<uint32_t>(
"exponentBits")),
5 mantissaBits_(conf.getParameter<uint32_t>(
"mantissaBits")),
6 rounding_(conf.getParameter<
bool>(
"rounding")) {
8 throw cms::Exception(
"CodespaceCannotFit") <<
"The code space cannot fit into the unsigned 32-bit space.\n";
16 uint32_t& compressedCode,
17 uint32_t& compressedValue)
const {
27 uint32_t valcopy =
value;
28 for (bitlen = 0; valcopy != 0; valcopy >>= 1, bitlen++) {
31 compressedCode =
value;
32 compressedValue =
value;
45 compressedCode = floatval;
50 compressedCode = floatval;
53 compressedCode = floatval + 1;
54 uint32_t rmantissa = mantissa + 1;
60 compressedValue = ((1 <<
mantissaBits_) | rmantissa) << (rexponent - 1);
66 std::unordered_map<uint32_t, std::array<uint32_t, 2> >& compressed_payload) {
70 uint32_t compressed_value(0);
72 std::array<uint32_t, 2> compressed_item = {{code, compressed_value}};
73 compressed_payload.emplace(
item.first, compressed_item);