Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GolombBitStreamWriter< BlockWriter > Class Template Reference

Detailed Description

template<typename BlockWriter>
class thrill::core::GolombBitStreamWriter< BlockWriter >

Definition at line 29 of file golomb_bit_stream.hpp.

+ Inheritance diagram for GolombBitStreamWriter< BlockWriter >:
+ Collaboration diagram for GolombBitStreamWriter< BlockWriter >:

#include <golomb_bit_stream.hpp>

Public Member Functions

 GolombBitStreamWriter (BlockWriter &block_writer, const size_t &b)
 
 GolombBitStreamWriter (const GolombBitStreamWriter &)=delete
 non-copyable: delete copy-constructor More...
 
 GolombBitStreamWriter (GolombBitStreamWriter &&)=default
 move-constructor: default More...
 
 ~GolombBitStreamWriter ()
 
GolombBitStreamWriteroperator= (const GolombBitStreamWriter &)=delete
 non-copyable: delete assignment operator More...
 
GolombBitStreamWriteroperator= (GolombBitStreamWriter &&)=default
 move-assignment operator: default More...
 
void Put (size_t value)
 
void PutGolomb (const size_t &value)
 Append new Golomb-encoded value to bitset. More...
 
- Public Member Functions inherited from BitStreamWriter< BlockWriter >
 BitStreamWriter (BlockWriter &block_writer)
 
 BitStreamWriter (const BitStreamWriter &)=delete
 non-copyable: delete copy-constructor More...
 
 BitStreamWriter (BitStreamWriter &&)=default
 move-constructor: default More...
 
 ~BitStreamWriter ()
 
void FlushBits ()
 Flush out buffered bits. More...
 
BitStreamWriteroperator= (const BitStreamWriter &)=delete
 non-copyable: delete assignment operator More...
 
BitStreamWriteroperator= (BitStreamWriter &&)=default
 move-assignment operator: default More...
 
void PutBits (const size_t &value, unsigned bits)
 Append k bits to the data array. More...
 

Private Types

enum  : size_t { all_set = ~((size_t)0) }
 
using Super = BitStreamWriter< BlockWriter >
 

Private Attributes

size_t b_
 Golomb code parameter. More...
 
bool first_call_ = true
 false, when PutGolomb_in was called already More...
 
int log2b_
 ceil(log2(b_)) More...
 
size_t max_little_value_
 escape value More...
 

Additional Inherited Members

- Protected Types inherited from BitStreamWriter< BlockWriter >
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...
 
- Protected Attributes inherited from BitStreamWriter< BlockWriter >
BlockWriter & block_writer_
 Output BlockWriter. More...
 
size_t buffer_ = 0
 current buffer of 32/64 bits More...
 
size_t pos_ = 0
 currently filled number of bits More...
 

Member Typedef Documentation

using Super = BitStreamWriter<BlockWriter>
private

Definition at line 32 of file golomb_bit_stream.hpp.

Member Enumeration Documentation

anonymous enum : size_t
private
Enumerator
all_set 

Definition at line 36 of file golomb_bit_stream.hpp.

Constructor & Destructor Documentation

GolombBitStreamWriter ( BlockWriter &  block_writer,
const size_t &  b 
)
inline

Definition at line 39 of file golomb_bit_stream.hpp.

References die_unless.

GolombBitStreamWriter ( const GolombBitStreamWriter< BlockWriter > &  )
delete

non-copyable: delete copy-constructor

GolombBitStreamWriter ( GolombBitStreamWriter< BlockWriter > &&  )
default

move-constructor: default

Member Function Documentation

GolombBitStreamWriter& operator= ( const GolombBitStreamWriter< BlockWriter > &  )
delete

non-copyable: delete assignment operator

GolombBitStreamWriter& operator= ( GolombBitStreamWriter< BlockWriter > &&  )
default

move-assignment operator: default

void Put ( size_t  value)
inline

Member Data Documentation

size_t b_
private

Golomb code parameter.

Definition at line 129 of file golomb_bit_stream.hpp.

Referenced by GolombBitStreamWriter< BlockWriter >::PutGolomb().

bool first_call_ = true
private

false, when PutGolomb_in was called already

Definition at line 138 of file golomb_bit_stream.hpp.

Referenced by GolombBitStreamWriter< BlockWriter >::PutGolomb().

int log2b_
private

ceil(log2(b_))

Definition at line 132 of file golomb_bit_stream.hpp.

Referenced by GolombBitStreamWriter< BlockWriter >::PutGolomb().

size_t max_little_value_
private

escape value

Definition at line 135 of file golomb_bit_stream.hpp.

Referenced by GolombBitStreamWriter< BlockWriter >::PutGolomb().


The documentation for this class was generated from the following file: