bdi.cc (13944:5000533e6b81) bdi.cc (14269:7e364bd625e1)
1/*
2 * Copyright (c) 2018 Inria
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 152 unchanged lines hidden (view full) ---

161template <class TB, class TD>
162void
163BDI::BDICompDataBaseDelta<TB, TD>::calculateCompressedSize()
164{
165 // Number of bits used by Encoding
166 std::size_t size = encodingBits;
167
168 // Number of bits used by BitMask
1/*
2 * Copyright (c) 2018 Inria
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 152 unchanged lines hidden (view full) ---

161template <class TB, class TD>
162void
163BDI::BDICompDataBaseDelta<TB, TD>::calculateCompressedSize()
164{
165 // Number of bits used by Encoding
166 std::size_t size = encodingBits;
167
168 // Number of bits used by BitMask
169 size += bitMask.size()*std::ceil(std::log2(bases.size()));
169 size += bitMask.size()*std::ceil(std::log2(maxNumBases));
170
171 // Number of bits used by Bases. bases[0] is implicit in a hardware
172 // implementation, therefore its size is 0
173 size += (maxNumBases-1)*sizeof(TB)*CHAR_BIT;
174
175 // Number of bits used by Deltas
176 size += deltas.size()*sizeof(TD)*CHAR_BIT;
177

--- 304 unchanged lines hidden ---
170
171 // Number of bits used by Bases. bases[0] is implicit in a hardware
172 // implementation, therefore its size is 0
173 size += (maxNumBases-1)*sizeof(TB)*CHAR_BIT;
174
175 // Number of bits used by Deltas
176 size += deltas.size()*sizeof(TD)*CHAR_BIT;
177

--- 304 unchanged lines hidden ---