xgboost

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

A simple class used to consume ‘dmlc::Stream’ all at once. More...

`#include <io.h>`

Inheritance diagram for xgboost::common::FixedSizeStream:
Collaboration diagram for xgboost::common::FixedSizeStream:

## Public Member Functions
| FixedSizeStream (PeekableInStream *stream)
| ~FixedSizeStream () override=default
size_t | Read (void *dptr, size_t size) override
size_t | PeekRead (void *dptr, size_t size) override
size_t | Size () const
size_t | Tell () const
void | Seek (size_t pos)
void | Write (const void *, size_t) override
void | Take (std::string *out)
| Take the buffer from ‘FixedSizeStream’. The one in ‘FixedSizeStream’ will be cleared out. More...
Public Member Functions inherited from xgboost::common::PeekableInStream
| PeekableInStream (dmlc::Stream *strm)
size_t | Read (void *dptr, size_t size) override
void | Write (const void *, size_t) override

## Detailed Description

A simple class used to consume ‘dmlc::Stream’ all at once.

With it one can load the rabit checkpoint into a known size string buffer.

## Constructor & Destructor Documentation

## ◆ FixedSizeStream()

xgboost::common::FixedSizeStream::FixedSizeStream | ( | PeekableInStream * | stream | ) |
| explicit

## ◆ ~FixedSizeStream()

xgboost::common::FixedSizeStream::~FixedSizeStream | ( |  | ) |
| override default

## Member Function Documentation

## ◆ PeekRead()

size_t xgboost::common::FixedSizeStream::PeekRead | ( | void * | dptr,
|  | size_t | size
| ) |  |
| override virtual

Reimplemented from xgboost::common::PeekableInStream.

## ◆ Read()

size_t xgboost::common::FixedSizeStream::Read | ( | void * | dptr,
|  | size_t | size
| ) |  |
| override

## ◆ Seek()

void xgboost::common::FixedSizeStream::Seek | ( | size_t | pos | ) |

## ◆ Size()

size_t xgboost::common::FixedSizeStream::Size | ( |  | ) | const
| inline

## ◆ Take()

void xgboost::common::FixedSizeStream::Take | ( | std::string * | out | ) |

Take the buffer from ‘FixedSizeStream’. The one in ‘FixedSizeStream’ will be cleared out.

## ◆ Tell()

size_t xgboost::common::FixedSizeStream::Tell | ( |  | ) | const
| inline

## ◆ Write()

void xgboost::common::FixedSizeStream::Write | ( | const void * | ,
|  | size_t |
| ) |  |
| inline override

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

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