Thrill
0.1
|
Definition at line 114 of file bit_stream.hpp.
#include <bit_stream.hpp>
Public Member Functions | |
BitStreamReader (BlockReader &block_reader) | |
BitStreamReader (const BitStreamReader &)=delete | |
non-copyable: delete copy-constructor More... | |
BitStreamReader (BitStreamReader &&)=default | |
move-constructor: default More... | |
size_t | GetBits (unsigned bits) |
Get bits at the cursor. More... | |
unsigned | GetNumberOfOnesUntilNextZero () |
Returns the number of continuous 1 bits at the cursor, followed by a zero. More... | |
bool | HasNextZeroTest () |
BitStreamReader & | operator= (const BitStreamReader &)=delete |
non-copyable: delete assignment operator More... | |
BitStreamReader & | operator= (BitStreamReader &&)=default |
move-assignment operator: default More... | |
Protected Types | |
enum | : size_t { buffer_bits_ = sizeof(size_t) * 8 } |
number of bits in buffer_ More... | |
enum | : size_t { mask = (buffer_bits_ - 1) } |
modulo mask of number of bits in buffer for pos_ counter More... | |
enum | : size_t { msb_set = ((size_t)1) << (buffer_bits_ - 1) } |
highest bit set More... | |
Protected Attributes | |
BlockReader & | block_reader_ |
Input BlockReader. More... | |
size_t | buffer_ = 0 |
current buffer of 32/64 bits More... | |
size_t | pos_ = buffer_bits_ |
currently used number of bits More... | |
|
protected |
|
protected |
modulo mask of number of bits in buffer for pos_ counter
Enumerator | |
---|---|
mask |
Definition at line 121 of file bit_stream.hpp.
|
protected |
|
inlineexplicit |
Definition at line 127 of file bit_stream.hpp.
References BitStreamWriter< BlockWriter >::operator=().
|
delete |
non-copyable: delete copy-constructor
|
default |
move-constructor: default
|
inline |
Get bits at the cursor.
bits | number of bits to return |
Definition at line 147 of file bit_stream.hpp.
References BitStreamWriter< BlockWriter >::buffer_, BitStreamWriter< BlockWriter >::buffer_bits_, BitStreamWriter< BlockWriter >::mask, and BitStreamWriter< BlockWriter >::pos_.
Referenced by LocationDetection< thrill::api::JoinNode::HashCount >::Flush().
|
inline |
Returns the number of continuous 1 bits at the cursor, followed by a zero.
Used in Golomb decoding.
Definition at line 194 of file bit_stream.hpp.
References BitStreamWriter< BlockWriter >::buffer_, BitStreamWriter< BlockWriter >::buffer_bits_, and BitStreamWriter< BlockWriter >::pos_.
|
inline |
Test if the buffer contains a zero or if another item can be read. This test is used by the Golomb decoder to check if another value is available.
Definition at line 174 of file bit_stream.hpp.
References BitStreamWriter< BlockWriter >::buffer_, BitStreamWriter< BlockWriter >::buffer_bits_, and BitStreamWriter< BlockWriter >::pos_.
|
delete |
non-copyable: delete assignment operator
|
default |
move-assignment operator: default
|
protected |
Input BlockReader.
Definition at line 220 of file bit_stream.hpp.
|
protected |
current buffer of 32/64 bits
Definition at line 223 of file bit_stream.hpp.
|
protected |
currently used number of bits
Definition at line 226 of file bit_stream.hpp.