xgboost

Public Member Functions | Static Public Member Functions | List of all members
xgboost::common::CompressedBufferWriter Class Reference

Writes bit compressed symbols to a memory buffer. Use CompressedIterator to read symbols back from buffer. Currently limited to a maximum symbol size of 28 bits. More...

`#include <compressed_iterator.h>`

Collaboration diagram for xgboost::common::CompressedBufferWriter:

## Public Member Functions
XGBOOST_DEVICE | CompressedBufferWriter (size_t num_symbols)
template<typename T >
void | WriteSymbol (CompressedByteT *buffer, T symbol, size_t offset)
template<typename IterT >
void | Write (CompressedByteT *buffer, IterT input_begin, IterT input_end)

## Static Public Member Functions
static size_t | CalculateBufferSize (size_t num_elements, size_t num_symbols)
| Calculates number of bytes required for a given number of elements and a symbol range. More...

## Detailed Description

Writes bit compressed symbols to a memory buffer. Use CompressedIterator to read symbols back from buffer. Currently limited to a maximum symbol size of 28 bits.

Author
  Rory

Date
  7/9/2017

## Constructor & Destructor Documentation

## ◆ CompressedBufferWriter()

XGBOOST_DEVICE xgboost::common::CompressedBufferWriter::CompressedBufferWriter | ( | size_t | num_symbols | ) |
| inline explicit

## Member Function Documentation

## ◆ CalculateBufferSize()

static size_t xgboost::common::CompressedBufferWriter::CalculateBufferSize | ( | size_t | num_elements,
|  | size_t | num_symbols
| ) |  |
| inline static

Calculates number of bytes required for a given number of elements and a symbol range.

Author
  Rory

Date
  7/9/2017

Parameters

  num_elements | Number of elements.
  num_symbols | Max number of symbols (alphabet size)

Returns
  The calculated buffer size.

## ◆ Write()

template<typename IterT >

void xgboost::common::CompressedBufferWriter::Write | ( | CompressedByteT * | buffer,
|  | IterT | input_begin,
|  | IterT | input_end
| ) |  |
| inline

## ◆ WriteSymbol()

template<typename T >

void xgboost::common::CompressedBufferWriter::WriteSymbol | ( | CompressedByteT * | buffer,
|  | T | symbol,
|  | size_t | offset
| ) |  |
| inline

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

- /home/runner/work/xgboost/xgboost/src/common/compressed_iterator.h